Tuesday, April 30, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 16735  / 2 Years ago, tue, may 10, 2022, 3:41:29

I want to create a recovery flash drive. I have my 8 gb flash drive[Kingston data traveller] with me. I also have the required .iso files for a>Ubuntu 13.10 b>Boot-repair disk c>AVG Rescue CD



I Wish to create 4 partitions(3 for each bootable .iso and one for data storage. Also, I want a way in which I can select which OS to boot each time I boot from USB.



So, is there a way to install GRUB on USB as well as the three other live distros? And how to create such a setup?


More From » boot

 Answers
7

I have not used MultiSystem, but that one I have seen recommended as well as several others.
MultiBootUSB - Install and boot multiple Linux from Pendrive / Flash drive / USB disk w/grub2



https://help.ubuntu.com/community/InstallAndBootMultipleLinuxFromPendriveFlashDriveUSBDisk



See yumi for multi-boot versions



http://www.pendrivelinux.com/



But to understand it better you can just install grub2 to the flash drive, create your own grub.cfg with boot stanzas and copy ISO into flash drive. Very similar to a hard drive install like this link.



https://help.ubuntu.com/community/Grub2/ISOBoot



To install grub2 into a flash drive, default /media now varies depending on version. New version add the user to the path. Also assumes sdb as flash drive, confirm that is correct if not sure.
Label partition - if label is grub2 & mount:



sudo grub-install --root-directory=/media/grub2 /dev/sdb


Newer versions automount with $USER name also, this one labeled MC4GB, with user fred



sudo grub-install --root-directory=/media/fred/MC4GB /dev/sdb


In creating grub.cfg, the boot drive is always hd0, so if directly booting from flash drive setting will be hd0,Y where Y is partition usually 1.



loopback loop (hd0,1)$isofile


Otherwise examples are like these:



https://help.ubuntu.com/community/Grub2/ISOBoot/Examples



First entry in my grub.cfg in MC4GB



set default=0 
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
set gfxpayload=800x600

menuentry "Ubuntu 13.04" {
set isofile="/boot/iso/ubuntu-13.04-desktop-amd64.iso"
loopback loop (hd0,1)$isofile
linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile nomodeset
initrd (loop)/casper/initrd.lz
}

menuentry " " {
set root=
}


Note I added nomodeset to all entries as I have nVidia.
Also new versions now use vmlinuz.efi for both BIOS & UEFI boot. Older versions were just vmlinuz.
Other distributions may need different boot parameters. Find example in above example thread or mount and check what ISO has for its boot parameters.


[#28061] Thursday, May 12, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
enefiama

Total Points: 43
Total Questions: 125
Total Answers: 102

Location: Gabon
Member since Sat, Jul 25, 2020
4 Years ago
enefiama questions
;