Use grub to make a BIOS/UEFI bootable USB flash
Posted: Fri 06 Dec 2019, 19:49
Do this to your USB Flash using gparted and grub-install from a linux distro:
Add this to the grub.cfg in the root of sdX1:
Add this to the /boot/grub/grub.cfg of sdX2:
A BIOS machine will boot directly to partition 2 (sdX2), and a UEFI machine will boot to partition 1 (sdX1) and get transfered to the grub.cfg on partition 2 (sdX2)
Those entries boot puppies and ISO's that are on the ext3 partition. This is really important with large ISO's as Grub4Dos requires them to be on a fat32 and occupy only 1 extent. Grub will boot regardless of how many extents.
So for multiple large ISO's, ext3 and grub works better.
Add this to the grub.cfg in the root of sdX1:
Code: Select all
set root=(hd0,msdos2)
configfile /boot/grub/grub.cfg
Code: Select all
set timeout=5
set default=0
# Boot a puppy example
menuentry 'BionicPup64 8.0' {
linux /BionicPup64/vmlinuz psubdir=BionicPup64 pmedia=usbflash pfix=fsck
initrd /BionicPup64/initrd.gz
}
# Boot an ISO file example
menuentry "linuxmint-19.2-mate-64bit ISO" {
set isofile="/ISOs/linuxmint-19.2-mate-64bit.iso"
loopback loop $isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile liveimg noprompt noeject quiet splash --
initrd (loop)/casper/initrd.lz
}
Those entries boot puppies and ISO's that are on the ext3 partition. This is really important with large ISO's as Grub4Dos requires them to be on a fat32 and occupy only 1 extent. Grub will boot regardless of how many extents.
So for multiple large ISO's, ext3 and grub works better.