[Solved] multiboot USB stick

Here is an interesting solution for you, if you need more than one distribution on USB stick. Also if you want to save packages or more information on the stick.

Step 1
Format the Stick.

mkfs.ext2 -L MULTIBOOT /dev/sdX1
IF the stick has no partition you can correct it with ‘fdisk /dev/sdX’. I think newly selled sticks have always a partition one with vfat. This works also. But if you need nothing to copy from a windows computer it is easier to use an ext file format.

Step 2
Mount the stick.

mount /dev/sdX1 /mnt

Step 3
Make the stick bootable.

grub-install --force --no-floppy --boot-directory=/mnt /dev/sdX

Step 4
Copy all ISO images you want onto the stick.

Step 5
Copy a grub.cfg file into /grub/ folder on stick like this:

[code]menuentry “Parted Magic 32bit, 2012” {
set isofile=“pmagic_2012_2_19.iso”
loopback loop /iso/$isofile
linux (loop)/pmagic/bzImage iso_filename=/iso/$isofile edd=off noapic load_ramdisk=1 prompt_ramdisk=0 rw loglevel=0 max_loop=256 keymap=de-latin1 de_DE
initrd (loop)/pmagic/initrd.img
}

menuentry “Finnix 110 32bit, Mai 2014” {
set isofile=“finnix-110.iso”
loopback loop /iso/$isofile
linux (loop)/boot/x86/linux findiso=/iso/$isofile load_ramdisk=1 prompt_ramdisk=0 rw loglevel=0 toram –
initrd (loop)/boot/x86/initrd.xz
}

menuentry “Grml 2014.11, 64bit” {
set BOOTID=“grml64full201411”
set isofile=“grml64-full_2014.11.iso”
loopback loop /iso/$isofile
loopback loop /iso/$isofile
linux (loop)/boot/grml64full/vmlinuz findiso=/iso/$isofile locale=de_DE console-setup/layoutcode=de apm=power-off gfxpayload=1024x768x16,1024x768 boot=live live-media-path=/live/grml64-full/ bootid=$BOOTID nomce noeject noprompt lang=de grml2ram –
initrd (loop)/boot/grml64full/initrd.img
}

menuentry “SystemRescueCD 4.4.1, i686” {
set isofile=“systemrescuecd-x86-4.4.1.iso”
loopback loop /iso/$isofile
linux (loop)/isolinux/rescue32 isoloop=/iso/$isofile locale=de_DE console-setup/layoutcode=de toram
initrd (loop)/isolinux/initram.igz
}

menuentry “Backbox 4.0, 64bit” {
set isofile=“backbox-4.0-amd64.iso”
loopback loop /iso/$isofile
linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=/iso/$isofile locale=de_DE console-setup/layoutcode=de toram quiet splash noeject noprompt nopersistent –
initrd (loop)/casper/initrd.gz
}

menuentry “Lubuntu 14.04.1, 64bit” {
set isofile=“lubuntu-14.04.1-desktop-amd64.iso”
loopback loop /iso/$isofile
linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=/iso/$isofile locale=de_DE console-setup/layoutcode=de toram quiet splash noeject noprompt nopersistent –
initrd (loop)/casper/initrd.lz
}

menuentry “Linux Mint 17 MATE, 64bit” {
set isofile=“linuxmint-17.1-mate-64bit.iso”
loopback loop /iso/$isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/iso/$isofile locale=de_DE console-setup/layoutcode=de to quiet splash noeject noprompt –
initrd (loop)/casper/initrd.lz
}

menuentry “Netrunner 14, 64bit” {
set isofile=“netrunner-14-dvd-64bit.iso”
loopback loop /iso/$isofile
linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=/iso/$isofile locale=de_DE console-setup/layoutcode=de noeject noprompt nopersistent –
initrd (loop)/casper/initrd.lz
}

menuentry “Kubuntu 14.04.1, 64bit” {
set isofile=“kubuntu-14.04.1-desktop-amd64.iso”
loopback loop /iso/$isofile
linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=/iso/$isofile locale=de_DE console-setup/layoutcode=de toram quiet splash noeject noprompt nopersistent –
initrd (loop)/casper/initrd.lz
}

menuentry “Ubuntu 14.04.1, 64bit” {
set isofile=“ubuntu-14.04.1-desktop-amd64.iso”
loopback loop /iso/$isofile
linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=/iso/$isofile locale=de_DE console-setup/layoutcode=de toram quiet splash noeject noprompt nopersistent –
initrd (loop)/casper/initrd.lz
}

menuentry “Scientific Linux 6.6, 64bit, LiveMiniCD” {
set isofile=“SL-66-x86_64-2014-11-09-LiveMiniCD.iso”
loopback loop /iso/$isofile
linux (loop)/EFI/boot/vmlinuz0 root=live:LABEL=SL-66-x86_64-LiveMiniCD rootfstype=auto ro liveimg quiet rhgb
initrd (loop)/EFI/boot/initrd0.img
}
[/code]

All these distros are working. After updates you need only to correct the variable ‘isofile’ inside the GRUB menu definition.

A nice feature is to let distros boot into RAM and to boot with the right language. If you have less than 3GB of RAM you must remove the ‘toram’ parameter for the most distros. This is also possible after the GRUB menu pops up.

Usage
Put the stick in the USB port.
Switch on the computer.
Press multiple times F8 if the computer begins to work. In some cases it could be a different function key.
The BIOS/UEFI pops up the list of devices[**]. Select the stick.
The GRUB started and brings up the GRUB menu.
Select your distribution.

[**] If the device list didn’t pop up it is deselected in the BIOS/UEFI.

The selection of the distros tells you this is a nice tool stick also for preparing the disk and solving problems if the computer breaks down. Also for showing these distros your friends. The fastest boot is the nice little finnix distribution. On my old pc it will boot in 35 seconds into RAM. For all these distros together you need a 8GB stick. More I haven’t tested yet. But this. Netrunner 4.2.1 won’t run.

If you are interested in these distros have a look at www.distrowatch.org.

[color=#000080]Muchas Gracias, esperaré una oportunidad para probarlo.[/color]
:cool:

I have updated the grub.cfg in the first post.

This ist the list of distributions I am using on my service stick:

Parted Magic 32bit,
Finnix 110 32bit,
Grml 2014.11, 64bit,
SystemRescueCD 4.3.0, i686,
Lubuntu 14.04.1, 64bit,
Linux Mint 17.1 MATE, 64bit,
Netrunner 14, 64bit,
Kubuntu 14.04.1, 64bit,
Ubuntu 14.04.1, 64bit.