PDA

View Full Version : USB thumbdrive boot with EXTLINUX



Krellan2
03-03-2006, 09:59 AM
I have been (mostly) successful in getting my USB thumbdrive to boot with EXTLINUX.

Earlier, I followed the instructions here, to get it to boot with GRUB:

http://www.knoppix.net/wiki/USB_Based_FAQ

Was moderately successful... until I went to a different PC that had an additional SATA drive installed, and realized that GRUB was rather strict about exact device number and placement. My GRUB (hd0,0) was now a different hard drive with other data, not my USB thumbdrive! GRUB would no longer boot, and crashed out with "Error 17". Couldn't even make it to the GRUB command line to change the root device.

SYSLINUX, on the other hand, is well-known for being very independent and self-contained, not really caring where it's booted from, as long as the BIOS can see it.

Has anyone else tried this?

It seems simpler than GRUB, plus you get to take full advantage of all the SYSLINUX-based preboot features (help screens, etc.) that you get with CD/DVD. Since the CD already uses ISOLINUX, there's no problem "porting" to EXTLINUX.

I had already partitioned the USB thumbdrive into several ext3 partitions, and copied the KNOPPIX data to it, so installing EXTLINUX was straightforward:

1) Get the latest SYSLINUX:

http://syslinux.zytor.com/
http://www.kernel.org/pub/linux/utils/boot/syslinux/

2) Read the EXTLINUX instructions:

http://syslinux.zytor.com/extlinux.php

Pay attention to the part about mbr.bin: you need to copy the MBR to your thumbdrive.

3) Go into the extlinux directory, wherever you installed SYSLINUX, and install EXTLINUX:

./extlinux /mnt/sdz1/boot/isolinux

Replace sdz1 with your USB thumbdrive partition's actual device, of course. Have it mounted.

This installs EXTLINUX right side-by-side with the existing ISOLINUX directory! The filenames are different, so there will be no conflicts.

EXTLINUX modifies the PBR of whatever device holds that directory. So, it had better be one of the partitions on your USB thumbdrive. It creates the extlinux.bin file, and points the PBR to it.

4) Go into that directory, and copy the config file:

cd /mnt/sdz1/boot/isolinux
cp isolinux.cfg extlinux.conf

EXTLINUX and ISOLINUX share the same file format for their options, so you'll get all the nice help screens and other features from the CD, even when booting from the thumbdrive!

5) Unmount it, sync, reboot, and pray....

Anyone else have luck with this?

BTW, my partition structure on my USB thumbdrive (1GB SanDisk Cruzer Micro):
750MB ext3 = for 700MB of Knoppix CD, plus overhead/padding
150MB ext3 = Encrypted home directory will go here
100MB FAT16 = So I still have something to use with Windows :)

Josh

beerak
03-23-2006, 08:57 PM
This did not work for me.

I tried extlinux, but I have Western Digital USB HDD.

./extlinux /mnt/uba2/boot/extlinux

Warning: unable to obtain device geometry
bmap: Operation not permitted

Any ideas please ? :cry:

Krellan2
03-23-2006, 11:07 PM
This did not work for me.

I tried extlinux, but I have Western Digital USB HDD.

./extlinux /mnt/uba2/boot/extlinux

Warning: unable to obtain device geometry
bmap: Operation not permitted

Any ideas please ? :cry:

Hmm. I gave up on the ext2 filesystem for USB thumbdrives, and had better success with the FAT32 filesystem, using just SYSLINUX, instead of EXTLINUX. I also just used 1 big FAT32 partition, and didn't bother to make multiple partitions on my thumbdrive. See my newer post: http://www.knoppix.net/forum/viewtopic.php?t=23558

As for a real hard drive hooked up with USB, I don't know. I've never tried that.

It's strange that you have /mnt/uba2. All of my USB thumbdrives show up as SCSI devices: sda, sdb, and so on. I've never seen uba.