Linux Boot with USB

Refered: Here

(Fat32) Slax USB Pendrive Install Method

This simplified walkthrough will illustrate how to install a SLAX compilation to a USB stick through Windows NT, XP, 2003.

Note: Use this method if your bios supports USB-HDD
boot (or USB-ZIP with the flash drive listed as a hard drive. Example:
generic USB-HDD0)

You’ll need the following:

  • 256MB or larger USB Stick (128MB will work w/Popcorn)
  • Live SLAX Linux compilation
  • HP USB Format utility (Used to format the stick)
  • Winrar (Or another ISO extractor)
  • Syslinux V3.11 (Fat32 now works)
  1. Download the HP USB tool and format your stick with the tool using the Fat32 option.
  2. Download the SLAX ISO
  3. Open your Slax ISO using winrar. Extract the files from the ISO to your USB stick.
  4. Open the boot directory on the USB stick and copy the files within to the root of the USB stick.
  5. Download and extract to a directory called syslinux311 on your computer.
  6. Run the command prompt in windows (start/run/cmd) and CD to the
    syslinux311 directory. Then CD again to the win32 directory within the
    syslinux311 directory. Once there simply type syslinux.exe F: (F: being
    the example drive letter of the USB stick in this system)
  7. Download the syslinux.rar file and extract the contained syslinux.cfg to your USB stick.
  8. Reboot your PC and go into your system BIOS and set your boot order
    to boot from a selectable USB device. (example USB-ZIP, USB-HDD)
  9. Save your BIOS settings. On the next reboot, you should have a sucessful launch of your USB Linux compilation.

There are many other options, but this was meant to be a simple
walkthrough to get you up and running and familiar with Linux on USB. ;)

* If you need any additional help making your flash drive boot, check out our BIOS boot options section or Tools Section.


Run GNU/Linux from a USB pen drive

Wednesday July 20, 2005 (09:01 AM GMT)

By: Juan Marcelo Rodríguez

You can carry GNU/Linux in your pocket with a functional, quick, and
useful USB pen drive distribution. Pen drives are faster than CDs, and
the small distros that fit on them don’t require huge amounts of memory
for the operating system and applications.

Slax is a powerful and complete bootable distro based on Slackware,
equipped with kernel 2.6, ALSA sound drivers, Wi-Fi card support,
X11-6.8.2 with support for many GFX cards and wheel mice, and KDE 3.4.
Slax uses the Unification File System
(also known as unionfs), which enables you to write whatever you want
into the pen drive. Bundled software includes KDE, the KOffice office
suite, GAIM for chat, the Thunderbird email client, and the Firefox Web

Slax comes in a variety of versions. You can get a minimal version
of Slax called Frodo, without big applications, that fits in 41MB, or
choose among the 200MB standard editions such as Killbill (which I use)
or PopCorn.

Configuration files

Slax allows you to modify your environment and save the changes to a
single file with the configurations. The list of directories saved and
restored include /etc, /root, /home, and /var. After saving your
session, you can later run it and use the same environment
configuration as before, without having to reconfigure every detail.

Slax even lets you upload configuration files to the Web. With this
option, the next time you boot Slax from wherever you are, you can get
the file from the Web. To use this feature, boot Slax with the
parameters boot: slax webconfig=YourPassPhrase where YourPassPhrase
is the secret passphrase you will use to protect your data. There are
some limitations with this system. You can save only 8MB in each
session, and the list of saved directories does not include every
directory of the operating system.

Ready to give Slax a try? Download an ISO image file and Syslinux, which you need to make the USB stick bootable.

Before you install Slax to your pen drive, I suggest you partition
your pen drive in two — one portion for the operating system and the
other for data. You can set the partitions as you wish, using cfdisk
or another partitioning utility. You need to set up a partition for the
operating system in the pen drive, with FAT16 as the filesystem. Plug
the pen drive in the machine but don’t mount it. If you don’t know
where your pen drive is, type dmesg and check its output for the mentioned USB device. Then run cfdisk /dev/sda where /dev/sda
is the pen drive. Create a new partition, give it FAT16 format, and
write the changes. Unplug the pen drive, plug it in again, and try cfdisk /dev/sda again to check that the partition exists and has the correct settings.

Installing Slax in the pen drive

Now you choose between two options. You can mount the downloaded ISO
image of Slax and follow a few steps, or you can burn the ISO image
file to a CD-ROM and use the Slax Installer application. I suggest the
first approach, because are some little things you must do to get Slax
in the pen drive ready. To do so, create a directory — say /slaxUSB —
on which to mount the ISO image file of Slax, then mount the ISO image:

mount -o loop slax-killbill-5.0.5.iso /slaxUSB/

Now, as root, mount the formated USB device:

mount -t vfat /dev/sda /mnt/sda/

Note that /mnt/sda/ can be any directory you want to use. Copy the
entire contents of the directory mounted with the ISO image to the
place where you have mounted the pen drive:

cp -ra /slaxUSB/* /mnt/sda/

The -r argument specifies a recursive copy including every directory, and the -a preserves as much as possible the structure of the data in the USB.

Now you need to copy some files in the folder /boot/ of the mounted
pen drive to the root of the pen drive so you can boot from it:

cd /mnt/sda/boot/
cp vmlinuz /mnt/sda/
cp initrd.gz /mnt/sda/

Move to the directory where the memory stick is mounted — in this
case /mnt/sda/ — and change the name of the file isolinux.cfg to
syslinux.cfg. Edit the just-renamed syslinux.cfg and delete /boot/ or
boot/ from the lines that contain vmlinuz and initrd.gz — for example, /boot/vmlinuz and /boot/initrd.gz. This changes the location of the files vmlinuz and initrd.gz, making them visible to the bootloader at the time of boot.

Finally, use whereis to check whether you have Syslinux installed. If not, download and extract it to a directory, then run:

syslinux -s /dev/sda

Where /dev/sda is the location of your recent modified Slax with all the files.

Now, reboot your computer, enter the BIOS, and change the boot
order. Set USB-ZIP as the first one, then the hard drive, and so on. If
your machine is old it’s possible that it won’t let you boot from USB,
in which case you can use a boot diskette or CD, or use Slax as a live

Other USB distros

In addition to Slax, you might care to try Damn Small Linux, Puppy Linux, or Feather Linux, all distros that take up less than 60MB of disk space.

Personally, I’m happy having Slax on my pen drive. It’s both functional and fun.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s