Tutorial on how to install Slackware 10.1 onto your 256mb USB pen drive. Sections 1. Configuring the drive. 2. Installing Slackware. 3. Booting the drive. ********************************* Section 1. Configuring the drive. First of all, we need to create a new partition for linux on our USB drive. Just about every pen drive you can buy from the store, comes formatted as a ms-dos/windows v-fat partition. You can mount the drive simply by typing the following command. # mount /dev/sda1 /mnt/usb Where /mnt/usb is the target directory that you want to mount your drive to. For our purposes, we will need to reformat the drive to a Linux ext2 partition. Login as root and do the following to setup the drive. # cfdisk /dev/sda A program will open up, and you will see the sda1 vfat partition. Scroll through the options using the arrow keys and select delete. Now select the 'Create' option. You will be prompted for Primary or Logical, select Primary. Now select the Bootable option to toggle the boot flag. Next, select the type option and enter number 83. Finally 'Write' the partition to the drive, and exit. You now have the partition setup, and it's time to make the file system. # mkfs /dev/sda You can enter the cfdisk again to verify that everything is correct. You should see something like the following... Name Flags Part Type FS Type [Label] Size (MB) ------------------------------------------------------------------------------ sda1 Boot Primary Linux ext2 256.75 You now have a fully working ext2 formatted USB drive. To mount it to /mnt/usb type # mount -t ext2 /dev/sda1 /mnt/usb ******************************** Section 2. Installing Slackware. Stick in your Slackware 10.1 cd #1 into your cdrom and reboot the computer. Follow the instructions printed on the screen, and skip the part where it tells you to partition your drive using fdisk/cfdisk, because our drive is already setup. When it prompts you for a target drive enter /dev/sda1. While chosing packages, you don't want to go too overboard especially if your USB drive is less than 512 mb. I used the 'menu' package selection to chose my packages. The list of packages, that I installed onto my first 256 mb drive, is available at http://m-net.arbornet.org/~stderr/packages.txt With only those packages installed it took up almost 250 mb space, so I just used an existing partition on my hard drive (/dev/hda6) as /home, so I would have space to save files. Another USB drive would also do the job for a home directory, but it would probably be something like /dev/sdb1. Note: You may want to try installing lilo to the Master Boot Record (MBR) of /dev/sda. It may make booting your drive easier assuming your computer can boot up a USB drive directly. ***************************** Section 3. Booting the drive. This was the part of the installation that gave me the most problems. I first tried to setup lilo on the MBR as mentioned above, but had no luck with that. I also tried adding an option to my existing lilo configuration on my main hard drive, but that also came up short. This is probably the easiest way to get your drive up and running. RUNT Linux, based on zipslack, is made specifically to run on USB drives formatted with ms-dos/windows vfat. They have a floppy disk image that works perfectly with this type of configuration as well. You can download the floppy image from their page or from my mirror, both are listed below. That's it, if you followed these steps you should have a small portable linux distrobution. Boot Floppy Links: http://www.ncsu.edu/project/runt/runtboot40.img http://m-net.arbornet.org/bootfloppy.img ************************************************** Thanks for taking the time to read this article. -stderr Questions/Comments/Suggestions I can be reached at stderr.dev@gmail.com Note: I actually wrote this guide while on my USB linux, using the joe text editor.