Markds posted an excellent howto in slax forum on how to install slax to usb using extlinux and keep nice graphics
http://www.slax.org/forum.php?action=vi ... ntID=37939
by markds
There have been several problems with "changes" on FAT32 installations of slax on USBs or HDDs, where slax gets corrupted on boot up. The solution has always been to remove the "changes" directory and reboot, effectively making one lose all their modifications, etc. The other alternative was to create a ext2/ext3 partition just for the "changes" which avoided the need for the posixvol overlay, which in many cases was the cause of the corruption.
In all these cases, slax is installed by copying the boot/ and slax/ folders to a FAT32 partition and running bootinst.bat or bootinst.sh. There was no option to copy the boot/ and slax/ folders to an ext2/ext3 partition and run a script to make it bootable. By using EXTLINUX, this becomes possible. EXTLINUX is essentially the same as SYSLINUX but works on ext2/ext3 partitions. It allows full access to the menu system so you don't lose anything.
1) Boot up from your slax CD (in this eg, the slax CD is /mnt/hda/)
2) Determine what your USB or HDD device is (in this eg, I will use /dev/sdb), create a partition on the device and format the partition to ext3 using g-parted or cfdisk (search the forum on how to do this). Then mount the partition :
3) Download the latest syslinux from http://www.kernel.org/pub/linux/utils/b ... .74.tar.gz and save it to /tmp or where ever.Code: Select all
mkdir -p /mnt/sdb1; mount /dev/sdb1 /mnt/sdb1
4) Untar-gz syslinux-3.74.tar.gz and you will have a syslinux-3.74 directory
In the syslinux-3.74 directory there is an extlinux directory. In the extlinux directory is the extlinux binary (already compiled for you).Code: Select all
tar -zxf syslinux-3.74.tar.gz ls syslinux-3.74/ syslinux-3.74.tar.gz
5) Copy the boot/ and slax/ directories from your CD to your USB/HDD deviceCode: Select all
ls syslinux-3.74/extlinux/ Makefile ext2_fs.h extlinux* main.c
6) In the USB/HDD device cd to the boot/syslinux directory and copy the extlinux binary to boot/syslinuxCode: Select all
cp -R /mnt/hda/* /mnt/sdb1
7) In the USB/HDD device cd to boot/syslinux and copy syslinux.cfg to extlinux.confCode: Select all
cd /mnt/sdb1/boot/syslinux cp /tmp/syslinux-3.74/extlinux/extlinux .
8) In the USB/HDD device, edit the boot/bootinst.sh and change line 61 from :Code: Select all
cd /mnt/sdb1/boot/syslinux; cp syslinux.cfg extlinux.conf
toCode: Select all
./boot/syslinux/syslinux -d boot/syslinux $TARGET
9) Execute ./bootinst.sh and you will get a message similar to "boot/syslinux is /dev/sdb1" (/dev/sdb1 will be replaced by whatever your USB/HDD device is).Code: Select all
./boot/syslinux/extlinux -i boot/syslinux
Reboot, remove the CD and you will see that the system boots up with the menu and everything, except the USB/HDD is now a ext3 partition instead of a FAT32 partition, so no more problems with posixvol and corrupted changes directories. The drawback to this is that the partition with the boot/ and slax/ directories will no longer be visible from Windows. If you want it to be visible, then you need to install Ext2IFS (http://www.fs-driver.org/) in Windows or get a program like Linux-Recovery (http://www.diskinternals.com/Linux-Recovery/) for Windows.
It would be good if Tomas could include the extlinux binary and config and also a script to use extlinux for future releases of slax so that those who want to install it on ext2/ext3 partitions can do so easily.
If any of the instructions are not clear, let me know and I'll try to simplify it further.