Editing USB Installer

I posted this to GitHub (because I think the documentation can be improved) but also just want some pointers as to how to fix this issue https://github.com/QubesOS/qubes-issues/issues/6104

I don’t know why I can’t edit the file on the USB drive. I can’t view it on my Mac, although on the Ubuntu machine I installed as a test, I have no problem viewing the files. I just can’t edit it.

The instructions are also more geared for Windows users rather than Mac or Linux.

Anyways, help would be appreciated.

Edit the file with sudo, you likely have the ISO’s EFI partition mounted as root (if using typical default mount options).

Here’s a full example of editing the Qubes 4.0.3 ISO (based on https://www.qubes-os.org/doc/uefi-troubleshooting/#change-installer-kernel-parameters-in-uefi) using gedit (replace with editor of choice; emacs, vim, ed)

[user@disp3929 ~]$ parted Qubes-R4.0.3-x86_64.iso unit B print
WARNING: You are not superuser.  Watch out for permissions.
Model:  (file)
Disk Qubes-R4.0.3-x86_64.iso: 4830789632B
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start    End        Size       Type     File system  Flags
 2      526336B  30461951B  29935616B  primary  fat16        esp

[user@disp3929 ~]$ sudo losetup -o 526336 --sizelimit 29935616 /dev/loop0 Qubes-R4.0.3-x86_64.iso

[user@disp3929 ~]$ sudo mount /dev/loop0 /mnt

[user@disp3929 ~]$ cd mnt
[user@disp3929 mnt]$ ls -l
total 24
drwxr-xr-x  3 root root  2048 Jan 20  2020  EFI
drwxr-xr-x  2 root root  2048 Jan 20  2020 'System Volume Information'

[user@disp3929 mnt]$ cd EFI/BOOT
[user@disp3929 BOOT]$ ls -l
-rwxr-xr-x 1 root root      672 Jan 20  2020 BOOTX64.cfg
-rwxr-xr-x 1 root root  2022228 Jan 20  2020 BOOTX64.efi
drwxr-xr-x 2 root root     2048 Jan 20  2020 fonts
-rwxr-xr-x 1 root root 20761372 Jan 20  2020 initrd.img
-rwxr-xr-x 1 root root  6618272 Jan 20  2020 vmlinuz

[user@disp3929 BOOT]$ sudo gedit BOOTX64.cfg
[user@disp3929 BOOT]$ cd /
[user@disp3929 /]$ sudo umount mnt
[user@disp3929 /]$ sudo losetup -d /dev/loop0

Thanks. I think that worked. Appreciate the direction.