glim
glim copied to clipboard
Hybrid USB ?
Having a look at https://wiki.archlinux.org/index.php/Multiboot_USB_drive, making a Hybrid UEFI GPT + BIOS GPT/MBR boot requires multiple partitions.
However currently the install script support only one partition :
alexv@alexv-XPS-Tablet:~/Projects/glim$ ./glim.sh
Found partition with label 'GLIM' : /dev/sdb1
Found block device where to install GRUB2 : /dev/sdb
ERROR: /dev/sdb1 isn't the only partition on /dev/sdb
Is this really an error ? Can we somehow improve the installation process to not complain about this, if it s not required ?
We could also have a part of the installation that is about formatting the drive in a proper, known, hybrid configuration, but I guess this can be some extra work for another issue.
Fuirthermore glim errors out when attempting to install grub during an EFI install:
❯ ./glim.sh
Found partition with label 'GLIM' : /dev/sde1
Found block device where to install GRUB2 : /dev/sde
Found mount point for filesystem : /mnt/glim
Install for EFI in addition to standard BIOS? (Y/n) y
Ready to install GLIM. Continue? (Y/n) y
Running grub-install --target=i386-pc --boot-directory=/mnt/glim/boot /dev/sde (with sudo) ...
Installing for i386-pc platform.
grub-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
grub-install: error: will not proceed with blocklists.
ERROR: grub-install returned with an error exit status.
Then when you do create the partition glim complains:
❯ ./glim.sh
Found partition with label 'GLIM' : /dev/sde2
Found block device where to install GRUB2 : /dev/sde2
ERROR: /dev/sde2 isn't the only partition on /dev/sde2
Glim already creates hybrid USB, with a single partition. But, it assumes a MBR table, not GPT. @asmodehn: this check is not necessary, although a second partition is neither necessary for hybrid boot. @joshuacox: this error comes from your USB stick being partitioned with GPT. This would require some additional steps to work.
If I'm not mistaken GLIM is not an hybrid USB with both GPT and MBR partition table, but just an MBR one. BUT GPT partition is not needed to boot in UEFI mode. (And if the computer in not UEFI able and you have only a GPT table you should have another special little partition to let some space for GRUB (second stage if I remember correctly)).
So as GLIM is working fine on UEFI, without any more information about what you want to achieve, I would say it's other engineered.
I'm going to close this, as GLIM does indeed already (now?) support both legacy and EFI boot. But the USB stick does need to be partitioned using MBR and not GPT, and contain a single FAT32 partition.