00-rootdev.sh: always use the blkid detected fstype unless rootfstype= is passed

master
Fabio Erculiani 11 years ago
parent a2f34d906b
commit f92804c752

@ -69,11 +69,14 @@ _rootdev_mount() {
local mount_opts=ro
local mount_fstype="${ROOTFSTYPE}"
local fstype=$(get_device_fstype "${REAL_ROOT}")
if is_zfs_fstype "${fstype}"; then
mount_fstype=zfs
[ -z "${mount_fstype}" ] && mount_fstype=zfs
mount_opts=$(zfs_get_real_root_mount_flags)
fi
[ -z "${mount_fstype}" ] && mount_fstype="${fstype}"
good_msg "Detected fstype: ${fstype}"
good_msg "Using mount fstype: ${mount_fstype}"
_fstype_init "${fstype}"
@ -84,8 +87,15 @@ _rootdev_mount() {
good_msg "Using mount opts: -o ${mopts}"
mount -t "${mount_fstype}" -o "${mopts}" \
"${REAL_ROOT}" "${NEW_ROOT}" || return 1
return 0
"${REAL_ROOT}" "${NEW_ROOT}" && return 0
bad_msg "Cannot mount ${REAL_ROOT}, trying with -t auto"
mount -t "auto" -o "${mopts}" \
"${REAL_ROOT}" "${NEW_ROOT}" && return 0
bad_msg "Cannot mount ${REAL_ROOT} with -t auto, giving up"
return 1
}
_get_mounts_list() {

@ -34,7 +34,6 @@ FAKE_INIT=""
REAL_INIT="/sbin/init"
FAKE_ROOTFLAGS=""
INIT_OPTS=""
ROOTFSTYPE="auto"
CRYPT_SILENT=0
QUIET=""

Loading…
Cancel
Save