Flash-drive OS

This week my boredom has lead me to install Linux on a flash drive.
Generally speaking this should be a fairly straight forward process. I thought I’d try it out because I was playing with Puppy Linux on qemu and found that it is in an option on their installer. Unfortunately for a reason unknown to me qemu on my laptop; which has been running Debian Sid for a while now (not because I like it, but because I haven’t been using my laptop much and can’t be bothered to change it!); wont pass access to usb drives to the virtual machine and so I couldn’t do the install without burning it to CD first, which seems a little pointless, not to mention a complete waste of a CD. I followed some instructions that told me to loop-mount the Puppy ISO and copy the files manually onto the flash drive and alter the syslinux.cfg to boot from the drive but for one reason or another my laptop refused to boot this botch-job and I started looking for other options. I feel the need to mention that the few people I spoke with on #puppylinux (freenode IRC) were not particularly friendly or helpful.
The next thing I tried, which I am using right now, is SLAX. SLAX is a live distro based on Slackware that you can download and easily install directly onto a flash drive. Installation was simply a matter of untarring file onto the drive then running a script to install lilo. Job’s a goodun. Before doing that I had already formatted the drive to VFAT and labelled it bootable when I was playing with Puppy, I’m not sure if this was neccessary, but the important thing is that it worked!

So here I am in SLAX. I have a fully-functioning KDE desktop (Version 3.5.9), which to be honest I think is a little over the top for a distro that runs off a usb-drive, but here we have it, and it all seems to function fine. There are a few apps that have been cut out, like Kedit for example, leaving just one option for each task. (There is also the option of fluxbox, which I found out later on, but the only way I could find of using it was to write a .xinitrc file. Inexperienced users would not know how to do this…) Kword is the word processor. Mplayer is installed with the Kplayer GUI. Also, juK for music playback. Kmail for email, which was easy to configure for my googlemail account. Konqueror is the web browser of choice and I was surprised to find that Adobe Flash 9 is installed by default, which is nice. Konqueror doesn’t really like all the Javascript on Facebook and Hotmail doesn’t work at all for the same reason. I like Konqueror and it’s a real shame that it sometimes lets itself down in this way (Something I’ve noted on Slackware 12.0 is that Konqueror is unstable… I may try recompiling kdebase to see if that solves it…).

SLAX, like most Linux distributions, boasts about it’s package management capabilities. They have designed a modular system whereby programs can be added to your system by placing lzm files in a particular folder on the flash drive and it unzips them appropriately in the filesystem making the program available. This is quite clever and it is pretty fast too. There doesn’t seem to be any mention of dependency resolution so I’m curious about if each package includes all the dependent files required… It reminds me of PC-BSD’s package manager, as described well on wikipedia… CLICK… over time there is potentially a lot of space wasted; not something I want considering I’m running this on a 1GB flash drive!
System stability is fairly good. I have managed to make it crash twice and when that happens you have to switch off and on again, I don’t know what the cause of the problem is… I did leave the SLAX running for about 12 hours so it could do some Folding@Home work and in that time klancher crashed. I could not solve this issue without rebooting.

There are two things that irritate me about SLAX. The first is that by default you do everything as the root user, which is unsafe, but also very un-linux-like. People are just too good at breaking things to be the root user all the time. Although the useradd command is available, and I experimented with this, there are no instructions for things like which groups the user needs to be added to etc. which makes it impossible for inexperienced users. The root password by default is toor, which it tells you on the screen every time you boot up. It doesn’t tell you how to change this, and so there’s no sort of security for if you’ve saved any passwords or browsing history on the disk. I can see how all this has come from basically making a flash copy of a live CD, but there are definitely different requirements that the SLAX team needs to consider for their flash-drive version simply because being root all the time is unsafe.
The second thing I don’t like is probably also a result of the way this system was developed is that although the file system exists when you are running the OS, it is only present in the compressed modular format on the disk itself. There is then a second filesystem, which is set out properly for all of the changes that you’ve made. This could be purely for space-saving reasons, or whatever, but if the filesystem were layed out properly on the disk as though it were a permanent drive then it would be easy to chroot into the system and fix things should they go wrong. With things this way I am not in a position whereby I cannot make my own updates or change the programs that are installed. I cannot simply remove Mplayer and install VLC, for example because Mplayer is in one of the bigger “modules” (packages).

In all I just don’t see what kind of service the creators of SLAX are trying to create, the more I play with it the more unfinished it appears to be and the website really doesn’t have a lot of information on it. I may continue playing with this and see where I get… alternatively I may try creating something myself, maybe based on Archlinux or T2. Watch this space…

Leave a Reply