Users online right now: 132 - Login  » search  » forum index  

HOWTO: EXT2 USB stick with Extlinux

alisou
wrote 5 years ago


reply
Hi,
Here my way for installing Slax6 on ext2 USB with Extlinux rather than Lilo bootloader.

Step1: Create a Linux partition on unmounted USB stick

cfdisk /dev/sda
New
Primary
Size (in MB): 1050.24
Type 83
Write, yes
Quit


Step 2: Format the unmounted USB stick


mke2fs /dev/sda1
tune2fs -i 0 /dev/sda1
e2label /dev/sda1 SLAX


Step 3: Mount the USB stick

mkdir /mnt/sda1
mount /dev/sda1 /mnt/sda1


Step 4: Uncompress the TAR file

tar xvf slax-6.0.7.tar -C /mnt/sda1

Step 5: slaxchanges

Create the slaxchanges directory
mkdir -p /mnt/sda1/slaxchanges

Edit the "/mnt/sda1/boot/slax.cfg" file. At "LABEL xconf", "LABEL startx" and "LABEL slax" sections, put the "changes" variable at "slaxchanges" value:
changes=slaxchanges

Step 6: Extlinux

Create directory and file:
mkdir -p /mnt/sda1/boot/extlinux
cd /mnt/sda1/boot/syslinux
cp syslinux.cfg ../extlinux/extlinux.conf


Download syslinux (extlinux included):
wget http://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-3.63.tar.bz2
tar xvf syslinux-3.63.tar.bz2


Install extlinux:
cd syslinux-3.63/extlinux/
extlinux --install /mnt/sda1/boot/extlinux


Make a bootable USB stick:
umount /mnt/sda1
cat syslinux-3.63/mbr/mbr.bin > /dev/sda


Voilà!
alisou
 
XAVIER
wrote 5 years ago


reply
alisou ,

Please proof read this when you get a chance , within the second part of step 6 it should be...


tar xvf syslinux-3.63.tar.bz




Also,
Its recommended you don't use a journaling file system for your saved changes partition.
 
Dude
wrote 5 years ago


reply
XAVIER wrote:Also,
Its recommended you don't use a journaling file system for your saved changes partition.
EXT2 is not a journaling filesystem
 
XAVIER
wrote 5 years ago


reply
Dude wrote:
XAVIER wrote:Also,
Its recommended you don't use a journaling file system for your saved changes partition.
EXT2 is not a journaling filesystem


Dude,

I realize that.



What she seems to imply is thats where this was leading up to.
 
alisou
wrote 5 years ago


reply
Hi,

@XAVIER
It's done. Thanks!

alisou
 
markds
wrote 5 years ago


reply
The 2nd part of step 6 should be

tar jxvf syslinux-3.63.tar.bz2
bz2 needs the "j" not just "xvf"

x for extract
v for verbose
f for file from/to

z is for gzipped files and j for bziped files
 
some-guy
wrote 5 years ago


reply
this has some problems (eg if the usb is idly being used), I wrote extlinuxinst.sh I while ago, just a slightly modified bootinst.sh, download here: http://somelinuxguy94.googlepages.com/extlinuxinst-0.4.tar.gz
and copy the contents to boot/, then run boot/extlinuxinst.sh
 
alisou
wrote 5 years ago


reply
Hi,

@markds
I use "tar xvf" with "tar.bz2" files with no problem.

@some-guy
The usb should not being used.
And thanks for sharing your tool. I will try it.

alisou
 
kikyo
wrote 5 years ago


reply
What are the advantages of using ext2 file system with Slax's boot USB / SD Card ?
 
Guest
wrote 5 years ago


reply
hi...

i tried this but then it got stuck on boot prompt - saying "Could not find kernel image: linux"?

what could be wrong?

thanks.

alisou wrote:
Hi,
Here my way for installing Slax6 on ext2 USB with Extlinux rather than Lilo bootloader.

Step1: Create a Linux partition on unmounted USB stick

cfdisk /dev/sda
New
Primary
Size (in MB): 1050.24
Type 83
Write, yes
Quit


