How to boot multiple CDs from a USB stick (with ext2 partitions)

If you’ve read my previous post about booting multiple CDs from a USB stick and the one before it, you know that I need to have multiple live or installer CDs with me almost all the time, and instead of carrying 10 CD with me I intend to only have a USB stick.

The previous solutions were based on partitioning the stick and then formatting the partitions with FAT-16 filesystems. This has some disadvantages, like not allowing Unix access rights, but the biggest of all is no support for symlinks.

Most of the live CD’s are kind enough to not use symlinks, as they expect to be run from FAT-16 partitions off USB sticks, but not all. The most important “criminal” that I found is Debian Installer (and Ubuntu, of course), which point the “stable” symlink to the release nickname. If the symlink is missing, the installation process stops.

Digging a little more on the syslinux wiki, I stumbled upon the (final?) solution to my problems: extlinux. Extlinux uses the same config file format as isolinux and syslinux, and can boot off ext2 and ext3 partitions. This means symlinks to keep the installers happy!

So here is my new and improved solution, based on my previous post (so keep that tab open too, for reference):

Step 0. (not changed)

Step 1. (not changed)

Step 2. Except the first partitions or any documents/files partitions that you need to access also from other operation systems, the partitions that will hold the CD data should be marked as ext2/Linux default (it is the default option in cfdisk and fdisk).

Step 3. Format the partitions as ext2 (except the first one):

# mkfs.vfat -n BootFiles /dev/sdc1
# mkfs.ext2 -L SysResCD /dev/sdc5
# mkfs.ext2 -L UbuntuSvr /dev/sdc6

Step 4. (not changed)

Step 5. Make the menu system avaiable to extlinux. This is easier than for syslinux, extlinux is smarter so we only need to copy one file:

# cd /tmp/part5/boot/isolinux
or
# cd /tmp/part5/isolinux
(depending on the case)
# cp isolinux.cfg extlinux.conf

Repeat for all your partitions (in that example /tmp/part5 is the mount point I used).

Step 6. We install extlinux on each partiton. Extlinux installs on a monted partition, so make sure everything is mounted (they should be mounted from the previous steps, but anyway…):

# mount /dev/sdc5 /tmp/part5
# extlinux -i /tmp/part5/isolinux
or
# extlinux -i /tmp/part5/boot/isolinux
(depending on the case)

Step 7. (not changed)

Step 8. (not changed)

And that’s all. You should not have a USB stick that can boot live CDs or installers that use symlinks, without touching the CD files too much.

There is a caveat though: at least one installer does not support the ext2 filesystem in the initrd. It’s the one that starts with “D” and ends with “ebian”. Yes, idiots. Adding ext2 support in the initrd will be the subject of another blog post.

Enjoy! And let me know what you think, in the coments section.

Image credit: Anton Fomkin.

TwitterFacebookLinkedInGoogle ReaderYahoo MessengerEmailGoogle GmailYahoo MailPrintShare

Related posts:

  1. How to boot multiple CDs from a USB stick (improved solution)
  2. How to boot multiple CDs from a USB stick

4 comments

  1. [...] any distribution which uses Debian-Installer (Debian, Ubuntu and derivatives) using my method for booting multiple CDs from a USB stick (with ext2 partitions) (see also the version with FAT16 partitions, you most likely encountered the error “No common [...]

  2. [...] you’ve read my posts about booting CDs from a USB stick (with ext2 partitions too) and the problems that I encountered, you know that I was pretty pissed-off by the Debian guys, who [...]

  3. [...] (usually, a USB stick image) to check it out – for example, I want to check that my method of booting multiple CDs from a USB stick works ok. Rebooting my computer every time I do changes is annoying, so I decided to use VirtualBox [...]

  4. [...] following this blog, you know that I like to store my live / rescue / installation CD’s and boot them from a single partitioned USB stick. Also, while creating the USB images, I preffer to test the raw disk image files in VirtualBox [...]

Leave a Reply

Your email address will not be published. Required fields are marked *

*


− two = 7

CommentLuv badge