Synopsis
--------
-grml-live [-c <classe[s]>] [-t <target_directory>] [-s <suite>] [-Fvh]
+grml-live [-c <classe[s]>] [-i <iso_name> ] [-r <release_name>]
+[-s <suite>] [-t <target_directory>] [-v <version_number>] [-Fvh]
*******************************************************************************
Important! This document is growing as requested. If you have questions which
the classes GRMLBASE and I386 are assumed, resulting in a small base system
(being about ~150MB total ISO size) for x86 (32bit).
+ -F::
+
+Force execution and do not prompt for acknowledgment of configuration.
+
+ -h::
+
+Display short usage information and exit.
+
+ -i **ISO_NAME**::
+
+Specify name of ISO which will be available inside $TARGET_DIRECTORY/grml_isos
+by default.
+
+ -r **RELEASENAME**::
+
+Specify name of the release. (Notice: the output of the release name is limited
+to 30 characters.)
+
-s **SUITE**::
Specify the Debian suite you want to use for your live-system. Defaults to
ISO are located, including the compressed squashfs file), grml_chroot (the
chroot system) and grml_isos (where the resulting ISO is stored).
- -F::
-
-Force execution and do not prompt for acknowledgment of configuration.
-
- -h::
+ -v **VERSION_NUMBER**::
-Display short usage information and exit.
+Specify version number of the release. (Notice: the output of the version number
+is limited to 5 characters. So "1.0-1" is fine, but "1.0.0.1" will be stripped
+to "1.0.0" then.)
- -v::
+ -V::
Increase verbosity in the build process.
-How to get your own Live-CD - the easy, fast and simple way
------------------------------------------------------------
+Usage examples
+--------------
To get a small, Debian-stable and grml-based Live-CD using /grml/grml-live
as build and output directory just run:
# grml-live -c GRMLBASE,GRML_SMALL,I386 -t /home/mika/grml-live
+To get a smal, Debian-unstable and grml-based Live-CD using /tmp as build and
+output directory and use grml_0.0-3.iso as ISO name (placed inside
+/tmp/grml_isos) just invoke:
+
+ # grml-live -t /tmp -c GRMLBASE,I386 -s sid -v -i grml_0.0-3.iso
+
[NOTE]
If you have about 700MB of free space inside /dev/shm (being a tmpfs, usually
* support signed apt repositories (currently it's deactivated via FAI's
FAI_ALLOW_UNSIGNED=1 for some packages in the toolchain)
-* support setting stuff like ISO name, version,... on-the-fly (especially for
-stuff inside boot/isolinux/*)
-
* support "final builds" (including stuff like generating md5sums, gpg,... -
create a grml_release-directory including all the details about the build
process like dpkg selection, logs,...)
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2 or any later version.
-# Latest change: Wed Sep 19 23:41:52 CEST 2007 [mika]
+# Latest change: Wed Sep 19 23:59:48 CEST 2007 [mika]
################################################################################
# read configuration files, set some misc variables {{{
if [ -r /etc/grml/lsb-functions ] ; then
. /etc/grml/lsb-functions
else
- einfo() { echo " [*] $*" ;}
+ einfo() { echo " [*] $*" ;}
eerror() { echo " [!] $*">&2 ;}
- ewarn() { echo " [x] $*" ;}
- eend() { return 0 ; }
+ ewarn() { echo " [x] $*" ;}
+ eend() { return 0 ;}
fi
# source main configuration file:
. $LIVE_CONF
PN=$(basename $0)
-# TMPFILE=$(mktemp)
# }}}
# clean exit {{{
bailout() {
- # rm -f "$TMPFILE"
[ -n "$MIRROR_DIRECTORY" ] && umount "${CHROOT_TARGET}/${MIRROR_DIRECTORY}"
[ -n "$1" ] && EXIT="$1" || EXIT="1"
[ -n "$2" ] && eerror "$2">&2
[ -n "$CLASSES" ] || CLASSES="GRML,I386"
[ -n "$TARGET" ] || bailout 1 "${PN}: \$TARGET not specified. Please adjust $LIVE_CONF. Exiting."
-[ -n "$VERSION" ] || VERSION="0.1"
-[ -n "$CODENAME" ] || CODENAME="grml-live rocks"
+[ -n "$VERSION" ] || VERSION="0.0.1"
+[ -n "$RELEASENAME" ] || RELEASENAME="grml-live rocks"
[ -n "$LOGDIR" ] || LOGDIR="/var/log/fai/dirinstall/$HOSTNAME"
[ -d "$LOGDIR" ] || mkdir $LOGDIR
echo "
$PN - build process script for generating a (grml based) Linux Live-ISO
-Usage: $PN [-c <classe[s]>] [-t <target_directory>] [-s <suite> [-Fvh]
+Usage: $PN [-c <classe[s]>] [-i <iso_name> ] [-r <release_name>] \\
+ [-s <suite>] [-t <target_directory>] [-v <version_number>] [-Fvh]
Usage examples:
$PN -c GRMLBASE,GRML_X,I386 -t /grml/
$PN -c GRMLBASE,I386 -t /dev/shm/grml
$PN -c GRMLBASE,GRML_SMALL,I386
- $PN -s sid -c GRMLBASE,I386
+ $PN -c GRMLBASE,I386 -v -i grml_0.0-1.iso
+ $PN -c GRMLBASE,I386 -s sid
More details: man grml-live
/usr/share/doc/grml-live/grml-live.html
# command line parsing {{{
-while getopts "c:i:s:t:Fhv" opt; do
+while getopts "c:i:r:s:t:v:FhV" opt; do
case "$opt" in
c) CLASSES="$OPTARG" ;;
- F) FORCE=1 ;;
- h) usage ; bailout 0 ;;
i) ISO_NAME="$OPTARG" ;;
+ r) RELEASENAME="$OPTARG" ;;
s) SUITE="$OPTARG" ;;
t) TARGET="$OPTARG"
CHROOT_TARGET="$TARGET/grml_chroot"
BUILD_TARGET="$TARGET/grml_cd"
ISO_TARGET="$TARGET/grml_isos"
;;
- v) VERBOSE="-v" ;;
+ v) VERSION="$OPTARG" ;;
+ F) FORCE=1 ;;
+ h) usage ; bailout 0 ;;
+ V) VERBOSE="-v" ;;
?) echo "invalid option -$OPTARG" >&2; bailout 1 ;;
esac
done
# adjust boot splash information:
ISO_DATE="$(date +%Y-%m-%d)"
VERSION="$(cut_string 5 "$VERSION")" ; VERSION="$(extend_string_end 5 "$VERSION")"
- CODENAME="$(cut_string 30 "$CODENAME")" ; CODENAME="$(extend_string_end 30 "$CODENAME")"
+ RELEASENAME="$(cut_string 30 "$RELEASENAME")" ; RELEASENAME="$(extend_string_end 30 "$RELEASENAME")"
sed -i "s/%VERSION%/$VERSION/" "$BUILD_TARGET"/boot/isolinux/boot.msg
- sed -i "s/%CODENAME%/$CODENAME/" "$BUILD_TARGET"/boot/isolinux/boot.msg
+ sed -i "s/%RELEASENAME%/$RELEASENAME/" "$BUILD_TARGET"/boot/isolinux/boot.msg
sed -i "s/%DATE%/$ISO_DATE/" "$BUILD_TARGET"/boot/isolinux/boot.msg
sed -i "s/%VERSION%/$VERSION/" "$BUILD_TARGET"/boot/isolinux/boot-beep.msg
- sed -i "s/%CODENAME%/$CODENAME/" "$BUILD_TARGET"/boot/isolinux/boot-beep.msg
+ sed -i "s/%RELEASENAME%/$RELEASENAME/" "$BUILD_TARGET"/boot/isolinux/boot-beep.msg
sed -i "s/%DATE%/$ISO_DATE/" "$BUILD_TARGET"/boot/isolinux/boot-beep.msg
# autostart for Windows:
# ISO_TARGET - mkisofs {{{
[ -n "$ISO_TARGET" ] || ISO_TARGET="$TARGET/grml_isos"
-if [ -d "$ISO_TARGET" ] ; then
+[ -n "$ISO_NAME" ] || ISO_NAME="grml_${VERSION}.iso"
+
+if [ -f "${ISO_TARGET}/${ISO_NAME}" ] ; then
ewarn "$ISO_TARGET exists already, skipping stage 'iso build'" ; eend 0
log "$ISO_TARGET exists already, skipping stage 'iso build'"
else
mkdir -p "$ISO_TARGET" || bailout 6 "Problem with creating $ISO_TARGET for stage 'iso build'"
- [ -n "$ISO_NAME" ] || ISO_NAME="grml_0.0-1.iso"
( cd "$BUILD_TARGET" &&
- mkisofs -V "Debian/etch grml" -publisher 'grml-live | grml.org' \
+ mkisofs -V "grml $VERSION" -publisher 'grml-live | grml.org' \
-l -r -J -no-emul-boot -boot-load-size 4 -boot-info-table \
-c boot/isolinux/boot.cat -b boot/isolinux/isolinux.bin \
- -o "${ISO_TARGET}"/"${ISO_NAME}" .
+ -o "${ISO_TARGET}/${ISO_NAME}" .
)
einfo "Finished execution of stage 'iso build'" ; eend 0
log "Finished execution of stage 'iso build' [$(date)]"