Bug#884591: live-build: grub.cfg failsafe entries rework
Package: live-build
Version: 1:20171207
Severity: normal
Control: tags -1 + patch
Dear Maintainer,
* What led up to the situation?
I was trying to build a live cd that has both two kernels: 686 and amd64
and at the same time which would be any hybrid disk so that I can boot
in a BIOS-only machine and in an UEFI-only machine.
* What exactly did you do (or not do) that was effective (or
ineffective)?
I used these options:
--linux-flavours="686 amd64"
--bootloaders="syslinux,grub-efi"
to build my system.
* What was the outcome of this action?
Failsafe entries were shown next to the autodetect entry for a default
kernel.
* What outcome did you expect instead?
I expected to see specific autodetect failsafe entries that only are
shown when the autodetect entries are used.
* Patch attached
I attach a patch that fixes this problem. Now failsafe entries are
consistent in both autodetect entries and not autodetect entries.
You can also find the same patch at:
* Repo: https://github.com/rescatux/live-build.git
* Branch: loopback_cfg_failsafe_rework
-- System Information:
Debian Release: 9.2
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.9.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8),
LANGUAGE= (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages live-build depends on:
ii debootstrap 1.0.89
Versions of packages live-build recommends:
ii apt-utils 1.4.8
ii cpio 2.11+dfsg-6
pn live-boot-doc <none>
pn live-config-doc <none>
pn live-manual-html | live-manual <none>
ii wget 1.18-5+deb9u1
live-build suggests no packages.
>From 3be183c837df0cb11f8ea29e688f0e2002381b13 Mon Sep 17 00:00:00 2001
From: Adrian Gibanel Lopez <adrian.gibanel@btactic.com>
Date: Sat, 16 Dec 2017 23:01:33 +0000
Subject: [PATCH] Failsafe entries rework at binary_loopback_cfg
---
scripts/build/binary_loopback_cfg | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/scripts/build/binary_loopback_cfg b/scripts/build/binary_loopback_cfg
index 00f537c48..04a1624bc 100755
--- a/scripts/build/binary_loopback_cfg
+++ b/scripts/build/binary_loopback_cfg
@@ -199,14 +199,23 @@ if [ "${_AMD64_486_NUMBER}" -ge 2 ] ; then
"/${INITFS}/${AMD64_INITRD}" \
"/${INITFS}/${_486_KERNEL}" \
"/${INITFS}/${_486_INITRD}" \
- "$APPEND_LIVE"
+ "${APPEND_LIVE}"
+
+ if [ "${LB_BOOTAPPEND_LIVE_FAILSAFE}" != "none" ]
+ then
+ Grub_live_autodetect_entry "Live system (autodetect) (fail-safe mode)" \
+ "/${INITFS}/${AMD64_KERNEL}" \
+ "/${INITFS}/${AMD64_INITRD}" \
+ "/${INITFS}/${_486_KERNEL}" \
+ "/${INITFS}/${_486_INITRD}" \
+ "${LB_BOOTAPPEND_LIVE_FAILSAFE}"
+ fi
else
Grub_live_entry "Live system" "/${INITFS}/${DEFAULT_KERNEL}" "/${INITFS}/${DEFAULT_INITRD}" "${APPEND_LIVE}"
-fi
-
-if [ "${LB_BOOTAPPEND_LIVE_FAILSAFE}" != "none" ]
-then
- Grub_live_entry "Live system (fail-safe mode)" "/${INITFS}/${DEFAULT_KERNEL}" "/${INITFS}/${DEFAULT_INITRD}" "${LB_BOOTAPPEND_LIVE_FAILSAFE}"
+ if [ "${LB_BOOTAPPEND_LIVE_FAILSAFE}" != "none" ]
+ then
+ Grub_live_entry "Live system (fail-safe mode)" "/${INITFS}/${DEFAULT_KERNEL}" "/${INITFS}/${DEFAULT_INITRD}" "${LB_BOOTAPPEND_LIVE_FAILSAFE}"
+ fi
fi
_COUNT=0
Reply to: