must bind-mount dev for loop devices
authorBrad House <brad_mssw@gentoo.org>
Sat, 17 Jan 2004 22:15:11 +0000 (22:15 +0000)
committerBrad House <brad_mssw@gentoo.org>
Sat, 17 Jan 2004 22:15:11 +0000 (22:15 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@54 67a159dc-881f-0410-a524-ba9dfbe2cb84

generic/linuxrc

index ad5986b2067b83d9fe8bbce1af4f7680b46cecd4..edd0698478bf5f5e47a884f1930925015dc33846 100644 (file)
@@ -81,9 +81,7 @@ then
        [ ! -e /newroot/dev/.devfsd ] && mount -t devfs devfs /newroot/dev
        devfsd /newroot/dev
        sleep 1
-       # Bind our mounted dev to /dev  otherwise we may not be able to mount
-       # our loop device later on
-#      mount -o bind /newroot/dev /dev
+
        findcdmount /newroot/dev/cdroms/*
        # not in /dev/cdroms try /dev/ide/cd
        if [ "${REAL_ROOT}" = "" ]
@@ -205,6 +203,10 @@ then
        if [ "${LOOPTYPE}" = "normal" ]
        then
                check_loop
+               
+               # bind-mount /dev/ so that loop devices can be found
+               mount -o bind /newroot/dev /dev
+
                echo "STEP 5a1: mounting loop filesystem"
                mount -t ext2 -o loop,ro /newroot/mnt/cdrom/${LOOP} /newroot/mnt/loop
                if [ "$?" != "0" ]
@@ -213,6 +215,7 @@ then
                        /bin/ash
                fi
                FS_LOCATION="mnt/loop"
+               umount /dev
        elif [ "${LOOPTYPE}" = "zisofs" ]
        then
                check_loop