Benutzer-Werkzeuge

Webseiten-Werkzeuge


Action disabled: source
linux:multi-boot-stick

Multi-boot USB-stick

Summary

This is a manual to build a bootable USB-stick with multiple systems using syslinux and iso-images.

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 how-to works for any system.
I'm just providing these information because it worked for me this way.
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/sdc
  5. install syslinux files:
    syslinux /dev/sdc1 # use the created partition here
  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
    syslinux.cfg
    # 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.

Comments

menu.c32 should also be copied to syslinux folder

1 |
Eanderalx
| 2012/09/26 15:52 | reply

added menu.c32

2 |
Andrwe Lord Weber
| 2012/09/26 16:06 | reply

Sorry but..

syslinux /dev/sdc1

Does not install the mbr, it only installs syslinux!!

To install the mbr you have to do:

dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdc

(in your case sdc and sdc1; in my case sdb and sdb1)

Ref: Based on http://etherboot.org/wiki/syslinux

3 |
pr.nizar
| 2013/04/18 02:50 | reply

Nice and neat. To boot off UEFI (eg. Mac books) rEFInd works great, I guess SysLinux would not. Btw rEFInd also works fine on all PCs with UEFI (not BIOS) boot firmware.

4 |
Kumar
| 2013/04/26 04:09 | reply

@pr.nizar: Thanks, added the command. Must have changed over the years like the path did too.

5 |
Andrwe Lord Weber
| 2016/12/07 18:08 | reply


E E᠎ O​ K O
linux/multi-boot-stick.txt · Zuletzt geändert: 2016/12/07 18:06 von Andrwe Lord Weber