Edit 2: checked sources
I've found the ubuntu initramfs-tools sources. Here you can see clearly, the Begin: "Mounting root file system"
message is printed first, but in the mount_root
function fsck
is run before the actual mounting. I have ommited some non-relevant code, just to indicate the order. (If you would inspect the linked sources you will find also the other reported scripts from the screenshot).
/init
line 256
log_begin_msg "Mounting root file system"
# Always load local and nfs (since these might be needed for /etc or
# /usr, irrespective of the boot script used to mount the rootfs).
. /scripts/local
. /scripts/nfs
. /scripts/${BOOT}
parse_numeric ${ROOT}
maybe_break mountroot
mount_top
mount_premount
mountroot
log_end_msg
/scripts/local
@line 244
mountroot()
{
local_mount_root
}
/scripts/local
@line 131
local_mount_root()
{
# Some code ommited
# FIXME This has no error checking
[ -n "${FSTYPE}" ] && modprobe ${FSTYPE}
checkfs ${ROOT} root "${FSTYPE}"
# FIXME This has no error checking
# Mount root
mount ${roflag} ${FSTYPE:+-t ${FSTYPE} }${ROOTFLAGS} ${ROOT} ${rootmnt}
mountroot_status="$?"
if [ "$LOOP" ]; then
if [ "$mountroot_status" != 0 ]; then
if [ ${FSTYPE} = ntfs ] || [ ${FSTYPE} = vfat ]; then
panic "<Error message ommited>"
fi
fi
mkdir -p /host
mount -o move ${rootmnt} /host
# Some code ommitted
}