With the new /usr mounting, if the device path that ends up in /proc/mounts ends...
[genkernel.git] / defaults / linuxrc
index 693257f3a6961381b1bca6ade711219fa9e967f5..528f58d9f81cf63c1d0be33e9da33d83be5e5234 100755 (executable)
@@ -544,6 +544,9 @@ do
                if [ "${REAL_ROOT}" = '/dev/nfs' ]; then
                        findnfsmount
                else
+                       # If $REAL_ROOT is a symlink
+                       # Resolve it like util-linux mount does
+                       [ -L ${REAL_ROOT} ] && REAL_ROOT=`readlink ${REAL_ROOT}`
                        # mount ro so fsck doesn't barf later
                        if [ "${REAL_ROOTFLAGS}" = '' ]; then
                                good_msg "Using mount -t ${ROOTFSTYPE} -o ${MOUNT_STATE}"
@@ -777,6 +780,8 @@ fi
 
 for fs in $fslist; do
        dev=$(get_mount_device $fs)
+       # Resolve it like util-linux mount does
+       [ -L ${dev} ] && dev=`readlink ${dev}`
        # In this case, it's probably part of the filesystem
        # and not a mountpoint
        [ -z "$dev" ] && continue