Make Ubuntu 32-bit ISO image directly installable on UEFI machine

Bug #1648278 reported by UlfZibis
34
This bug affects 5 people
Affects Status Importance Assigned to Milestone
grub2-signed (Ubuntu)
Confirmed
Undecided
Unassigned
ubiquity (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Only with a workaround I can install Ubuntu 32-bit on a UEFI machine:
- First install Ubuntu 64-bit on a temporary partition.
- Then install Ubuntu 32-bit with ubiquity -b
- Start Ubuntu 64-bit and run update-grub.
- Start Ubuntu 32-bit.

To make Ubuntu 32-bit update-proof I can run:
sudo apt install grub-efi-amd64
sudo mount /dev/sda1 /boot/efi
sudo grub-install --efi-directory /boot/efi --force-extra-removable
After I can delete the temporary Ubuntu 64-bit installation

To make Ubuntu 32-bit again bootable with UEFI secure boot I can additionally run:
sudo dpkg --add-architecture amd64
sudo apt-get update
sudo dpkg --install Download/grub-efi-amd64-signed_1.66.2+2.02~beta2-36ubuntu3.2_amd64.deb
sudo dpkg-reconfigure grub-efi-amd64-signed
sudo grub-install
sudo apt-get install shim
sudo dpkg-reconfigure grub-efi-amd64-signed
sudo dpkg-reconfigure shim
sudo grub-install

Please make this possible directly with the Ubuntu 32-bit ISO image !

Rationale: The recommended 64-bit Ubuntu and 64-bit applications need up to 30 % more RAM so the pain of swapping occurs more likely and on UEFI-machines with few resources such as Netbooks. Their 64-bit applications often perform up to 30 % slower than 32-bit applications, e.g.: Firefox.

See also: bug 1650337, bug 1649167

Another WORKAROUND only using the 32-bit Live-image via "Try Ubuntu":

ubiquity -b

sudo mount /dev/sdaX /mnt # Ubuntu target partition sdaX
sudo mount /dev/sda1 /mnt/boot/efi # EFI-partition sda1
for dir in /dev /dev/pts /proc /sys /run; do sudo mount --bind $dir /mnt/$dir; done
sudo chroot /mnt /bin/bash

dpkg --add-architecture amd64
apt-get update
apt-get install grub-efi-amd64-signed
Optional: shim-signed
grub-install [--efi-directory /boot/efi]
update-grub
exit

In case of dual boot with Windows, in EFI-setup the boot order must me changed.
Surprisingly, there was a menu entry in NVRAM, even the configuration via efibootmgr is impossible, caused by missing efivarfs driver in the 32-bit kernel.

information type: Private Security → Public
Revision history for this message
UlfZibis (ulf-zibis) wrote :

I first declared this as security bug, because the standard 32-bit Ubuntu installation fails to benefit from secure boot.

UlfZibis (ulf-zibis)
description: updated
UlfZibis (ulf-zibis)
description: updated
UlfZibis (ulf-zibis)
description: updated
UlfZibis (ulf-zibis)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub2-signed (Ubuntu):
status: New → Confirmed
Changed in ubiquity (Ubuntu):
status: New → Confirmed
UlfZibis (ulf-zibis)
description: updated
Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Another workaround:
1) Boot with ubuntu-mate-amd64.iso.
2) Select "Try Ubuntu without installing" in grub. Don't press Enter.
3) Remove ubuntu-mate-amd64.iso and insert ubuntu-mate-i386.iso. Wait for a few seconds for the CD to be read; then press Enter in grub.

So we're using amd64.iso's grub to boot i386.iso.
The i386 live CD boots and /sys/firmware/efi is present, so ubiquity will know to create an efi partition etc. But there are two more bugs involved (which this report is about), which need to be worked around as well. So, from the live session and before running ubiquity:
4) sudo sed 's/-signed"/"/' -i /user/share/grub-installer/grub-installer
(so that grub-efi-amd64 is selected instead of the non-existing grub-efi-amd64-signed)
5) sudo ln -rsf /bin/true /bin/efibootvars
(so that grub-install doesn't fail when running efibootvars)

I did step (5) both in / and in /target; I'm not sure which of those two were necessary, but the system boots fine after the aforementioned steps. Of course since efivarfs isn't available, the boot order isn't customizable from within the 32bit Ubuntu.

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

I tested again, step (5) needs to be run in the /target, so here's an oneliner for both steps (4) and (5):

sudo sed 's/-signed"/"/' -i /usr/share/grub-installer/grub-installer; while [ ! -f /target/bin/efibootmgr ]; do sleep 1; done; sudo ln -sf true /target/bin/efibootmgr

After entering that in a terminal, ubiquity can be started and it finishes successfully.

Revision history for this message
UlfZibis (ulf-zibis) wrote :

Thanks for the alternative workaround. But I have some questions:
- What you mean by "in grub"? I'm not familiar with the Ubuntu Mate Live CD, only with Ubuntu and Lubuntu, and there is no GRUB menu. Do you mean the welcome screen?
- I'm wondering how this alternative will work on machines like mine where no CD drive is available. Does it also work with USB-key, especially if both ISOs are on the same key with MultiSystem?

description: updated
Revision history for this message
UlfZibis (ulf-zibis) wrote :

See also bug 1801372

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

@UlfZibis, sorry, for some reason I didn't get a notification about your message.

"in grub": when you boot Ubuntu Live CDs or USB sticks under UEFI, this grub menu shows:
https://askubuntu.com/questions/258991/where-is-the-memtest-option-on-the-ubuntu-64-bit-live-cd

- I don't know about "multisystem", it's possible that this is what breaks the normal ubuntu grub menu for you. You can use "dd" to create a usb stick from an .iso, that would properly show the grub menu.

Revision history for this message
UlfZibis (ulf-zibis) wrote :

@Alkis, thanks for being back again.

I never have seen this grub menu with Ubuntu Life media, even when burned to CD. The reason may be, that I regularly use MultiSystem since some years or never had a EFI machine in my hands before using MultiSystem (does this grub menu appear also on BIOS machines?).

But a problem remains ... I suspect, the "change media trick" will work with USB media instead CD media.

Maybe I can try your steps 4), 5) after booting via MultiSystem ... "Try Ubuntu" with 32-bit ISO.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.