Linux on a USB-stick

Sometimes it is handy to carry an operating system in your back-pocket. With Linux on a USB-stick you can! Create your own system configuration, add the software packages you like and boot into Linux from any (modern) PC, without compromising the existing operating system (like Windows or MAC-intel). Download now

The SLAX pocket OS is an easy to understand Linux system and is available in several versions. The simplest version is a text-only system called Frodo which will run from a 128MB stick. SLAX allows you to add other software packages called 'modules' and allows you to add your own scripts, configurations etc called 'rootcopy'. You are able to create your very own personalised Linux distribution and copy it to USB-stick in a few steps! Of course you can also create an ISO image for distribution on CD-ROM.

These small Linux distrubutions are also suitable for installing to harddisc. They could give your old PC a new purpose, as an emailserver, firewall, router, webserver or fileserver. They run from as little as 128MB memory and a 133Mhz processor!

Run Slax from USB with additional slax-modules - easy 10 step instruction:

1) Download an ISO image of Slax a small Linux distribution 100MB Linux
2) Format your USB stick to FAT format (use Windows to do this or download the HP format utility for USB sticks)
3) Download 'Extract now' to extract the ISO image (unzip) to the USB key
4) Copy all files in the boot/ directory (not the DOS directory) to the USB key's root (what you see when you access the USB key)
5) Edit the isolinux.cfg file in wordpad and replace all occurences of 'boot/' with '' (nothing) save this file as 'syslinux.cfg'. Edit the splash.cfg file and remove 'boot/' as well.
6) Copy additional modules from http://www.slax.org/ to the directory modules (for example vi, rsync, XAMPP, sendmail etc.)
7) Download syslinux and unzip it to a directory on your PC
8) Use the windows start menu, option 'Run' enter 'cmd' and go to the syslinux directory (cd .. moves you one directory up) and cd into the win32 subdirectory
9) Check what drive letter was assigned to your USB key - in this example we use D:
10) Enter syslinux -s D: to make the USB key bootable

That's it - now insert your USB-stick and switch on your computer, it should boot from the USB-key in Linux.
(check your BIOS settings and make sure boot from USB is enabled as first boot device)

Adding/creating your own Slax modules:

Slax is based on Slackware, the longest running Linux distribution. You can use Slackware packages on a Slax system.

1) Start Slax and open a terminal window as 'root'
2) Create the directory 'slackware' and enter the directory
3) Download or copy the package (tarball) from a slackware site
4) Unpack the tarball in the slackware directory: tar -xf slackware_package.tar (run gunzip first if package is compressed)
5) Enter command: makepkg your-slax-package.tgz
6) Enter command: tgz2mo your-slax-package.tgz your-slax-package.mo
7) Copy your-slax-package.mo to the directory /modules/ on the USB stick to load it during the boot process

If you would like to install/test the module without rebooting Slax, then enter the command: uselivemod /modules/your-slax-package.mo

Adding custom shell scripts and configuration files:

If you need changes to the standard SLAX system (like your network configuration) copy the modified files to the folder 'rootcopy' on your USB-stick and maintain the same directory structure. For example: if you have modified the file 'issue' in the directory /etc/, you would create a directory 'etc' in the folder 'rootcopy' on the USB-stick and copy the modified file 'issue' to the rootcopy/etc/ folder on the USB-stick. The next time you boot from USB-stick all the files in the 'rootcopy' folder are copied to the SLAX system (and existing files like 'issue' are overwritten).

Adding your custom splash bootscreen:

It is possible to replace the 1st bootscreen by one of your own design. The bootscreen is only capable of handling 14 colors, so keep your image simple. You will need a Linux system with GIMP installed and with default language 'en_US' selected in order to create the special bootscreen image. Take the following steps:

1) Copy the original bootscreen image named splash.lss from your USB-stick to your home directory
2) Enter the command: lss16toppm < splash.lss > splash.ppm
3) Open the splash.ppm image in GIMP and edit/change the image to your design
4) Reduce the image to 14 colors using the Menu 'Image / Mode / Indexed'
5) Save the image as splashnew.ppm (in RAW format)
6) Open the image in a texteditor and remove the 2nd line that mentiones 'Created by GIMP'
7) Delete or backup the 'old' splash screen named splash.lss
8) Enter the command: ppmtolss16 `#FFFFFFF=7` splash.lss
9) Copy the splash.lss file to your SLAX USB-Stick
10) Edit the splash.cfg file on your USB-Stick in a texteditor and change the welcome message

