Wednesday, December 10, 2008

Multi-booting from USB stick

While still looking for a better way to boot several OS distributions, I'm writing down the one I use with satisfaction.
There are a lot of how-tos about the topic on the web: they often contain steps which are distribution-specific, like renaming or moving folders to other locations, in order to avoid conflicts, for example. I dont'like it. I like, instead, a more general, systematic way:

  1. suitably partition (FAT filesystem) the usb drive:


    • the first primary partition, with the bootable flag set, reserved to hold some shared data (some operating system do recognize only the first one on removable media), and to hold a bootmanager to deal with the multi-boot scheme;

    • allocate (generally) one partition per distro to avoid conflicts;


  2. copy the distro (generally the content of an .iso image) on its devoted partition;

  3. install syslinux on that partition;

  4. edit "syslinux.cfg" accordingly; if the distro comes from a bootable .iso, most of the time it's enough to:


    • copy the "isolinux" folder over the "syslinux" one;

    • in the new folder "syslinux", rename "isolinux.cfg" to "syslinux.cfg";


  5. install a bootmanager, like Grub4DOS, to the master boot record of the bootable partition;

  6. in the bootmanager menu, add an entry for each partition to chainload its own syslinux.