0

TL;DR

My customized Ubuntu Live Installer USB Stick shows the customized menu option in Legacy BIOS mode on my old laptop but not in UEFI BIOS mode on my new laptop.
Why, and how do I fix this?

Question and Context

I have taken the original Ubuntu 18.04 Desktop iso and modified it to contain some scripts, a different background image, my preseeding file, and a very slightly modified python script. I doubt that my issue has to do with any of that, but that's the context and if you'd like to know more, see my writeup here.
The important point is: I have modified isolinux/isolinux.cfg so that the first screen I see when I boot from the USB Stick shows me an additional install option that is selected by default and has a few additional boot arguments.

It worked fine on my old laptop with Legacy BIOS, but was not recognized as bootable by my new laptop with UEFI BIOS. Since using Legacy BIOS mode on it could cause issues with the already-installed OS's, I recreated my iso so that it should work with both modes using xorriso as outlined here:

sudo apt-get -y install isolinux xorriso
sudo xorriso -as mkisofs \
  -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin \
  -c isolinux/boot.cat \
  -b isolinux/isolinux.bin \
  -no-emul-boot \
  -boot-load-size 4 \
  -boot-info-table \
  -eltorito-alt-boot \
  -e boot/grub/efi.img \
  -no-emul-boot \
  -isohybrid-gpt-basdat \
  -o /path/to/tmp.iso \
  /path/to/tmp

I have run that on the live system of a clean Ubuntu 18.04 Desktop stick. And then dd'd it onto a different USB stick:

sudo umount /dev/sdb1
sudo dd bs=4M if=/path/to/tmp.iso of=/dev/sdb

Now, after having set the new laptop's BIOS to UEFI Only Mode, it boots fine into grub, though it looks quite different when compared with how it looks on the legacy BIOS laptop. Most importantly: My custom option is missing.

I am aware that those pictures are quite grainy, but the differences are clear:

Legacy BIOS (old laptop)UEFI BIOS (new laptop)

When I press e and edit the Install Ubuntu option's boot arguments, it does (mostly) what I expected. Here are those arguments as specified in isolinux.cfg.

# D-I config version 2.0
# search path for the c32 support libraries (libcom32, libutil etc.)
path 
include menu.cfg
#default vesamenu.c32
default install
prompt 1
timeout 50
ui gfxboot bootlogo

label install
  menu label ^LucidBrot 18.04 v72 (prod)
  kernel /casper/vmlinuz
  append auto=true file=/cdrom/preseed/my.seed boot=casper debug-ubiquity automatic-ubiquity initrd=/casper/initrd DEBCONF_DEBUG=5 debian-installer/locale=de_CH.UTF-8 keyboard-configuration/layoutcode=ch languagechooser/language-name=English countrychooser/shortlist=CH localechooser/supported-locales=en_US.UTF-8 ---

How can I make my custom option appear on the UEFI mode boot selection screen?


Additional Notes

  • I have simplified my story above a bit. It is possible that some permissions in the files before creating the iso have been messed up while I was copying things around from one machine to another. I mention this in case that could be a culprit.

  • When I press e and edit the Install Ubuntu option's boot arguments, it does (mostly) what I expected.

    mostly what I expected, but not completely: I have added a script that replaces the original orange bionic-beaver background of the live installer (not the target system) with a blue version of it for testing purposes. This works fine on the Legacy BIOS on both my old and my new laptop, but on the new laptop running in UEFI Mode, it is instead shown as a single-color blue background.
    As far as I can tell, any other preseeding I did does work as expected when run with the boot arguments added manually.

  • Secure Boot is currently disabled

lucidbrot
  • 1,311
  • 3
  • 18
  • 39

1 Answers1

0

Writing this question out like that made the suggested "Similar Questions" suddenly help a lot.
For anybody with the same problem:

Edit boot/grub/grub.cfg to contain the same entry as you have in isolinux/isolinux.cfg but use different syntax:

menuentry "Custom Install yey" {
    set gfxpayload=keep
    linux   /install/vmlinuz auto=true file=/cdrom/preseed/my.seed --
    initrd  /install/initrd
}

set gfxpayload=keep means it won't modify the choice of text vs video graphics.

Place any additional boot arguments on the line that starts with linux.

I have placed my custom entry at the top, right below the line that sets the timout. It has now automatically become the default option.

lucidbrot
  • 1,311
  • 3
  • 18
  • 39