[HOWTO] Install Slax to USB using extlinux by markds

Here you can post about non-standard installation methods
(for example when using grub4dos).
Post Reply
Tonio
Contributor
Contributor
Posts: 266
Joined: 28 Dec 2010, 16:37
Distribution: Slackware,porteus,FreeBSD,Slax
Location: 127.0.0.1

[HOWTO] Install Slax to USB using extlinux by markds

Post#1 by Tonio » 31 Dec 2010, 19:24

Dear folks,

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 :

Code: Select all

mkdir -p /mnt/sdb1; mount /dev/sdb1 /mnt/sdb1
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.
4) Untar-gz syslinux-3.74.tar.gz and you will have a syslinux-3.74 directory

Code: Select all

tar -zxf syslinux-3.74.tar.gz
ls
syslinux-3.74/ syslinux-3.74.tar.gz
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

ls syslinux-3.74/extlinux/
Makefile ext2_fs.h extlinux* main.c
5) Copy the boot/ and slax/ directories from your CD to your USB/HDD device

Code: Select all

cp -R /mnt/hda/* /mnt/sdb1
6) In the USB/HDD device cd to the boot/syslinux directory and copy the extlinux binary to boot/syslinux

Code: Select all

cd /mnt/sdb1/boot/syslinux
cp /tmp/syslinux-3.74/extlinux/extlinux .
7) In the USB/HDD device cd to boot/syslinux and copy syslinux.cfg to extlinux.conf

Code: Select all

cd /mnt/sdb1/boot/syslinux; cp syslinux.cfg extlinux.conf
8) In the USB/HDD device, edit the boot/bootinst.sh and change line 61 from :

Code: Select all

./boot/syslinux/syslinux -d boot/syslinux $TARGET
to

Code: Select all

./boot/syslinux/extlinux -i boot/syslinux
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).

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.

User avatar
X-Factor
Black ninja
Black ninja
Posts: 88
Joined: 29 Dec 2010, 23:19
Location: bali, indonesia

Re: [HOWTO] Install Slax to USB using extlinux by markds

Post#2 by X-Factor » 31 Dec 2010, 22:12

:good: i Hope it is ok ethically, cause there is a good ome by gutterrapolis too...
i suppose we won't need to imported here cause there already slax2usb with remix..
Last edited by X-Factor on 01 Jan 2011, 09:39, edited 1 time in total.
I've been confine to my quarter
http://img143.imageshack.us/i/medusathing.jpg/

User avatar
brokenman
Site Admin
Site Admin
Posts: 5439
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: [HOWTO] Install Slax to USB using extlinux by markds

Post#3 by brokenman » 31 Dec 2010, 22:29

I see no ethical dilemma posting info from other sites, especially our mother site. Preferably it would be rewritten with a credit, but who wants to spend time doing this!
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
X-Factor
Black ninja
Black ninja
Posts: 88
Joined: 29 Dec 2010, 23:19
Location: bali, indonesia

Re: [HOWTO] Install Slax to USB using extlinux by markds

Post#4 by X-Factor » 01 Jan 2011, 01:51

Not promising anything i'll try the wi-fi bit probably end up in the installation section as there are a lot of query n most posted forum are " i've done this but....." n lots of people need to be credited.
I've been confine to my quarter
http://img143.imageshack.us/i/medusathing.jpg/

att
Contributor
Contributor
Posts: 131
Joined: 28 Dec 2010, 17:09

Re: [HOWTO] Install Slax to USB using extlinux by markds

Post#5 by att » 01 Jan 2011, 09:36

If the problem is the "Changes" directory, why not use "slaxsave.dat" anyway? Always worked for me....

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: [HOWTO] Install Slax to USB using extlinux by markds

Post#6 by Ahau » 25 Jan 2011, 22:48

The link provided above for downloading syslinux tools is dead. Try http://kernel.org/pub/linux/utils/boot/ ... .86.tar.gz instead.

The latest version of extlinux, 4.03, will not install correctly with the method provided above, but 3.86 will.
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
brokenman
Site Admin
Site Admin
Posts: 5439
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: [HOWTO] Install Slax to USB using extlinux by markds

Post#7 by brokenman » 26 Jan 2011, 00:38

Yes, i've found 4.03 will do it's job and appear to install bootloader, however the system will not boot.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: [HOWTO] Install Slax to USB using extlinux by markds

Post#8 by Ahau » 26 Jan 2011, 02:47

I got it to boot into extlinux, but couldn't get it to find the config file. It got me to a boot prompt, and I could boot to /boot/vmlinuz, but didn't know how to append initrd, so it got hung up. Kind of a moot point now that we're moving towards grub4dos, but may be useful for those still working on getting v09 up.
Please take a look at our online documentation, here. Suggestions are welcome!

Post Reply