Modifying Grub-Menu in Everything-netinst ISO

Hey, i try to make an usb- bootstick with my own kickstart- config.

Inspired by this script: Erratum/unattended.sh at master · cassamajor/Erratum · GitHub i am able to create a modified image with my ks.cfg on it.

The Problem is: i am modifying files
boot/grub2/grub.cfg
EFI/BOOT/grub.cfg
to extend the linux- line with parameter inst.ks to find my ks.cfg - but no matter, what i write into those files, the grub boot- menu won’t take those settings.

i guess there is something going on with the El Torito modified boot-record on that iso, because xorriso tell my so:

xorriso -indev Fedora-Everything-netinst-x86_64-43-1.6.iso -du / -- -toc 2>&1
...
Boot record  : El Torito , MBR protective-msdos-label grub2-mbr cyl-align-off GPT
Boot catalog : -not-found-at-load-time-
Boot image   : '/images/eltorito.img' , boot_info_table=on , grub2_boot_info=on
...

When extracting /images/eltorito.img from that iso i am not able to mount it as loop- device, so how could i edit the settings there?

sudo mount -t vfat -o loop eltorito.img mnt
mount: .../mnt: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error.

Daniel

I think El Torito might not be mountable with modern UEFI layout. You could try editing isolinux/isolinux.cfg, there should be append line and you could add inst.ks= to it

append initrd=initrd.img inst.stage2=hd:LABEL=Fedora-S-dvd-x86_64-43 rd.live.check
quiet inst.ks=hd:LABEL=Fedora-S-dvd-x86_64-43:/ks.cfg

Then try to mount and modify images/efiboot.img,
if you mount efiboot.img you should be able to access grub.cfg inside and add inst.ks= to the linux line. And then unmount it and use the modified image.

1 Like