Add rootflags to switches we understand

Nearly every general documentation including the one in the
kernel tree and the scripts for GRUB2 all expects this flag
to work.

Signed-off-by: Peter Hjalmarsson <xake@rymdraket.net>
cleanup-cruft
Peter Hjalmarsson 12 years ago
parent 4c93a5adb7
commit e4ab952d63

@ -37,7 +37,7 @@ CMDLINE=$(cat /proc/cmdline)
# Scan CMDLINE for any specified real_root= or cdroot arguments # Scan CMDLINE for any specified real_root= or cdroot arguments
FAKE_ROOT='' FAKE_ROOT=''
FAKE_INIT='' FAKE_INIT=''
REAL_ROOTFLAGS='' FAKE_ROOTFLAGS=''
INIT_OPTS='' INIT_OPTS=''
ROOTFSTYPE='auto' ROOTFSTYPE='auto'
CRYPT_SILENT=0 CRYPT_SILENT=0
@ -236,6 +236,9 @@ do
real_rootflags=*) real_rootflags=*)
REAL_ROOTFLAGS=${x#*=} REAL_ROOTFLAGS=${x#*=}
;; ;;
rootflags=*)
FAKE_ROOTFLAGS=${x#*=}
;;
rootfstype=*) rootfstype=*)
ROOTFSTYPE=${x#*=} ROOTFSTYPE=${x#*=}
;; ;;
@ -267,13 +270,20 @@ do
esac esac
done done
if [ -z "${REAL_ROOT}" -a \( "${CDROOT}" = '0' \) -a \( "${FAKE_ROOT}" != "/dev/ram0" \) ] if [ \( "${CDROOT}" = '0' \) ]
then then
if [ -z "${REAL_ROOT}" -a \( "${FAKE_ROOT}" != "/dev/ram0" \) ]
then
REAL_ROOT="${FAKE_ROOT}" REAL_ROOT="${FAKE_ROOT}"
fi fi
if [ -z "${REAL_INIT}" -a \( "${CDROOT}" = '0' \) -a \( "${FAKE_INIT}" != "/linuxrc" \) ] if [ -z "${REAL_INIT}" -a \( "${FAKE_INIT}" != "/linuxrc" \) ]
then then
REAL_INIT="${FAKE_INIT}" REAL_INIT="${FAKE_INIT}"
fi
if [ -z "${REAL_ROOTFLAGS}" ]
then
REAL_ROOTFLAGS="${FAKE_ROOTFLAGS}"
fi
fi fi
# Set variables based on the value of REAL_ROOT # Set variables based on the value of REAL_ROOT

@ -545,9 +545,13 @@ which the ramdisk scripts would recognize.
*aufs*:: *aufs*::
Enables support for AUFS2 (if available in the kernel). Enables support for AUFS2 (if available in the kernel).
*real_rootflags*=<...>:: *rootflags*=<...>::
Additional flags to mount the real root system with. Additional flags to mount the real root system with.
For example *real_rootflags*=noatime would make "-o ro,noatime". For example *rootflags*=noatime would make "-o ro,noatime".
*real_rootflags*=<...>::
Legacy kernel parameter from kernel-2.4 initrd.
Does the same as *rootflags*=, which should be used in its place.
*real_resume*=<...>:: *real_resume*=<...>::
*resume*=<...>:: *resume*=<...>::

Loading…
Cancel
Save