commit:     1b8eb107085e8e30a47a3eebbcbce1dda4afb5e1
Author:     Richard Yao <ryao <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 20 18:54:33 2016 +0000
Commit:     Richard Yao <ryao <AT> gentoo <DOT> org>
CommitDate: Wed Jan 20 19:03:37 2016 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=1b8eb107

busybox mount takes -o move instead of --move

Our attempt to move /dev into /newroot/dev fails because busybox's mount
does not understand --move. Instead it requires `-o move`. This failure
causes us to unmount /dev causing ZFS /dev/zd* device nodes to be lost
during the boot process.

There is nothing in userland that presently knows how to recreate zd*
devices from `/sys/devices/virtual/block`. ZFS is not necessarily the
only driver affected, so while this is definitely a bug in the zfs udev
rules we should try to preserve /dev to avoid triggering such bugs in
other subsystems.

Signed-off-by: Richard Yao <ryao <AT> gentoo.org>

 defaults/linuxrc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/defaults/linuxrc b/defaults/linuxrc
index 35f39bc..e47c10e 100644
--- a/defaults/linuxrc
+++ b/defaults/linuxrc
@@ -997,7 +997,7 @@ for fs in /dev /sys /proc
 do
        if grep -qs "$fs" /proc/mounts
        then
-               if ! mount --move $fs "${CHROOT}"$fs
+               if ! mount -o move $fs "${CHROOT}"$fs
                then
                        umount $fs || \
                        bad_msg "Failed to move and unmount the ramdisk $fs!"

Reply via email to