LINUX on a 128MB Stick
Easy to Configure - Full Server functionality
★ syslinux-3.36.zip ★ installhdd.zip ★ MySLAX_Creator.exe_.zip ★ extractnow.exe_.zip ★ HPformatUSBstick.exe_.zip ★
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).
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:
- Download an ISO image of Slax a small Linux distribution 100MB Linux
- Format your USB stick to FAT format (use Windows to do this or download the HP format utility for USB sticks)
- Download ‘Extract now’ to extract the ISO image (unzip) to the USB key
- 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)
- 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.
- Copy additional modules from http://www.slax.org/ to the directory modules (for example vi, rsync, XAMPP, sendmail etc.)
- Download syslinux and unzip it to a directory on your PC
- 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
- Check what drive letter was assigned to your USB key – in this example we use D:
- 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.
- Start Slax and open a terminal window as ‘root’
- Create the directory ‘slackware’ and enter the directory
- Download or copy the package (tarball) from a slackware site
- Unpack the tarball in the slackware directory: tar -xf slackware_package.tar (run gunzip first if package is compressed)
- Enter command: makepkg your-slax-package.tgz
- Enter command: tgz2mo your-slax-package.tgz your-slax-package.mo
- 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:
- Copy the original bootscreen image named splash.lss from your USB-stick to your home directory
- Enter the command: lss16toppm < splash.lss > splash.ppm
- Open the splash.ppm image in GIMP and edit/change the image to your design
- Reduce the image to 14 colors using the Menu ‘Image / Mode / Indexed’
- Save the image as splashnew.ppm (in RAW format)
- Open the image in a texteditor and remove the 2nd line that mentiones ‘Created by GIMP’
- Delete or backup the ‘old’ splash screen named splash.lss
- Enter the command: ppmtolss16 `#FFFFFFF=7` splash.lss
- Copy the splash.lss file to your SLAX USB-Stick
- 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:
- Copy the 1st bootscreen image named splash.lss
- Enter the command: lss16toppm < splash.lss > splash.ppm
- Open the splash.ppm image in GIMP and edit/change the image to your design
- Reduce the image to 224 colors using the Menu ‘Image / Mode / Indexed’
- Save the image as logo_linux_clut224.ppm (in ASCII format)
- Download the following SLAX modules: Official_Development_module_5_1_4.mo and Kernel_sources_2_6_16_x.mo
- Boot your SLAX system from USB stick (you need at least 300MB free space)
- Insert the module by entering the command: uselivemod Official_Development_module_5_1_4.mo
- Create a directory on your USB-stick called ‘kernel’
- Enter the command: mo2dir Kernel_sources_2_6_16_x.mo /kernel
- Replace the logo_linux_clut224.ppm logo in directory /kernel/usr/src/linux/drivers/video/logo with your own
- Enter the directory /kernel/usr/src/linux and enter the command: make bzImage
- Rename the vmlinuz file on your USB-stick to vmlinuz_old
- 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:
- Copy all the modules in the directory ‘modules’ to your windows PC
- Copy the enitre content from the ‘rootcopy’ folder to your windows PC
- 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:
- Create two new directories, for example: mkdir /tmp/iso_old /tmp/iso_new
- Copy the original SLAX ISO distribution you use as a basis to tmp: /tmp/slax.iso
- ‘Extract’ the ISO image to the iso_old directory: mount -o loop /tmp/slax.iso /tmp/iso_old
- Copy all the files to the iso_new directory: cp -R –preserve /tmp/iso_old/* /tmp/iso_new
- You no longer need the original iso: umount /tmp/iso_old
- Now you can edit, change, add modules, add the rootcopy files in the /tmp/iso_new directory
- When completed cd to the /tmp/iso_new directory and create the new ISO: sh make_iso.sh /tmp/new_slax.iso
- Copy the new ISO image to your USB stick or your PC
- 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://www.sweb.cz/Frantisek.Rysanek/splash/isolinux-splash-HOWTO.html
- There were more references, but the websites are no longer available
★ syslinux-3.36.zip ★ installhdd.zip ★ MySLAX_Creator.exe_.zip ★ extractnow.exe_.zip ★ HPformatUSBstick.exe_.zip ★