From: Sebastian Pipping Date: Tue, 31 May 2011 13:03:12 +0000 (+0200) Subject: Add rootfstype= boot parameter (bug #221245) X-Git-Tag: v3.4.16~14 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fad624bc41b33f7bf418845f677caa49a33b6a94;p=genkernel.git Add rootfstype= boot parameter (bug #221245) --- diff --git a/ChangeLog b/ChangeLog index 03f20db..6ef649f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,13 @@ # Distributed under the GPL v2 # $Id$ + 31 May 2011; Sebastian Pipping defaults/linuxrc, + doc/genkernel.8.txt: + Add rootfstype= boot parameter (bug #221245) + + Special thanks: + - Marcin Kurek + 31 May 2011; Nelson Batalha defaults/initrd.defaults: Add Kernel 3.0.0 support (bug #369481) diff --git a/defaults/linuxrc b/defaults/linuxrc index 1819d9f..51c4529 100755 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -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 diff --git a/doc/genkernel.8.txt b/doc/genkernel.8.txt index c435646..c12dca2 100644 --- a/doc/genkernel.8.txt +++ b/doc/genkernel.8.txt @@ -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 ---------- diff --git a/genkernel b/genkernel index 273d9da..6e18506 100755 --- a/genkernel +++ b/genkernel @@ -353,6 +353,10 @@ then [ "${MDADM}" = '1' ] && print_warning 1 'add "domdadm" for RAID support' [ "${DMRAID}" = '1' ] && print_warning 1 ' or "dodmraid="' [ "${ISCSI}" = '1' ] && print_warning 1 'add at least "iscsi_initiatorname= iscsi_target= and iscsi_address=" 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}