Hai , I am Prasanth .Newly subscribed to mailing list.I am in search for a boot loader which could boot linux form Usb flash memory. i am in process of building a new USB linux distribution . Can anybody give help. Things I need to know. Could syslinux could recognize a usb flash drive and filesystem inside that ? If yes is how ? Thanks in advance, Prasanth Kurian
>Hai , >I am Prasanth .Newly subscribed to mailing list.I am in search for a boot >loader which could boot linux form Usb flash memory. i am in process of >building a new USB linux distribution . >Can anybody give help. >Things I need to know. >Could syslinux could recognize a usb flash drive and filesystem inside that >? >If yes is how ?You could use extlinux from the syslinux package. This assumes you want to use the USB drive like a hard drive. You use 'fdisk' to create a Linux partition on it, then put a ext2 filesystem on it. This assumes your USB drive is on /dev/sda. # fdisk /dev/sda "Create Linux partition!" # mke2fs -m0 /dev/sda1 # mount /dev/sda1 /mnt/linux Create a Linux system in /mnt/linux. /mnt/linux/bin/ boot/kernel dev/ etc/fstab "/dev/sda1 / ext2 defaults 1 1" sbin/ proc/ tmp/ usr/ etc... Create a /etc/linux/extlinux.conf file. DEFAULT linux PROMPT 1 #DISPLAY boot.txt LABEL linux KERNEL /boot/kernel APPEND vga=normal rootdelay=6 root=/dev/sda1 ro LABEL linux2 KERNEL /boot/kernel APPEND vga=normal ro # extlinux /mnt/linux Whether it boots or not depends on your BIOS. My BIOS won't recognize my USB drive unless it has a FAT signature of some kind. You don't have to create a Linux system in /mnt/linux to test it, just skip that part until you know extlinux boots.
># extlinux /mnt/linuxCorrection, you should do this. # extlinux /mnt/linux # umount /mnt/linux # cat mbr.bin >/dev/sda "mbr.bin is part of the syslinux package!" If possible Cc me because i'm not subscribed.
On Mon, Sep 12, 2005 at 10:17:52AM -0700, H. Peter Anvin wrote:> Kent Robotti wrote: > > > >What would you tell extlinux to set the geometry for this flash drive? > > > >Disk /dev/sdb: 128 MB, 128974848 bytes > >4 heads, 62 sectors/track, 1015 cylinders > >Units = cylinders of 248 * 512 = 126976 bytes > > > > Device Boot Start End Blocks Id System > >/dev/sdb1 * 1 1015 125829 83 Linux > > If it has a partition table, it's not a floppy disk, and it doesn't need > geometry set. > > A floppy disk doesn't have a partition table. Instead you format the > root device (/dev/sdb in your case): > > mke2fs /dev/sdb > mount /dev/sdb /mnt > extlinux -H 4 -S 62 /dev/sdb > > ... assuming 4 heads, 62 sectors is the geometry you want. > > Note that if fdisk gets the geometry right by default, extlinux should > be able to detect it automatically as well.mke2fs -m0 -F /dev/sdb mount /dev/sdb /mnt extlinux /mnt It just hangs! extlinux -H 4 -S 62 /mnt it hangs for a few seconds and displays "boot error" extlinux -z /mnt It works and displays "CBIOS" etc. Can extlinux be installed on a mounted ext2 partition and work, or must it be the whole device? Because, if i do this it doesn't work, but that may be because of the limitations of my BIOS. mke2fs -m0 /dev/sdb1 "There's one active Linux partition on the drive!" mount /dev/sdb1 /mnt cat mbr.bin >/dev/sdb extlinux /mnt or extlinux -H 4 -S 62 /mnt or extlinux -z /mnt My BIOS dosen't even recognize the drive.