From: "Robin H. Johnson" <robbat2@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/genkernel:master commit in: /, doc/, defaults/
Date: Sat, 13 Oct 2012 22:52:49 +0000 (UTC) [thread overview]
Message-ID: <1350168762.bddbeeb8874bd22b8b60e27dd366bc5f3a8d1cee.robbat2@gentoo> (raw)
commit: bddbeeb8874bd22b8b60e27dd366bc5f3a8d1cee
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 13 22:52:42 2012 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Sat Oct 13 22:52:42 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=bddbeeb8
Bug #351873: More livecd control, and initramfs livecd argument documentation.
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
---
ChangeLog | 5 +++++
defaults/initrd.defaults | 7 +++++--
defaults/initrd.scripts | 2 +-
defaults/linuxrc | 6 +++++-
doc/genkernel.8.txt | 14 ++++++++++++--
5 files changed, 28 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6204a06..05484d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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:
diff --git a/defaults/initrd.defaults b/defaults/initrd.defaults
index 73fe4c9..90f73f4 100755
--- a/defaults/initrd.defaults
+++ b/defaults/initrd.defaults
@@ -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'
diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
index 03e61e0..227fc99 100755
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -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() {
diff --git a/defaults/linuxrc b/defaults/linuxrc
index 011505c..54a57c6 100755
--- a/defaults/linuxrc
+++ b/defaults/linuxrc
@@ -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}"
diff --git a/doc/genkernel.8.txt b/doc/genkernel.8.txt
index 912f899..6376e28 100644
--- a/doc/genkernel.8.txt
+++ b/doc/genkernel.8.txt
@@ -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.
next reply other threads:[~2012-10-13 22:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-13 22:52 Robin H. Johnson [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-07-16 15:03 [gentoo-commits] proj/genkernel:master commit in: /, doc/, defaults/ Thomas Deutschmann
2020-03-04 0:02 Thomas Deutschmann
2019-10-02 22:45 Thomas Deutschmann
2019-07-29 20:10 Thomas Deutschmann
2012-07-19 20:56 Richard Yao
2012-07-19 20:43 Richard Yao
2012-07-19 20:24 Richard Yao
2011-08-28 9:19 Fabio Erculiani
2011-07-20 19:24 Fabio Erculiani
2011-07-20 15:55 Fabio Erculiani
2011-06-01 1:44 Sebastian Pipping
2011-05-31 13:18 Sebastian Pipping
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1350168762.bddbeeb8874bd22b8b60e27dd366bc5f3a8d1cee.robbat2@gentoo \
--to=robbat2@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox