Hello,

I had to hack the initramfs to allow my system to boot on my BTRFS root
filesystem. Everything goes fine with BTRFS unless it is set with
multiple devices. In that case, and you might have a long
debugging/hacking time to understand the cryptic messages at boot and
fix it.

I aim this report to help other users as well as to find a long-term fix
to avoid manually rebuild the initramfs.

When using BTRFS with multiple devices for the root filesystem the
command '/sbin/btrfs device scan' must be issued from the initramfs
before any attempt to mount it, otherwise the kernel will panic.

This command is already triggered by the /init script only if the kernel
cmdline has rootfstype=btrfs and /sbin/btrfs file exists.

But the Sabayon genkernel initramfs is missing /sbin/btrfs. So, I had to
add this file along with the only missing dependency /lib/liblzo2.so.2.
I'm pretty sure this lib is actually NOT required since it looks to be
only about the BTFS option compress=lzo (which does not makes sense for
the read-only mount at the initramfs boot time).

Could it be possible to include /sbin/btrfs executable in the initramfs
in Sabayon, please?

-- 
Nicolas Sebrecht

Reply via email to