Add rootfstype= boot parameter (bug #221245)

cleanup-cruft
Sebastian Pipping 14 years ago
parent 6b92c54c1e
commit fad624bc41

@ -5,6 +5,13 @@
# Distributed under the GPL v2
# $Id$
31 May 2011; Sebastian Pipping <sping@gentoo.org> defaults/linuxrc,
doc/genkernel.8.txt:
Add rootfstype= boot parameter (bug #221245)
Special thanks:
- Marcin Kurek
31 May 2011; Nelson Batalha <nelson.batalha@gmail.com> defaults/initrd.defaults:
Add Kernel 3.0.0 support (bug #369481)

@ -37,6 +37,7 @@ CMDLINE=`cat /proc/cmdline`
# Scan CMDLINE for any specified real_root= or cdroot arguments
FAKE_ROOT=''
REAL_ROOTFLAGS=''
ROOTFSTYPE='auto'
CRYPT_SILENT=0
for x in ${CMDLINE}
do
@ -212,6 +213,9 @@ do
real_rootflags\=*)
REAL_ROOTFLAGS=`parse_opt "${x}"`
;;
rootfstype\=*)
ROOTFSTYPE=`parse_opt "${x}"`
;;
keymap\=*)
keymap=`parse_opt "${x}"`
;;
@ -495,10 +499,11 @@ do
else
# mount ro so fsck doesn't barf later
if [ "${REAL_ROOTFLAGS}" = '' ]; then
mount -o ro ${REAL_ROOT} ${NEW_ROOT}
good_msg "Using mount -t ${ROOTFSTYPE} -o ro"
mount -t ${ROOTFSTYPE} -o ro ${REAL_ROOT} ${NEW_ROOT}
else
good_msg "Using mount -o ro,${REAL_ROOTFLAGS}"
mount -o ro,${REAL_ROOTFLAGS} ${REAL_ROOT} ${NEW_ROOT}
good_msg "Using mount -t ${ROOTFSTYPE} -o ro,${REAL_ROOTFLAGS}"
mount -t ${ROOTFSTYPE} -o ro,${REAL_ROOTFLAGS} ${REAL_ROOT} ${NEW_ROOT}
fi
fi

@ -440,6 +440,11 @@ which the ramdisk scripts would recognize.
*dokeymap*::
Use keymap. Usage of *keymap*= implies this option, already.
*rootfstype*=<...>::
Specify the file system type to mount the real root filesystem as.
This can be useful when support for ext2/ext3/ext4 are
in competition. Default is "auto".
NETBOOTING
----------

@ -353,6 +353,10 @@ then
[ "${MDADM}" = '1' ] && print_warning 1 'add "domdadm" for RAID support'
[ "${DMRAID}" = '1' ] && print_warning 1 ' or "dodmraid=<additional options>"'
[ "${ISCSI}" = '1' ] && print_warning 1 'add at least "iscsi_initiatorname=<initiator name> iscsi_target=<target name> and iscsi_address=<target ip>" for iscsi support'
if [ `grep 'CONFIG_EXT[0-9]_FS=' "${KERNEL_DIR}"/.config | wc -l` -ge 2 ]; then
print_warning 1 'With support for several ext* filesystems around it may be needed to'
print_warning 1 'add "rootfstype=ext3" or "rootfstype=ext4"'
fi
fi
[ "${BOOTRW}" != '' ] && mount -o remount,ro ${BOOTDIR}

Loading…
Cancel
Save