X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=grml-live;h=7dc20f8e5cc6a73dd48589d7efb4a28ecd0071fd;hp=f561355dd0501714328b58404300bcf4f24da861;hb=8772657eafe9541d7879b65ff3750903f200cb25;hpb=332ae52de9efa6a0ac5c3619823fe547e35828a0 diff --git a/grml-live b/grml-live index f561355..7dc20f8 100755 --- a/grml-live +++ b/grml-live @@ -164,6 +164,7 @@ umount_all() { # make sure we don't leave any mounts - FAI doesn't remove them always umount $CHROOT_OUTPUT/proc/sys/fs/binfmt_misc 2>/dev/null || /bin/true umount $CHROOT_OUTPUT/proc 2>/dev/null || /bin/true + umount $CHROOT_OUTPUT/run/udev 2>/dev/null || /bin/true umount $CHROOT_OUTPUT/run 2>/dev/null || /bin/true umount $CHROOT_OUTPUT/sys 2>/dev/null || /bin/true umount $CHROOT_OUTPUT/dev/pts 2>/dev/null || /bin/true @@ -330,6 +331,9 @@ adjust_boot_files() { sed -i "s/%RELEASE_INFO%/$RELEASE_INFO/g" "${file}" sed -i "s/%SHORT_NAME%/$SHORT_NAME/g" "${file}" sed -i "s/%VERSION%/$VERSION/g" "${file}" + if [ -n "${BOOT_FILE}" ] ; then + sed -i "s;%BOOT_FILE%;$BOOT_FILE;g" "${file}" + fi [ -n "$DEFAULT_BOOTOPTIONS" ] && sed -i "s; boot=live; boot=live $DEFAULT_BOOTOPTIONS;" "${file}" @@ -425,7 +429,7 @@ fi [ -n "$HOSTNAME" ] || HOSTNAME='grml' [ -n "$HYBRID_METHOD" ] || HYBRID_METHOD='isohybrid' [ -n "$RELEASENAME" ] || RELEASENAME='grml-live rocks' -[ -n "$SECURE_BOOT" ] || SECURE_BOOT='ubuntu' +[ -n "$SECURE_BOOT" ] || SECURE_BOOT='disable' [ -n "$SQUASHFS_EXCLUDES_FILE" ] || SQUASHFS_EXCLUDES_FILE="${GRML_FAI_CONFIG}/config/grml/squashfs-excludes" [ -n "$SUITE" ] || SUITE='testing' [ -n "$TEMPLATE_DIRECTORY" ] || TEMPLATE_DIRECTORY='/usr/share/grml-live/templates' @@ -575,7 +579,8 @@ if [ -n "$CONFIG" ] ; then fi fi -start_seconds=$(cut -d . -f 1 /proc/uptime) +SECONDS=unknown +start_seconds="$(date +%s)" log "------------------------------------------------------------------------------" log "Starting grml-live [${GRML_LIVE_VERSION}] run on $(date)" log "Using local config file: $LOCAL_CONFIG" @@ -674,7 +679,7 @@ if [ -z "$FAI_DEBOOTSTRAP" ] ; then fi if [ -z "$FAI_DEBOOTSTRAP_OPTS" ] ; then - FAI_DEBOOTSTRAP_OPTS="--exclude=info,tasksel,tasksel-data --include=aptitude --arch $ARCH" + FAI_DEBOOTSTRAP_OPTS="--exclude=info,tasksel,tasksel-data --include=aptitude --arch $ARCH --no-merged-usr" fi # create backup of old (not yet automatically generated) config file @@ -1011,6 +1016,25 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then eend $? fi + # every recent Grml ISO ships a /conf/bootid.txt, though GRUB might find + # the /conf/bootid.txt of a different (Grml) ISO than the one that's + # supposed to be running, so within scripts/GRMLBASE/45-grub-images + # we generate a random filename, stored inside /boot/grub/bootfile.txt, + # which we place on the resulting ISO here + if [ -r "${CHROOT_OUTPUT}"/boot/grub/bootfile.txt ] ; then + mkdir -p "${BUILD_OUTPUT}"/conf + rm -f "${BUILD_OUTPUT}"/conf/bootfile* # ensure we don't leave any old(er) files behind + + einfo "Generating "${BUILD_OUTPUT}"/conf/bootfile* files" + log "Generating "${BUILD_OUTPUT}"/conf/bootfile* files" + + BOOT_FILE="/conf/bootfile_$(cat "${CHROOT_OUTPUT}"/boot/grub/bootfile.txt)" + echo "# This file is relevant for GRUB boot with the Grml ISO." > "${BUILD_OUTPUT}/${BOOT_FILE}" + # save information about the random filename inside /conf/bootfile.txt + echo "${BOOT_FILE}" > "${BUILD_OUTPUT}"/conf/bootfile.txt + eend $? + fi + grub_setup # EFI boot files @@ -1669,7 +1693,10 @@ fi # }}} # finalize {{{ -[ -n "$start_seconds" ] && SECONDS="$[$(cut -d . -f 1 /proc/uptime)-$start_seconds]" || SECONDS="unknown" +if [ -n "${start_seconds}" ] ; then + end_seconds="$(date +%s)" + SECONDS="$(( end_seconds - start_seconds ))" +fi log "Successfully finished execution of $PN [$(date) - running ${SECONDS} seconds]" dpkg_to_db # make sure we catch the last log line as well, therefore execute between log + einfo