Changing the 2nd splash bootscreen is also possible, but a little more complicated. You will need to recompile the SLAX Linux kernel! Sounds difficult but it is actually quite simple - it only takes some time to compile. Just follow these steps:

1) Copy the 1st bootscreen image named splash.lss
2) Enter the command: lss16toppm < splash.lss > splash.ppm
3) Open the splash.ppm image in GIMP and edit/change the image to your design
4) Reduce the image to 224 colors using the Menu 'Image / Mode / Indexed'
5) Save the image as logo_linux_clut224.ppm (in ASCII format)
6) Download the following SLAX modules: Official_Development_module_5_1_4.mo and Kernel_sources_2_6_16_x.mo
7) Boot your SLAX system from USB stick (you need at least 300MB free space)
8) Insert the module by entering the command: uselivemod Official_Development_module_5_1_4.mo
9) Create a directory on your USB-stick called 'kernel'
10) Enter the command: mo2dir Kernel_sources_2_6_16_x.mo /kernel
11) Replace the logo_linux_clut224.ppm logo in directory /kernel/usr/src/linux/drivers/video/logo with your own
12) Enter the directory /kernel/usr/src/linux and enter the command: make bzImage
13) Rename the vmlinuz file on your USB-stick to vmlinuz_old
14) Copy the file bzImage in /kernel/usr/src/linux/arch/i386/boot to the USB-stick and rename it to vmlinuz

Creating your own SLAX ISO distribution:

Once you have created your optimum SLAX system with the modules you need, you probably want to distribute it like a real OS on CD-ROM or as an ISO download from your website. Take the following steps to create your own ISO image:

1) Copy all the modules in the directory 'modules' to your windows PC
2) Copy the enitre content from the 'rootcopy' folder to your windows PC
3) Download My_SLAX creator and follow the steps to create the ISO image

Of course it is also possible to create your own SLAX ISO distribution in Linux, in fact it gives you some more 'tweaking' options such as changing the boot splashscreen. Take the following steps to create your ISO from the Linux commandline:

1) Create two new directories, for example: mkdir /tmp/iso_old /tmp/iso_new
2) Copy the original SLAX ISO distribution you use as a basis to tmp: /tmp/slax.iso
3) 'Extract' the ISO image to the iso_old directory: mount -o loop /tmp/slax.iso /tmp/iso_old
4) Copy all the files to the iso_new directory: cp -R --preserve /tmp/iso_old/* /tmp/iso_new
5) You no longer need the original iso: umount /tmp/iso_old
6) Now you can edit, change, add modules, add the rootcopy files in the /tmp/iso_new directory
7) When completed cd to the /tmp/iso_new directory and create the new ISO: sh make_iso.sh /tmp/new_slax.iso
8) Copy the new ISO image to your USB stick or your PC
9) Burn the ISO image to CD-ROM

Install SLAX to harddisc:

SLAX is a live LINUX system and a lot of effort has been made to enable it to run from CD-ROM or USB-stick. However you might prefer to install it on your harddisc as a 'real' LINUX O/S and boot directly into SLAX. The changes you make in the system are there to stay and you no longer have the directory 'rootcopy' or 'modules'. The modules you included in your live-system will be 'embedded' into the real system. Download the script installhdd.sh and follow the instructions.

References:

http://www.slax.org
http://sipx-wiki.calivia.com/index.php/A_Kickstart_CD_for_sipX_on_CentOS#Changing_the_splash.lss_File
http://www.sweb.cz/Frantisek.Rysanek/splash/isolinux-splash-HOWTO.html
http://infonomicon.org/text/slax_kernel_logo_replacement.txt
http://www.slackbasics.org/html-singlepage/slackware-basics.html#email-sendmail
http://www.justlinux.com/nhf/Distribution_Specific/Slackware_Linux/Slackware__The_Quick_and_Dirty_Quide_to_Packages.html
http://www.geocities.com/slaxfansite

AttachmentSize
HPformatUSBstick.exe1.98 MB
extractnow.exe938.68 KB
syslinux-3.36.zip2 MB
MySLAX_Creator.exe2.11 MB
installhdd.zip1.56 KB