linuxrc: call ensure_initramfs_mounts after mounting ${REAL_ROOT}

This makes possible to deal with systemd and separate /usr support
as discussed in bug #479730.
master
Fabio Erculiani 12 years ago
parent 51a455d49c
commit 6f6befff99

@ -443,14 +443,32 @@ do
# else not a good root and start over. # else not a good root and start over.
if [ "$?" = '0' ] if [ "$?" = '0' ]
then then
if [ -d ${NEW_ROOT}/dev -a -x "${NEW_ROOT}${REAL_INIT:-/sbin/init}" ] || [ "${REAL_ROOT}" = "/dev/nfs" ] # now that the root filesystem is mounted, before
then # checking the validity of ${NEW_ROOT} and ${REAL_INIT},
# ensure that ${NEW_ROOT}/etc/initramfs.mounts entries
# are mounted.
ensure_initramfs_mounts
# NFS does not need further checks here.
if [ "${REAL_ROOT}" = "/dev/nfs" ]; then
break break
else
bad_msg "The filesystem mounted at ${REAL_ROOT} does not appear to be a valid /, try again"
got_good_root=0
REAL_ROOT=''
fi fi
if [ ! -d "${NEW_ROOT}/dev" ]; then
_msg="The filesystem ${REAL_ROOT},"
_msg="${_msg} mounted at ${NEW_ROOT}"
_msg="${_msg} does not contain /dev"
_msg="${_msg}, init will likely fail..."
bad_msg "${_msg}"
fi
if [ ! -x "${NEW_ROOT}${REAL_INIT:-/sbin/init}" ]; then
_msg="The filesystem ${REAL_ROOT},"
_msg="${_msg} mounted at ${NEW_ROOT}"
_msg="${_msg} does not contain a valid"
_msg="${_msg} init=${REAL_INIT}"
bad_msg "${_msg}"
fi
break
else else
bad_msg "Could not mount specified ROOT, try again" bad_msg "Could not mount specified ROOT, try again"
got_good_root=0 got_good_root=0
@ -648,7 +666,8 @@ then
CDBOOT=1 CDBOOT=1
fi fi
# Mount the additional things as required by udev & systemd # Re-run this here, which makes sure that it at least had a chance
# to be called.
ensure_initramfs_mounts ensure_initramfs_mounts
splashcmd hasroot "${NEW_ROOT}" splashcmd hasroot "${NEW_ROOT}"

Loading…
Cancel
Save