-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop support for all boot methods other than isolinux #152
Open
mika
wants to merge
1
commit into
master
Choose a base branch
from
mika/isolinux-only
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,10 +11,6 @@ Files: fonts/graphicoreBitmapFont0-Light.otf | |
Copyright: 2010, Lasse Fister [email protected] | ||
License: SIL | ||
|
||
Files: scripts/bootgrub.mksh scripts/bootilnx.mksh | ||
Copyright: 2007, 2008, 2009, 2010 Thorsten Glaser <[email protected]> | ||
License: MirOS | ||
|
||
Files: templates/EFI/debian/BOOT/grubx64.efi.signed | ||
Copyright: 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc | ||
2009-2012 Intel Corporation | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
grml-live: bugs-field-does-not-refer-to-debian-infrastructure mailto:[email protected] | ||
grml-live: executable-not-elf-or-script usr/share/grml-live/templates/windows/autostart/autorun.inf | ||
grml-live: privacy-breach-generic usr/share/grml-live/templates/GRML/index.html [<link rel="home" href="http://grml.org/" title="grml.org" />] (http://grml.org/) | ||
grml-live: script-not-executable usr/share/grml-live/scripts/bootgrub.mksh | ||
grml-live: script-not-executable usr/share/grml-live/scripts/bootilnx.mksh | ||
grml-live: unknown-section grml | ||
grml-live: uses-dpkg-database-directly etc/grml/fai/config/hooks/instsoft.GRMLBASE | ||
grml-live: uses-dpkg-database-directly etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
#!/bin/bash | ||
# Filename: grml-live | ||
# Purpose: build process script for generating a (grml based) Linux Live-ISO | ||
# Authors: grml-team (grml.org), | ||
# (c) Michael Prokop <[email protected]>, | ||
# (c) Thorsten Glaser <[email protected]> | ||
# Authors: Grml Team (see https://grml.org/) | ||
# Bug-Reports: see http://grml.org/bugs/ | ||
# License: This file is licensed under the GPL v2 or any later version. | ||
################################################################################ | ||
|
@@ -448,7 +446,6 @@ fi | |
|
||
# assume sane defaults (if not set already) {{{ | ||
[ -n "$ARCH" ] || ARCH="$(dpkg --print-architecture)" | ||
[ -n "$BOOT_METHOD" ] || BOOT_METHOD='isolinux' | ||
[ -n "$CLASSES" ] || CLASSES="GRMLBASE,GRML_FULL,$(echo ${ARCH} | tr 'a-z' 'A-Z')" | ||
[ -n "$DATE" ] || DATE="$(date +%Y-%m-%d)" | ||
[ -n "$DISTRI_INFO" ] || DISTRI_INFO='Grml - Live Linux for system administrators' | ||
|
@@ -530,7 +527,6 @@ if [ -z "$FORCE" ] ; then | |
[ -n "$VERSION" ] && echo " Grml version: $VERSION" | ||
[ -n "$SUITE" ] && echo " Debian suite: $SUITE" | ||
[ -n "$ARCH" ] && echo " Architecture: $ARCH" | ||
[ -n "$BOOT_METHOD" ] && echo " Boot method: $BOOT_METHOD" | ||
[ -n "$HYBRID_METHOD" ] && echo " Hybrid method: $HYBRID_METHOD" | ||
[ -n "$SECURE_BOOT" ] && echo " Secure Boot: $SECURE_BOOT" | ||
[ -n "$TEMPLATE_DIRECTORY" ] && echo " Template files: $TEMPLATE_DIRECTORY" | ||
|
@@ -717,6 +713,14 @@ elif echo $CLASSES | grep -qi arm64 ; then | |
fi | ||
fi | ||
|
||
if [[ -n "${BOOT_METHOD:-}" ]] && [[ "${BOOT_METHOD}" != "isolinux" ]] ; then | ||
log "Error: You specified unsupported BOOT_METHOD '${BOOT_METHOD:-}', though only isolinux is supported." | ||
eerror "Error: You specified unsupported BOOT_METHOD '${BOOT_METHOD:-}', though only isolinux is supported." | ||
eerror "NOTE: The BOOT_METHOD configuration is deprecated, please consider unsetting it. Exiting." | ||
eend 1 | ||
bailout | ||
fi | ||
|
||
# generate nfsroot configuration for FAI on the fly | ||
if [ -z "$FAI_DEBOOTSTRAP" ] ; then | ||
if [ -n "$WAYBACK_DATE" ] ; then | ||
|
@@ -1532,7 +1536,6 @@ fi | |
# shellcheck disable=SC2034 | ||
generate_build_info() { | ||
jo -p \ | ||
boot_method="${BOOT_METHOD}" \ | ||
bootstrap_only="${BOOTSTRAP_ONLY}" \ | ||
build_date="${DATE}" \ | ||
build_dirty="${BUILD_DIRTY}" \ | ||
|
@@ -1591,21 +1594,9 @@ generate_build_info() { | |
[ -n "$ISO_OUTPUT" ] || ISO_OUTPUT="$OUTPUT/grml_isos" | ||
[ -n "$ISO_NAME" ] || ISO_NAME="${GRML_NAME}_${VERSION}.iso" | ||
|
||
if [ "$BOOT_METHOD" = "isolinux" ] ; then | ||
BOOT_ARGS="-no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat" | ||
if [ "$HYBRID_METHOD" = "isohybrid" ] ; then | ||
EFI_ARGS="-isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -eltorito-alt-boot -e boot/efi.img -no-emul-boot -isohybrid-gpt-basdat" | ||
fi | ||
elif [ "$BOOT_METHOD" = "grub2" ] ; then | ||
BOOT_ARGS="-no-emul-boot -boot-load-size 4 -b boot/grub/toriboot.bin" | ||
fi | ||
|
||
# Work around http://bts.grml.org/grml/issue945 | ||
if [[ $BOOT_METHOD != isolinux && ($HYBRID_METHOD = isohybrid || $HYBRID_METHOD = manifold) ]]; then | ||
log "Setting HYBRID_METHOD to grub2 as hybrid mode does not work with isohybrid yet." | ||
ewarn "Setting HYBRID_METHOD to grub2 as hybrid mode does not work with isohybrid yet." | ||
HYBRID_METHOD='grub2' | ||
eend 0 | ||
BOOT_ARGS="-no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat" | ||
if [ "$HYBRID_METHOD" = "isohybrid" ] ; then | ||
EFI_ARGS="-isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -eltorito-alt-boot -e boot/efi.img -no-emul-boot -isohybrid-gpt-basdat" | ||
fi | ||
|
||
if [ -f "${ISO_OUTPUT}/${ISO_NAME}" -a -z "$UPDATE" -a -z "$BUILD_ONLY" -a -z "$BUILD_DIRTY" -a "$FORCE_ISO_REBUILD" = "false" ] ; then | ||
|
@@ -1662,14 +1653,6 @@ else | |
|
||
CURRENT_DIR=$(pwd) | ||
if cd "$BUILD_OUTPUT" ; then | ||
if [ "$BOOT_METHOD" = "grub2" ]; then | ||
# make a 2048-byte bootsector for El Torito | ||
dd if=/dev/zero of=boot/grub/toriboot.bin bs=512 count=4 2>/dev/null | ||
# those are in 2048-byte sectors, so 1 16 matches 4 63 below | ||
echo 1 16 | mksh "${SCRIPTS_DIRECTORY}/bootgrub.mksh" -B 11 | \ | ||
dd of=boot/grub/toriboot.bin conv=notrunc 2>/dev/null | ||
fi | ||
|
||
log "Generating build information in conf/buildinfo.json" | ||
einfo "Generating build information in conf/buildinfo.json" | ||
mkdir -p conf/ | ||
|
@@ -1690,57 +1673,14 @@ else | |
bailout $RC | ||
fi | ||
|
||
# both of these need core.img there, so it’s easier to write it here | ||
if [ "$BOOT_METHOD" = "grub2" ] || [ "$HYBRID_METHOD" = "grub2" ]; then | ||
# must be <= 30720 bytes | ||
dd if=boot/grub/core.img of="${ISO_OUTPUT}/${ISO_NAME}" \ | ||
conv=notrunc bs=512 seek=4 2>/dev/null | ||
fi | ||
|
||
# TODO - review whether actually still needed? | ||
# pad the output ISO to multiples of 256 KiB for partition table support | ||
siz=$($getfilesize "${ISO_OUTPUT}/${ISO_NAME}") | ||
cyls=$((siz / 512 / 32 / 16 + 1)) # C=$cyls H=16 S=32 | ||
siz=$((cyls * 16 * 32 * 512)) # size after padding | ||
dd if=/dev/zero bs=1 count=1 seek=$((siz - 1)) \ | ||
of="${ISO_OUTPUT}/${ISO_NAME}" 2>/dev/null | ||
|
||
# support disabling hybrid ISO image | ||
if [ "$HYBRID_METHOD" = "disable" ] ; then | ||
log "Skipping creation of hybrid ISO file as requested via HYBRID_METHOD=disable" | ||
einfo "Skipping creation of hybrid ISO file as requested via HYBRID_METHOD=disable" | ||
eend 0 | ||
elif [ "$HYBRID_METHOD" = "manifold" ] || [ "$HYBRID_METHOD" = "grub2" ] ; then | ||
# isoinfo is part of both mkisofs and genisoimage so we're good | ||
bootoff=$(isoinfo -l -i "${ISO_OUTPUT}/${ISO_NAME}" | \ | ||
sed -n '/^.*\[ *\([0-9]*\)[] ].* ISOLINUX.BIN[;1]* *$/s//\1/p') | ||
|
||
if ! [ -r boot/grub/core.img ] ; then | ||
log "boot/grub/core.img not found, not creating manifold boot ISO file" | ||
ewarn "boot/grub/core.img not found, not creating manifold boot ISO file" | ||
elif [ "${bootoff:-0}" -lt 1 ] ; then | ||
log "isolinux.bin not found on the ISO file, disabling manifold boot" | ||
ewarn "isolinux.bin not found on the ISO file, disabling manifold boot" | ||
else | ||
if [ "$HYBRID_METHOD" = "grub2" ] ; then | ||
log "Creating hybrid ISO file with manifold/grub2 method" | ||
einfo "Creating hybrid ISO file with manifold/grub2 method" | ||
# 512 bytes: MBR, partition table, load GRUB 2 | ||
echo 4 63 | mksh "${SCRIPTS_DIRECTORY}/bootgrub.mksh" -A -M 4:0x96 -g $cyls:16:32 | ||
else | ||
log "Creating hybrid ISO file with manifold method" | ||
einfo "Creating hybrid ISO file with manifold method" | ||
# read only one but 2048-byte sized (scale: << 2) sector | ||
echo $bootoff $bootoff | \ | ||
mksh ${SCRIPTS_DIRECTORY}/bootilnx.mksh -A -M 4:0x96 -g $cyls:16:32 -S 2 | ||
fi | dd of="${ISO_OUTPUT}/${ISO_NAME}" conv=notrunc 2>/dev/null | ||
eend $? | ||
fi | ||
elif [ "$HYBRID_METHOD" = "isohybrid" ] ; then | ||
: # nothing to do, handled via $MKISOFS $EFI_ARGS already | ||
else | ||
bailout 12 "Unknown HYBRID_METHOD [${HYBRID_METHOD}]. Supported values: disable, isohybrid, grub2, manifold" | ||
fi | ||
|
||
# generate ISO checksums if we are using class 'RELEASE': | ||
case $CLASSES in *RELEASE*) | ||
[ "$RC" = 0 ] && \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a good reason to keep supporting
disable
?