Linux – Setting up LiveCD + USB drive boot combination for a headless server

linuxlive-cdraidsoftware-raidusb-flash-drive

I'm setting up a large software RAID array using MDADM, and don't want to waste a drive bay on a system disk. Unfortunately, the server I'm working with has trouble booting from a USB drive, so I'm attempting a workaround.

I want to create a LiveCD with Knoppix or some other suitable distribution, then use the USB drive as a mountable storage device to keep all my admin scripts etc on. I plan on running several services including:

Samba
SSH
SFTP
Subversion (SVNServe)

I'm used to running a headless Fedora server, and that would be ideal, but I'll take what I can get. Can anyone suggest a good approach for this problem? Specifically – an appropriate distribution to use, how to configure the LiveCD, and how to get it to automatically mount and run certain scripts on the USB drive?

Best Answer

I'd suggest using grml (Debian based Linux Live-CD, check out grml.org):

  • provides support for SW-RAID (mdadm) and LVM out of the box
  • boot with 'grml ssh=passw0rd' -> a ssh server will be automatically started for remote access using the specified 'passw0rd' for user 'grml'
  • if a device with label GRMLCFG is present (e.g. your USB drive) it will be automatically mounted and for automating tasks you can use a simple script named 'grml.sh' on it (which will be automatically executed if it's present)
  • the tool grml-terminalserver provides easy setup of booting via network/PXE (if booting via CD/USB/... isn't an option for whatever reason)
  • bootoption 'bootfrom=/dev/...' allows you to even mix booting from CD with USB :)

Disclaimer: I'm related to the grml project.