Bug #351873: More livecd control, and initramfs livecd argument documentation.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
cleanup-cruft
Robin H. Johnson 12 years ago
parent 4d42bbf35b
commit bddbeeb887

@ -5,6 +5,11 @@
# Distributed under the GPL v2
# $Id$
13 Oct 2012; Robin H. Johnson <robbat2@gentoo.org> defaults/initrd.defaults,
defaults/initrd.scripts, defaults/linuxrc, doc/genkernel.8.txt:
Bug #351873: More livecd control, and initramfs livecd argument
documentation.
13 Oct 2012; Robin H. Johnson <robbat2@gentoo.org> arch/alpha/kernel-config,
arch/ppc/kernel-config, arch/x86/kernel-config, arch/x86_64/kernel-config,
defaults/kernel-config:

@ -67,12 +67,15 @@ else
fi
REAL_ROOT=''
CONSOLE='/dev/console'
NEW_ROOT='/newroot'
CDROOT='0'
CDROOT_DEV=''
CDROOT_TYPE='auto'
NEW_ROOT='/newroot'
CDROOT_PATH='/mnt/cdrom'
CONSOLE='/dev/console'
# This is the file that the cdroot will be checked for as a
# marker. It must exist RELATIVE to the cdroot.
CDROOT_MARKER='/livecd'
LOOPS='/livecd.loop /zisofs /livecd.squashfs /image.squashfs /livecd.gcloop'

@ -159,7 +159,7 @@ bootstrapCD() {
# a bunch of extra devices
[ -n "${CDROOT_DEV}" ] && DEVICES="${CDROOT_DEV}"
findmediamount "cdrom" "${SUBDIR}/livecd" "REAL_ROOT" "${CDROOT_PATH}" ${DEVICES}
findmediamount "cdrom" "${SUBDIR}/${CDROOT_MARKER}" "REAL_ROOT" "${CDROOT_PATH}" ${DEVICES}
}
bootstrapKey() {

@ -39,6 +39,7 @@ FAKE_ROOT=''
REAL_ROOTFLAGS=''
ROOTFSTYPE='auto'
CRYPT_SILENT=0
mkdir -p /etc/cmdline /etc/modprobe.d
for x in ${CMDLINE}
do
@ -69,6 +70,9 @@ do
cdroot_type=*)
CDROOT_TYPE=${x#*=}
;;
cdroot_marker=*)
CDROOT_MARKER=${x#*=}
;;
# Start livecd loop, looptype options
loop=*)
LOOP=${x#*=}
@ -657,7 +661,7 @@ then
# If encrypted, find key and mount, otherwise mount as usual
if [ -n "${CRYPT_ROOT}" ]
then
CRYPT_ROOT_KEY="$(head -n 1 "${CDROOT_PATH}"/livecd)"
CRYPT_ROOT_KEY="$(head -n 1 "${CDROOT_PATH}"/${CDROOT_MARKER})"
CRYPT_ROOT='/dev/loop0'
good_msg 'You booted an encrypted livecd' "${CRYPT_SILENT}"

@ -551,11 +551,21 @@ which the ramdisk scripts would recognize.
*cdroot*[=<...>]::
*cdroot_type*=<...>::
TO BE DOCUMENTED
*cdroot_marker*=<...>::
Used for LiveCDs. *cdroot* without arguments will cause the initramfs to
scan all devices for a LiveCD. An argument to *cdroot* will cause it to
scan only that device. A LiveCD is any device containing a file with the
name & Path of *cdroot_marker* (default of "/livecd"). *cdroot_type*
(default of "auto") is the filesystem type to use while mounting devices
to check. On success, the LiveCD will be mounted at $CDROOT_PATH.
*loop*=<...>::
*looptype*=<...>::
TO BE DOCUMENTED
Used for LiveCDs. After mounting the LiveCD or ISO, look for a file at
*loop*=path to use as a loopback image for the main type. Mount it with
filesystem type *looptype*. Possible values for *looptype*: normal,
squashfs, gcloop, zisofs, noloop, sgimips. If *looptype* is not specified,
a guess is made, based on the name or extension of *loop*.
*isoboot*=<...>::
Loop-mount an ISO file from the boot device to get the filesystem image.

Loading…
Cancel
Save