# 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)
# Scan CMDLINE for any specified real_root= or cdroot arguments
FAKE_ROOT=''
REAL_ROOTFLAGS=''
+ROOTFSTYPE='auto'
CRYPT_SILENT=0
for x in ${CMDLINE}
do
real_rootflags\=*)
REAL_ROOTFLAGS=`parse_opt "${x}"`
;;
+ rootfstype\=*)
+ ROOTFSTYPE=`parse_opt "${x}"`
+ ;;
keymap\=*)
keymap=`parse_opt "${x}"`
;;
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
*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
----------
[ "${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}