[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#884588: live-build: Showing all kernels at grub menu when there is more than one kernel is not working



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?

After autodetect menu in grub.cfg / grub menu there was not
any specific menu for either amd64 kernel or 686 kernel.
And I remember having these menus back in the day.

   * What outcome did you expect instead?

I expected to have an additional amd64 kernel boot entry
and a 686 kernel boot entry.

   * Patch attached

I attach a patch that fixes this problem. It seems it was just a typo.

You can also find the same patch at:
* Repo: https://github.com/rescatux/live-build.git
* Branch: showing-all-kernels-at-grub-cfg-when-more-than-one-kernel


-- 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 ea4199e9cdb6ae57ce6b729e4b66066c56f18916 Mon Sep 17 00:00:00 2001
From: Adrian Gibanel Lopez <adrian.gibanel@btactic.com>
Date: Sat, 16 Dec 2017 22:18:21 +0000
Subject: [PATCH] Now grub.cfg shows all the kernel options Before this patch
 when you had more than two kernels it only showed the auto option.

---
 scripts/build/binary_loopback_cfg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/build/binary_loopback_cfg b/scripts/build/binary_loopback_cfg
index 00f537c48..7312adcd0 100755
--- a/scripts/build/binary_loopback_cfg
+++ b/scripts/build/binary_loopback_cfg
@@ -211,7 +211,7 @@ fi
 
 _COUNT=0
 for KERNEL in chroot/boot/vmlinuz-*; do
-	_COUNT=$(( $COUNT + 1 ))
+	_COUNT=$(( $_COUNT + 1 ))
 done
 
 if [ $_COUNT -gt 1 ]; then

Reply to: