Package Details: mkinitcpio-btrfs 0.4.3-1

Git Clone URL: https://aur.archlinux.org/mkinitcpio-btrfs.git (read-only, click to copy)
Package Base: mkinitcpio-btrfs
Description: mkinitcpio hook containing advanced features for btrfs-based root devices
Upstream URL: https://github.com/xtfxme/mkinitcpio-btrfs
Licenses: BSD
Submitter: xtfxme
Maintainer: xtfxme
Last Packager: dywedir
Votes: 74
Popularity: 0.000945
First Submitted: 2010-01-06 04:17 (UTC)
Last Updated: 2015-07-09 12:27 (UTC)

Latest Comments

« First ‹ Previous 1 .. 3 4 5 6 7 8 9 10 11 12 13 14 Next › Last »

jim945 commented on 2012-07-15 10:44 (UTC)

This hook is no longer required for boot from / to btrfs

xtfxme commented on 2012-07-04 02:02 (UTC)

@WorMzy, aha! :-) your diagnosis/resolutions are spot on, and IMO, resolving the root so late is a bug. i've raised a report against mkinitcpio [1]. thanks for your work/time -- much appreciated. [1] https://bugs.archlinux.org/task/30526

WorMzy commented on 2012-06-26 23:04 (UTC)

Whoops, that should've been "run_latehook", but no matter, I didn't read the other part between the running of HOOKS and the running of LATEHOOKS, namely the part where it tries to mount root. It looks like we've got ourselves a catch 22. On the one hand, you can run the script as a normal hook, which means you pre-empt the resolving of $root. Or you can run the script as a latehook, and completely miss the mounting of root. I dunno if you want to a) report this as a bug.* b) hack a fix (like the one I suggested**). c) rewrite the hook to take this into consideration. Or d) just tell people to use full paths (i.e., no "UUID=", "LABEL=", etc.) in their grub2 configs.*** *I don't see why resolving $root can't be done before hooks are run, unless that would break other hooks.. **still untested, and I need to sleep now. Will try it first thing in the morning if I have time. ***stick it on the wiki and echo it when they install the package. Hope I've helped shed some light on this for you

WorMzy commented on 2012-06-26 22:34 (UTC)

I did, but I think that combination of echoes and conditionals was confusing at best, and I honestly don't know what the results indicated. However, I reverted back to UUID=**** in grub's config, and put a single, simple echo at the top of run_hook: btrfs_fatal "root=${root} fstype=$(blkid -s TYPE -o value ${root})" Booting failed. This is the output: btrfs(FATAL): root=UUID=29034ff6-d2bf-469e-8c0e-82b701ee87d9 fstype= It appears that, while mkinitcpio /does/ resolve the device, it does so /after/ the "EARLYHOOKS" and "HOOKS" have run. I'll try changing run_hook to runlate_hook, and report back.

xtfxme commented on 2012-06-25 14:27 (UTC)

hrrrm, possibly. i usually write out /dev/disk/by-uuid/UUID ... IIRC mkinitcpio (in the past anyway) automatically found the root and re-exported it, so that value was good, but maybe this changed with the recent 0.9 release ... though it doesn't look like it: http://projects.archlinux.org/mkinitcpio.git/tree/init#n44 ... didn't you put some `echo`s in there to see (i thought i read that ...). meh, either way, i'll build a RAID1 + grub2 system via loopback + KVM and take a look.

WorMzy commented on 2012-06-25 11:48 (UTC)

I think the original problem is caused by grub2 using "root=UUID=****" syntax by default. Because of that, "blkid -s TYPE -o value ${root}" always equals "", causing the hook to silently exit. Dunno if the initrd shell (ash?) supports this, but you could put a conditional at the top of the hook like this: [ $root[1,5] = UUID= ] && root="/dev/disk/by-uuid/$root[6,$]" I'll try it out when I get chance.

xtfxme commented on 2012-06-25 06:31 (UTC)

@WorMzy, heh ... hooray! no worries; that's great news because i had zero idea what was causing issue ... tho i am admittedly still curious. alas, i suppose we may never know ...

WorMzy commented on 2012-06-24 14:22 (UTC)

Never mind. I can now boot with the vanilla btrfs_advanced hook, so the problem must have been with my grub config. Sorry for the noise.