Package: calamares-settings-debian
Version: 11.0.5-2
Followup-For: Bug #980209
X-Debbugs-Cc: [email protected]

Dear Maintainer,
                This problem seems to be stemming from 
 calamares-settings-debian_all and from 
 calamares_i386, as maitained by the Debian project.
 The problems noted here do not show up in the amd64 versions.

   * What led up to the situation?
 Attempting to install a 32 bit Debian based distro (PeppermintOS) from the 
live ISO.

   * What exactly did you do (or not do) that was effective (or ineffective)?
  [ ineffective ] 
   During a normal install with no changes made in the live OS the process
 fails at 65% to 75% completetion with an error about grub-efi-amd64 not found. 
  `apt-get` is looking for a specific version of grub-efi (amd64)
 but this is 32 bit install and should be looking for grub-efi-ia32 instead.

 In the file `/usr/sbin/bootloader-config`, the script is attempting to install
 grub-efi-amd64 in any or every system, including the i386 version. 
 This package seems to be unavailable while installing an i386 based OS.
 Even though the board or VM might be 64 capable the amd64 packages are
 not available and erroneously trying to be installed.

[ less ineffective ]
   Changing part of /usr/sbin/bootloader-config to 
~~~
echo "Running bootloader-config..."

if   [ -d /sys/firmware/efi/efivars ] && [ "$(uname -m)" != "amd64" ]; then
    echo " * Installing grub-efi-ia32 (uefi)..."
    DEBIAN_FRONTEND=noninteractive chroot $CHROOT apt-get install -y 
--install-recommends grub-efi-ia32 cryptsetup keyutils
elif [ -d /sys/firmware/efi/efivars ]; then
    echo " * Installing grub-efi (uefi)..."
    DEBIAN_FRONTEND=noninteractive chroot $CHROOT apt-get install -y 
--install-recommends grub-efi-amd64 cryptsetup keyutils
else
    echo " * install grub... (bios)"
    DEBIAN_FRONTEND=noninteractive chroot $CHROOT apt-get install -y 
--install-recommends grub-pc cryptsetup keyutils
fi
~~~
 This Does help. It still gets an error, later in the process, complaining that 
the
 grub install routine has failed with the following message.
  `grub-install --target=x86_64-efi --efi-directory=/boot/efi/ 
--bootloader-id=debian --force`
 This is because the "efi_bitness" in 
/usr/lib/i386-linux-gnu/calamares/modules/bootloader/main.py 
 has set "efi_word_size" to "64" 

 In PeppermintOS we have changed the default behaviour of
 "Apt::Install-Recommends" from 1 to 0 .
 Adding "--install-recommends" in /usr/sbin/bootloader-config does install the 
recommended software.
 This gets mokutil, grub-efi-ia32-signed and the shim-signed packages needed to 
for EFI secure boot.
 Neither --install-recommends nor --no-install-recommends accomplishes
 anything in the test VMs. 

[ more effective ]
   In the file /usr/lib/i386-linux-gnu/calamares/modules/bootloader/main.py ,
 in the function "efi_word_size()" , forcing this value to "32", along
 with the previous edits will successfully complete the install without
 errors. 
   Although the calamares installer completes without error, 
 the system still fails to boot using grub-efi-ia32.
   Running `dpkg -l | grep -E "(grub|shim|mokutil|efibootmgr)"` shows the 
expected packages
 are installed.
   Running `ls /boot/efi/EFI/debian/` shows the expected files there 
 I have not had actual 32 bit hardware for testing , this has been in a Qemu 
VM. 

 For a follow-up I will have sourced a 32bit bare-metal machine with  EFI, 
 And will also try this on 64bit hardware, with efi_bitness still forced to 32.


   * What was the outcome of this action(s)?
 A partially installed system that can only be booted using rescue media.
 
   * What outcome did you expect instead?
 A fully installed system closely matching the amd64 version WITH grub-efi-ia32 
working. 

-- System Information:
 **** For the Host Machine ****
Debian Release: 11.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 
'stable'), (10, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-9-amd64 (SMP w/4 CPU threads)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages calamares-settings-debian depends on:
pn  calamares                                    <none>
ii  cryptsetup                                   2:2.3.5-1
ii  dconf-gsettings-backend [gsettings-backend]  0.38.0-2
ii  keyutils                                     1.6.1-2
pn  qml-module-qtquick-window2                   <none>
pn  qml-module-qtquick2                          <none>

calamares-settings-debian recommends no packages.

calamares-settings-debian suggests no packages.

Reply via email to