Home arrow Articles arrow Slax on an USB flash drive
Slax on an USB flash drive Print E-mail
Written by Cyril Jaquier   
Thursday, 03 November 2005
Slax top I bought a new USB flash drive. It is a 256MB, USB 2.0, cheap (30 CHF) and small one. I wanted to keep my SSH and GnuPG keys on it for security and practical reasons. I also installed a small "liveCD" Linux distribution in order to be able to boot a recovery system on almost every (new) computers.

I tried Damn Small Linux which seems to be quite popular. It is Debian (Knoppix) based and small enough (about 50MB) to stay on every USB flash drive. However, I use Slax, a Slackware based distribution. I installed Slax Popcorn Edition which is about 120MB.

I installed Slax on an ext2 filesystem and make it bootable with extlinux. I created a script to do all the step from downloading to making the flash drive bootable.

SlaxYou will always need a recovery system. Who never got a system which did not want to boot ? Now that USB flash drive are cheap and big enough to contain an operating system, it is a good idea to install a small Linux distro on such drives. These are small enough to be carried all the day in a pocket.

Slax Popcorn Edition is about 120MB. It contains XFce desktop, Mozilla Firefox, Beep media player, Gaim and AbiWord. A module functionality allows the user to install more applications, drivers or artworks. I added ipw2100, ipw2200 and kdb modules to my flash drive.

Slax Popcorn EditionI did not take the standard way to install Slax Popcorn Edition. I prefered using an ext2 filesystem and not a FAT one. It is a Linux system after all. So I used extlinux which boots from a Linux ext2/ext3 filesystem. I also created a script which do all the step from downloading the ISO to making the filesystem bootable.

slax-usb-installer

Requirements

  • root access
  • loopback device support (CONFIG_BLK_DEV_LOOP)
  • extlinux from Sylinux
  • wget
  • e2fsprogs (ext2/ext3 utilities)

Installation steps

  1. download the script from here. I assume you are logged as root.
  2. plug in your USB flash drive and unmount it if GVM or ivman has mounted it.
  3. create a Linux partition on your flash drive using fdisk. The size should be greater than or equal to 128MB. I assume your newly created partition is at /dev/sda1.
  4. find the latest version of Slax Popcorn Edition here.
  5. copy any custom modules or files. This step is optional.
    1. install boot loaded modules.
      1. make a directory named modules in the same directory as slax-usb-installer.
      2. copy the desired .mo into modules.
    2. install optional modules.
      1. make a directory named optional in the same directory as slax-usb-installer.
      2. copy the desired .mo into optional.
    3. install root copy files.
      1. make a directory named rootcopy in the same directory as slax-usb-installer.
      2. copy the desired files into rootcopy.
  6. launch the script with slax-usb-installer <device> <version>. Example:
    ./slax-usb-installer /dev/sda1 5.0.6
  7. reboot and see if it works. Do not forget to set your BIOS with correct settings for USB booting.
You should have a working Slax Popcorn USB flash drive now. Enjoy it. Remember that not all computer are able to boot on USB drives. My ASUS P4S8X has this option but I was unable to boot my Slax Popcorn with it. However, everything works well on my HP nx7000.

Do not forget to report bugs or improvements to me.
Last Updated ( Thursday, 03 November 2005 )
 
Valid XHTML & CSS - Design by ah-68 - Copyright © 2007 by Firma