It's easy to carry around useful files on a USB key, but it's even better to carry around a complete OS and set of apps, customised to just how want them. In this guide, Andrew Spode Miller shows how to install the tiny 25MB Slitaz Linux OS onto a USB key so that you can make any PC feel like your own.
* Once done, run ‘gparted,’ which will launch Gparted in a new window. It’s easy to use but make sure you’re working on the USB flash drive, not your hard disk. You can select which drive to work on in the top right hand corner of the screen, and you should be able to tell which disk is which as their capacities are clearly displayed. You should note down the device name too – for example /dev/sda – but remember this changes from computer to computer and depending on how many devices are in your machine.
STEP 5: PREPARING THE USB KEY
If there is any data on your flash disk that you want to keep, back this up, as all information will be wiped in the partitioning process.
* If you’re lucky, your flash drive will already be formatted as FAT32, in which case all you need to do is set the ‘boot’ flag to on. This is done by right clicking the partition, clicking ‘manage flags’ and ticking the boot box. If your drive has more than one partition, or it isn’t formatted, then delete the partitions and create a new FAT32 partition. This is all self explanatory through the menus – just right click on the drive in the main window to bring it up. When all is done, close the program.
STEP 6: INSTALLING SLITAZ
* Now it’s time to install Slitaz to your USB drive. From the terminal, type ‘tazusb gen-liveusb.’ When prompted, put in the device name you saw in Gparted - in my case /dev/sda1. When the process is finished, type ‘exit’ to return to the prompt, then ‘cd /media/flash/boot/syslinux’ to change to the USB drive, and ‘nano syslinux.cfg’ to edit our boot file.
* We’re going to add some text to the end of the the fifth line, which begins ‘append initrd=/boot/rootfs.gz.’ If like me, you’re always going to want Slitaz to run in English with a UK keyboard layout, add ‘lang=en kmap=en’ at the end of the line. If you had to install a driver for your network card, you can tell it to load on boot by putting ‘modprobe=mydriver.’
* Nano works like any file editing program, but you’ll find it will often drop a line of code down to the next line. This isn’t wanted, so if this happens, move to the beginning of the dropped line and press backspace to move it back to the end of the previous line. [b]The entire ‘append’ line must be a single line![/b]. When you’re done, press CTRL+o to save, and then CTRL+x to exit.
* At this point, you can remove the CD from your drive and boot from your USB drive. If all goes well, you should end up back at the login menu. Removing software is optional, but it will help reduce the size of the filesystem. The smaller the filesystem, the less RAM is needed.
* To remove unnecessary fripperies, load a terminal window and become root again by typing ‘su’ and providing the password ‘root.’ Then run ‘tazpkg recharge’ so Slitaz has a list of available software packages. Then use the command ‘tazpkg remove packagename’ to remove packages. I removed packages lighthttpd, sqlite, php, mtpaint, gcolor2, gitmail, grsync, rsync, lostirc and retawq as these are aimed at developers.