Several ISO's on one USB stick
Nils Kassube
kassube at gmx.net
Wed Apr 1 12:28:33 UTC 2015
Petter Adsen wrote:
> Is it possible to have several ISO images on one USB stick, and a boot
> menu to choose which one to boot from?
Yes.
> Does anyone know of a tool for
> Linux that can do this? I've found something that seems to do this,
> but it's only for Windows.
I don't know a special tool for it.
> It would be really convenient to have a USB stick with a few different
> Ubuntu images and other diagnostics tools, etc.
>
> I'm guessing that it is possible to set up GRUB to do this in some
> way, but I don't know it well enough to know how.
>
> Even if such a tool doesn't exist, I'd be really happy to get any tips
> on how to approach this with, for instance, GRUB.
My USB stick looks like this: It is formatted with FAT32 so that I can
also easily use it with Windows machines. IIRC I partitioned it with
gparted to get some extra space at the beginning for the grub files.
fdisk shows this layout:
Disk /dev/sdc: 8000 MB, 8000110592 bytes
255 heads, 63 sectors/track, 972 cylinders, total 15625216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e95bf
Device Boot Start End Blocks Id System
/dev/sdc1 * 16065 15615179 7799557+ b W95 FAT32
On the stick I have a /isos folder where the images are stored.
Furthermore I have installed GRUB to the stick to make it bootable and
in /boot/grub I have a grub.cfg file like this:
set timeout=10
set default=0
menuentry "Boot from harddisk (hd0)" {
insmod chain
set root=(hd0)
chainloader +1
}
menuentry "Kubuntu 14.04 amd64" {
loopback loop /isos/kubuntu-14.04-desktop-amd64.iso
linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=/isos/kubuntu-14.04-desktop-amd64.iso noeject noprompt debian-installer/language=de keyboard-configuration/layoutcode=de --
initrd (loop)/casper/initrd.lz
}
menuentry "Kubuntu 14.04 i386" {
loopback loop /isos/kubuntu-14.04-desktop-i386.iso
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/isos/kubuntu-14.04-desktop-i386.iso noeject noprompt debian-installer/language=de keyboard-configuration/layoutcode=de --
initrd (loop)/casper/initrd.lz
}
This doesn't start the images with the start menu from the image though.
Therefore I had to find out the extra boot options for the language and
keyboard. Otherwise it would use the default. In the past the linux line
was a bit different, so it may also change for newer versions than
14.04.
Nils
More information about the ubuntu-users
mailing list