New way of booting


Forum: USB booting
Topic: New way of booting
started by: bri974

Posted by bri974 on April 27 2005,07:58
Hi guys,

I tried to have my damn usb key to boot. It didn't work at all.
Then I tried to use the new extlinux. And it works !!!

Here's what I do, tell me if it is usefull :

Erase disk ! (replace sda by your device if needed - don't do this if sda is your hdd :-P )
dd if=/dev/zero of=/dev/sda

fdisk /dev/sda
n (new partition)
p (primary)
1 (partition number 1)
enter (first cylinder)
enter (last cylinder)
a (activate)
1 (partition 1)
w (write to disk)

for info my fdisk -l gives :
Code Sample

fdisk -l /dev/sda

Disk /dev/sda: 131 MB, 131072000 bytes
5 heads, 50 sectors/track, 1024 cylinders
Units = cylinders of 250 * 512 = 128000 bytes

  Device Boot    Start       End    Blocks   Id  System
/dev/sda1   *         1      1024    127975   83  Linux


reboot or use hdparm -z /dev/sda if you see a message kernel uses the old table

Format the key using ext2
mkfs.ext2 /dev/sda1

mkdir key
mount /dev/sda1 key/

find your mirror with (http://www.kernel.org/mirrors/)

wget < http://www.fr.kernel.org/pub.....tar.gz >

tar xvzf syslinux-3.07.tar.gz

This installs the bootloader in the ext2 partition in the file extlinux.sys :
syslinux-3.07/extlinux/extlinux key/

This installs the bootloader code in the mbr :
dd if=syslinux-3.07/mbr.bin of=/dev/sda

create key/extlinux.conf with

Code Sample

DEFAULT linux24
APPEND ramdisk_size=100000 init=/etc/init lang=fr apm=power-off vga=791 initrd=minirt24.gz nomce noapic quiet BOOT_IMAGE=knoppix frugal
TIMEOUT 300


Warning : change lang=fr for your needs

(find your mirror with < http://www.damnsmalllinux.org/download.html > )
wget < http://.../dsl-1.0.1.iso >                    
wget < http://.../md5sum > -c dsl-1.0.1.iso.md5.txt
wget < http://.../bootusb-0.8.img >
wget < http://.../bootusb-0.8.img.md5.txt >
md5sum -c dsl-1.0.1.iso.md5.txt
md5sum -c bootusb-0.8.img.md5.txt

mkdir dsl_orig
mkdir bootusb

mount -o loop dsl-1.0.1.iso dsl_orig/
mount -o loop bootusb-0.8.img bootusb/

cp bootusb/minirt24.gz .
cp bootusb/linux24 .
gunzip minirt24.gz

mkdir initrd
mount -o loop minirt24 initrd/

vi initrd/linuxrc
goto line 256 ( : then 256 )
replace
Code Sample
if mountit $i /cdrom "-t vfat -o rw" >/dev/null 2>&1

by
Code Sample
if mountit $i /cdrom "-t ext2 -o rw" >/dev/null 2>&1


umount initrd/
gzip minirt24
mv minirt24.gz key/

cp bootusb/linux24 key/
mkdir key/KNOPPIX
cp dsl_orig/KNOPPIX/KNOPPIX key/KNOPPIX/

umount key/
umount bootusb/
umount dsl_orig/


sync
rmmod usb-storage

--
Bruno K/Bidy

Posted by roberts on April 27 2005,22:06
First of all thanks for sharing.

FYI for everyone else: It appears that this method works for those computer whose BIOS support booting from USB-HDD

The methods that are currently supported in DSL have been for BIOS that boot from USB-ZIP, which can sometimes be a pain to get the geometry just right and using mtools, and syslinux.

This new method doesn't require that. But does, at least on my test machines, to require USB-HDD.

So proceed with caution. Especially since it zero outs your pendrive.

I am packaging this up as a fully automated script to compliment our current offerring. That way, when one selects install to pendrive from the menu, you will be prompted which version depending on your BIOS capability.

Posted by chickenman on May 02 2005,08:51
Nice going!, i could have used this when i was (extremely) frustrated setting my pen drive geometry.
Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.