Step 2: Format the unmounted USB stick


mke2fs /dev/sda1
tune2fs -i 0 /dev/sda1
e2label /dev/sda1 SLAX


Step 3: Mount the USB stick

mkdir /mnt/sda1
mount /dev/sda1 /mnt/sda1


Step 4: Uncompress the TAR file

tar xvf slax-6.0.7.tar -C /mnt/sda1

Step 5: slaxchanges

Create the slaxchanges directory
mkdir -p /mnt/sda1/slaxchanges

Edit the "/mnt/sda1/boot/slax.cfg" file. At "LABEL xconf", "LABEL startx" and "LABEL slax" sections, put the "changes" variable at "slaxchanges" value:
changes=slaxchanges

Step 6: Extlinux

Create directory and file:
mkdir -p /mnt/sda1/boot/extlinux
cd /mnt/sda1/boot/syslinux
cp syslinux.cfg ../extlinux/extlinux.conf


Download syslinux (extlinux included):
wget http://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-3.63.tar.bz2
tar xvf syslinux-3.63.tar.bz2


Install extlinux:
cd syslinux-3.63/extlinux/
extlinux --install /mnt/sda1/boot/extlinux


Make a bootable USB stick:
umount /mnt/sda1
cat syslinux-3.63/mbr/mbr.bin > /dev/sda


Voilà!
alisou
 
Guest
wrote 5 years ago


reply
sorry... my mistake. i named the config file as .cfg instead of .conf!

thanks for the how-to!

Guest wrote:
hi...

i tried this but then it got stuck on boot prompt - saying "Could not find kernel image: linux"?

what could be wrong?

thanks.

 
alisou
wrote 5 years ago


reply
Hi,
@kikyo
Search with google for "ext2 fat32 comparison". Then it becomes a personal choice.

@Guest
The extlinux config file is extlinux.conf and not extlinux.cfg . Look here: http://syslinux.zytor.com/extlinux.php

alisou
 
XAVIER
wrote 5 years ago


reply
@all , I believe ext2 or 3 or even XFS would be a more piratical choice if your strictly working with linux applications , also please bear in mind some symlinks cannot survive on a fat32 partition.

XFS or ext3 seems to be the best choice for anyone using slax + another linux OS. (on a usb drive)
Fat32 seems to be the best choice for anyone using slax + a "post" windows 95b/c based OS. (on a usb drive)
 
some-guy as guest
wrote 5 years ago


reply
XAVIER wrote:
@all , I believe ext2 or 3 or even XFS would be a more piratical choice if your strictly working with linux applications , also please bear in mind some symlinks cannot survive on a fat32 partition.

XFS or ext3 seems to be the best choice for anyone using slax + another linux OS. (on a usb drive)
Fat32 seems to be the best choice for anyone using slax + a "post" windows 95b/c based OS. (on a usb drive)

Note that slax uses posixOVL on fat to provide the same functionality required for linux.

ext2/3 aren't the best partitions for a usb drive, XFS would be better, but there is no xfslinux and liloinst.sh doesn't work properly for a number of people, also the built-in installer doesn't make a menu, which many people prefer ;)

