X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=grml-live;h=c1a37d9280f9bad549cc59620b229a797dc56a4c;hp=f561355dd0501714328b58404300bcf4f24da861;hb=e995acaf165f4beeae2762d3ef4390c92b9dd14f;hpb=332ae52de9efa6a0ac5c3619823fe547e35828a0 diff --git a/grml-live b/grml-live index f561355..c1a37d9 100755 --- a/grml-live +++ b/grml-live @@ -330,6 +330,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}" @@ -1011,6 +1014,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