Is it possible to generate a usb boot image with GPT partitioning?

When I use the release NixOS ISOs to make a USB boot disk, it is not recognised by my 12th-gen Intel NUC at boot time; this is also the case for hand-rolled ISOs. My working hypothesis is that the machine (which does not support legacy boot at all) will only recognise GPT-formatted USB boot devices.

From what I can tell, the iso produced by nix-build -A -I nixos-config=modules/installer/cd-dvd/installation-cd-minimal.nix has a hybrid partitioning scheme: when I dd it to a disk, it shows as MBR, and the disk is not recognised at boot time. This is also the case with the release ISO images.

$ sudo dd if=result/iso/nixos-23.11pre-git-x86_64-linux.iso of=/dev/sda bs=1G
$ sudo parted -l 
Model: Corsair Force 3 SSD (scsi)
Disk /dev/sda: 120GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

If I write out an Ubuntu boot disk (which uses GPT), and then dd the partitions (root and EFI) from the NixOS boot disk over the Ubuntu partitions, the disk is recognised at boot time and boots correctly into the installer.

This is pretty hacky, but it seems to confirm the hypothesis that it is only the partitioning scheme which is the problem.

Is there a way to generate an ISO file which will use GPT partitioning when written to a USB boot disk?

1 Like

If it exists, you’ll probably find it here:

I imagine raw-efi will work?

Thank you, I will try that when I get back to the computer.

raw-efi does work, in that it produces a disk which the boot process recognises. It appears to crash shortly after boot because the console disappears (even with console=tty0) and the network never comes up, but my guess is that some combination of raw-efi and install-iso will work, so I’ll start tinkering there.

If I do get a fully-working invocation I’ll post here, but for now my original question is answered - thank you!


Having same issue. Managed to GPT on the drive using rufus, but then I run into this instead Unable to reach installation wizard when installing NixOs