125 - Create a dual-partition USB boot drive using YUMI
YUMI allows you to make a multiboot USB drive. There are Windows and linux versions of YUMI.
It works by installing syslinux onto your USB drive partition as the boot manager. You can pick from a variety of different ISOs and YUMI will extract the files from the ISO and place them on your USB drive.
However, YUMI will only boot to one partition.
Here, I outline a way to create a two-partition Removable USB drive using YUMI and syslinux (with the help from grub4dos)
In this example I will use 4 ISOs
1. Wipe and partition and format a USB drive - create two Primary FAT32 partitions.
If you are a linux user, you can use gparted. If you are a Windows user, you can use a free tool such as Easeus Home Partition Master
Select the first partition in YUMI and choose your ISO.
You must select the type of distro first. If you want persistence and the option is offered, you can select that option and adjust the size using the slider.
Once you have added all three ISOs, quit YUMI.
You can test it now if you wish to make sure it boots and works. Note that some distros - e.g. Linux Mint will not boot from the USb drive if using a Virtual Machine.
3. If you are running Windows and have a Removable USB drive, Windows won't be able to access the 2nd partition, so we need to swap over the partitions
Run RMPrepUSB - select the USB drive in the Drive selection box and type CTRL+O (Drive - Set Windows accessible partition) - enter 2 when prompted and hit OK
You should now see that Windows can only see the 2nd partition.
4. Now run YUMI again and select the systemrescuecd-x86-4.1.0.iso (in this example) and complete the installation process.
If using linux, be sure to select the 2nd partition on the USB drive!
5. If you ran the Windows Step 3 above, now change back to the 1st partition by using RMPrepUSB - Ctrl+O again and enter 2
Ensure you can see the first partition again in Windows Explorer.
6. We now need to install grub4dos to the MBR:
Windows - Run RMPrepUSB - click the Install grub4dos button - Yes (MBR) - if prompted copy over the grldr file.
Linux - download grub4dos (use the latest version of 0.4.5c NOT 0.4.6a which is an Alpha version which may have bugs!)
Run bootlace --time-out=0 /dev/sdu (where sdu is your USB drive - e.g. sdc do NOT specify a partition such as sdc1, you must specify the drive)
copy the grldr file to the root of the first partition
7. We now need to make a grub4dos menu (\menu.lst) that will allow us to boot to either syslinux partition - here is a simple example:
title Boot to Partition 1\n Run syslinux from partition 1
title Boot to Partition 2\n Run syslinux from partition 2
The USB drive has one Master Boot Record (MBR) and two Partition Boot Records (PBRs)
MBR - contains grub4dos boot loader which loads the \grldr file which then looks for a menu.lst file
PBR1 - The first partition contains a boot loader which was written by YUMI which loads the \multiboot\ldlinux.sys file which then looks for a \multiboot\syslinux.cfg file (on the first partition only)
PBR2 - The 2nd partition contains a boot loader written by YUMI which loads the \multiboot\ldlinux.sys file which then looks for a \multiboot\syslinux.cfg file (on the second partition only)
You can see from the folder structure how YUMI has organised the folders: here is an example for the solydx distro
\multiboot\syslinux.cfg - main menu which loads \multiboot\menu\linux.cfg for linux menu
\multiboot\menu\linux.cfg - linux menu which loads \multiboot\solydx64_201407\isolinux\isolinux.cfg
\multiboot\solydx64_201407\isolinux\isolinux.cfg - contains menu entries for solyd
\multiboot\solydx64_201407\live - contains the squashfs files used for the 2nd boot stage of linux
Improving the menu
The first menu allows us to boot from either partition, but it would be nice to be able to boot directly to any of these payloads.
For example, the System Restore CD menu is rather awkward because we have to select the 32-bit boot option because we have the x86 32-bit version of the ISO. It would be nice if we could just boot directly to the System Restore distro...
First, we need to find the .cfg file. Examine the files on the 2nd partition (use RMPrepUSB - Ctrl+O if you need to swap partitions)...
The \multiboot\syslinux.cfg file leads us to /multiboot/menu/system.cfg
The \multiboot\menu\system.cfg file leads us to /multiboot/systemrescuecd-x86-4.1.0/isolinux/isolinux.cfg
This file contains menu entries such as (for the 32-bit menu entry):
MENU TITLE B) Standard 32bit kernel (rescue32) with more choice...
MENU LABEL 1. SystemRescueCd with default options
Boot standard 32bit kernel with default options (should always work)
We can translate this into a grub4dos menu like this:
title System Rescue 32-bit\nBoot standard 32-bit kernel with default options (should always work)
title System Rescue Alternative 32-bit kernel with console in high resolution (1024x768)\nBoot alternative 32-bit kernel with framebuffer console in high resolution\nKMS graphic drivers (Kernel-Mode-Settings) will be disabled.
title System Rescue Alternative 32-bit kernel with a standard VGA console (no KMS)\nBoot alternative 32-bit kernel and use standard low-resolution VGA\nconsole. KMS graphic drivers (Kernel-Mode-Settings) will be disabled.\nTry this if you can't get a working console or new a low-resolution mode
title System Rescue - console in 800x600\nBoot alternative 32-bit kernel and use standard graphic driver in 800x600\nKMS graphic drivers (Kernel-Mode-Settings) will be used if appropriate.\nUse that to get a 800x600 resolution and have a KMS compatible card.
title System Rescue Alternative 32-bit kernel with console in high resolution (1024x768)\n Boot alternative 32-bit kernel with framebuffer console in high resolution\n KMS graphic drivers (Kernel-Mode-Settings) will be disabled.
title System Rescue Alternative 32-bit kernel with a standard VGA console (no KMS)\n Boot alternative 32-bit kernel and use standard low-resolution VGA\n console. KMS graphic drivers (Kernel-Mode-Settings) will be disabled.\n Try this if you can't get a working console or new a low-resolution mode
title System Rescue - console in 800x600\n Boot alternative 32-bit kernel and use standard graphic driver in 800x600\n KMS graphic drivers (Kernel-Mode-Settings) will be used if appropriate.\n Use that to get a 800x600 resolution and have a KMS compatible card.