↓Skip to main content
  1. Main/
  2. How-To/

Multi-Boot Stick

·
Table of Contents

Main #

I’ve looked for a way to build a multi-boot-stick which make it easy to update the used systems and got the idea to use iso-images because these can easily be replaced.

Warranty There is no warranty that this setup works for any system which provide the dependencies listed below. I'm just providing these information because it worked for me. If you have questions you can leave a message here but I decide whether I'll answer and help or not.

Requirements:

  • syslinux
  • memdisk: it’s an extensions for syslinux which is bundled with syslinux in some distributions like Arch Linux
  • mcopy: it’s part of mtools
  • mkfs.vfat: part of dosfstools
  • USB-stick :-D
  • Linux LOL

Installation #

  1. create a partition with enough space for all iso-images you want to boot

  2. set the boot-flag for this partition

  3. format the partition using vfat ⚠️ syslinux doesn’t support other filesystems for this use-case ⚠️

  4. install mbr:

    dd if=/usr/lib/syslinux/bios/mbr.bin of=/dev/sdX
    
  5. install syslinux files:

    # use the created partition here
    syslinux /dev/sdX1
    
  6. mount the partition and change to the mountpoint, there now has to be the file ldlinux.sys

  7. create the folder syslinux

  8. create the config-file syslinux/syslinux.cfg example config

    # Config file for Syslinux -
    # Default entry
    DEFAULT hdd
    PROMPT 0        # Change to 1 if you do not want to use a menu
    TIMEOUT 0       # 0 = disabled, value in 1/10 seconds
    
    # Menu Configuration
    # Either menu.c32 or vesamenu32.c32 must be copied to /boot/syslinux
    UI menu.c32
    #UI vesamenu.c32
    
    # Refer to http://syslinux.zytor.com/wiki/index.php/Doc/menu
    MENU TITLE Rescue Stick
    MENU COLOR border       30;44   #40ffffff #a0000000 std
    MENU COLOR title        1;36;44 #9033ccff #a0000000 std
    MENU COLOR sel          7;37;40 #e0ffffff #20ffffff all
    MENU COLOR unsel        37;44   #50ffffff #a0000000 std
    MENU COLOR help         37;40   #c0ffffff #a0000000 std
    MENU COLOR timeout_msg  37;40   #80ffffff #00000000 std
    MENU COLOR timeout      1;37;40 #c0ffffff #00000000 std
    MENU COLOR msg07        37;40   #90ffffff #a0000000 std
    MENU COLOR tabmsg       31;40   #30ffffff #00000000 std
    
    # boot tiny-core image
    LABEL tinycore
        MENU LABEL Tiny-Core
        LINUX memdisk
        INITRD ../tinycore-current.iso
        APPEND iso
    # boot Arch Linux image
    LABEL arch
        MENU LABEL Arch Linux
        LINUX memdisk
        INITRD ../archlinux-2010.05-core-dual.iso
        APPEND iso
    # boot GRML 32-Bit image
    LABEL grml32
        MENU LABEL Grml32
        LINUX memdisk
        INITRD ../grml_2011.05.iso
        APPEND iso
    # boot GRML 64-Bit image
    LABEL grml64
        MENU LABEL Grml64
        LINUX memdisk
        INITRD ../grml64_2011.05.iso
        APPEND iso
    # boot memtest
    LABEL memtest
            MENU LABEL Memtest
        LINUX ../memtest
    # boot Hardware Detection Tool
    LABEL hdt
            MENU LABEL HDT (Hardware Detection Tool)
            COM32 hdt.c32
    # reboot
    LABEL reboot
            MENU LABEL Reboot
            COM32 reboot.c32
    # Power off system
    LABEL off
            MENU LABEL Power Off
            COMBOOT poweroff.c32
    
  9. copy needed binaries into syslinux folder:

    sudo cp /usr/lib/syslinux/bios/{hdt.c32,menu.c32,reboot.c32,poweroff.c32,memdisk} syslinux/
    
  10. copy all iso-images to the mountpoint

That’s it.
I’ve tested this system with the images of tiny-core, archlinux dual-boot and GRML 32-Bit & 64-Bit.

Memdisk might sometimes hang without a reason while loading the image. In that case for me a reboot fixed it.