I would try to fix some of the problems with the installer(it doesn't work for me on suse :( ), but I have no experience with lilo, and it isn't as straightforward as extlinux
 
XAVIER
wrote 5 years ago


reply
While XFS might work better , it seems there is little shrink support in XFS compared to EXT , i maybe wrong , someone correct me if i am.

It would also be good if someone wrote a bootable XFS tutorial with support for the menus.
 
some-guy
wrote 5 years ago


reply
XAVIER wrote:
While XFS might work better , it seems there is little shrink support in XFS compared to EXT , i maybe wrong , someone correct me if i am.

It would also be good if someone wrote a bootable XFS tutorial with support for the menus.

afaik, lilo support menus but it isn't enabled by default using liloinst.sh

EDIT: Apparently in liloinst.sh, install=text needs to be changed to install=menu :D
 
XDS
wrote 5 years ago


reply
What is the difference between the 2 tho ?
 
some-guy
wrote 5 years ago


reply
LiLo and Extlinux are different bootloaders, extlinux can properly install on pretty much any computer, lilo has some problems in that it gives init errors for some users, I think the reason is that it tries to detect and adjust its config to match the root device, which is /dev/ram0, many distros don't have it (suse, ubuntu), and I'm trying to figure out how to generate it as well as changing lilo to look the same (or almost the same) as the syslinux/extlinux loader
 
Barkingdoggy
wrote 4 years ago


reply
some-guy wrote:
this has some problems (eg if the usb is idly being used), I wrote extlinuxinst.sh I rwhile ago, just a slightly modified bootinst.sh, download here: http://somelinuxguy94.googlepages.com/extlinuxinst-0.4.tar.gz
and copy the contents to boot/, then run boot/extlinuxinst.sh


Thanks for extlinuxinst. It works like a charm. Slax loads significantly faster with my USB stick formatted with ext2 vs FAT16.
 
francois.e
wrote 4 years ago


reply
alisou wrote:
Install extlinux:
cd syslinux-3.63/extlinux/
extlinux --install /mnt/sda1/boot/extlinux




Here is what I have:

root@slax:/mnt/sdc1/boot/syslinux/syslinux-3.63/extlinux# ls
Makefile ext2_fs.h extlinux* extlinux.c

Here is what I get:

root@slax:/mnt/sdc1/boot/syslinux/syslinux-3.63/extlinux# extlinux --install /mnt/sdc1/boot/extlinux
-bash: extlinux: command not found
root@slax:/mnt/sdc1/boot/syslinux/syslinux-3.63/extlinux#

How come it does not work?
 
sid77
wrote 4 years ago


reply
you're calling a binary from the current directory, you've to use ./extlinux --install /mnt/sdc1/boot/extlinux instead
 
deathed
wrote 4 years ago


reply
Hi, i'm a new user!
I use slax on FAT32 USB from 3 days, but i want to use it on ext2.
The version which i use is 6.0.9.
I've make all the steps but at the reboot appears this message: "Missing operating system".
What can i do?

Sorry for my english, i'm italian :P!

Thanks for the help!
 
slaxpio
wrote 1 year ago


reply
I found this page very helpful, I wasn't looking for SLAX in particular, but looking for instructions on how to make a bootable USB stick with ext2 instead of vfat.

Two problems I ran into:

Step 1: you also must set the "bootable" flag. At least, for my hardware, I was unable to boot from the USB stick until I set the bootable flag in the partition table (with fdisk, command 'a').

Step 6: should be "./extlinux" (as mentionned above).

hope this helps.
 
Slaxser
wrote 1 year ago


reply
I tried this, although on a local hard drive instead of a USB,
also instead of creating the 'slaxchanges' I used the original slax directory.
The problem is (even when trying this example to the letter, using USB and slaxchanges)
it boots but just at the beginning it stops saying:
'/boot/vesamenu.c32: not a COM32R image'

This file is in the correct place as the 'Comboot/menu.c32' wiki says
,"the same directory as the configuration file for SYSLINUX, EXTLINUX and ISOLINUX",
and for me that is the same directory as 'extlinux.conf'.

When this "question" comes I write 'slax' and it'll continue to boot.

Can anyone say what I missed?

UPDATE: is there any special attribues that needs to be set on that file?
 
sam
wrote 1 year ago


reply
Slaxser,
I've seen your error if you mix and match compoonents from different versions of syslinux/extlinux.
 
Slaxser
wrote 1 year ago


reply
well, how so?
@ step 6 he 'wget' this: http://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-3.63.tar.bz2

This is a 'syslinux' stuff and they use the extlinux part of it, as I do but in a directory with a different name, so sorry I'm still missing it :P
 

  » search  » forum index  

Post your reply

Your name (Login):

Message:

These HTML tags are allowed: <quote>, <b>, <u>, <i>, <pre>, <code>, <small>, <h1>, <h2>, <h3>, <li>



Slax is generously supported by: P&P Software GmbH and wisol technologie GmbH