How to install SLAX (a Live CD distribution) to a USB stick.
To install SLAX, get the latest version from http://www.slax.org/download.php.
SLAX has many versions of the same distribution,
with certain differences in apps and size.
Select among Frodo, Standard, Popcorn or KillBill editions.
We used the slax-popcorn-5.1.8.iso edition of 115MB with XFCE.
To start with, switch to a root console and enter your password for the root user:
$su root
Password:
Mount the ISO image file of SLAX using the loopback device.
In our case, we called the mount directory /mnt/iso. Here is the command we used:
#mount -o loop slax-popcorn-5.1.8.iso /mnt/iso/
Format the USB pendrive to use FAT16.
We assume your USB drive is located at /dev/sda and has only one partition.
#/sbin/mkdosfs -F 16 /dev/sda1
After you have a bootable and formated FAT16 partition in the pendrive, mount it.
In our case we used a mount directory at /mnt/usb:
#mount -t vfat /dev/sda1 /mnt/usb/
Copy all the files from the directory /mnt/iso/, where you mounted the ISO of SLAX,
to the mounted pendrive:
#cp -rav /mnt/iso/* /mnt/usb/
Synchronize the data:
#sync
And go to the pendrive location (/mnt/usb):
#cd /mnt/usb/
Now, copy the files vmlinuz and initrd.gz to the root directory,
where you mounted the pendrive,
in our case from the directory /mnt/usb/, and do:
#cp boot/vmlinuz .
#cp boot/initrd.gz .
Now we need to make some changes to the isolinux.cfg file.
All instances of boot/vmlinuz are to be replaced with vmlinuz,
and all instances of boot/initrd.gz are to replaced with initrd.gz.
The updated file is to be stored in syslinux.cfg, and we can then remove the old
isolinux.cfg.
#sed -e 's/boot\/vmlinuz/vmlinuz/g' -e 's/boot\/initrd.gz/initrd.gz/g' isolinux.cfg >syslinux.cfg
#rm isolinux.cfg
Use syslinux to make the pendrive bootable:
#syslinux -s /dev/sda1
SLAX is now installed. Enjoy it. Umount the pendrive and reboot.
Change your BIOS to boot from the USB pendrive before booting up again.
Note: SLAX in its version 5.1.8 provides an install script called make_disk.sh
which can copy all the SLAX-files to the pendrive and which then uses
LILO to install the master boot record on the pendrive. This should result
in a bootable USB stick, too. But when we tested it, it wouldn't boot,
so it appears that the make_disk.sh still has some problems.
|