Results 1 to 3 of 3

Thread: Is it possible to boot from USB disk?

  1. #1
    Join Date
    Feb 2004
    Posts
    103

    Is it possible to boot from USB disk?

    To make easier mods to the system, would it be possible to boot from a HD attached to the USB?

    I guess it involves changing this
    Kernel command line: root=/dev/mtdblock2 noinitrd console=ttyS0,115200
    to something like root=/dev/sda2, and compiling the kernel to have the usb stuff, and a ext2 driver not as modules


    The thing I did sofar is to make a ext2 partition, copied the whole filesystem to it. Then I try to mount it

    ~ # mount
    /dev/root on / type cramfs (ro)
    none on /dev type devfs (rw)
    none on /proc type proc (rw)
    /ramfs on /mnt/ramfs type ramfs (rw)
    /dev/scsi/host0/bus0/target0/lun0/part1 on /mnt/usbfs type vfat (rw)
    /dev/scsi/host0/bus0/target0/lun0/part2 on / type ext2 (rw)
    /dev/scsi/host0/bus0/target0/lun0/part2 on /mnt/usbfs/n type ext2 (rw)

    although it appears from the mount that it is mounted to /, there is also still the cramfs mounted. I don't seem to be able to unmount it.

    One more strange thing, I mounted a swap partition. But somehow I don't see it with the mount command. Anyway, as I see there is not a whole lot of memory left. Will removing the ramfs improve this?

    ~ # cat /proc/meminfo
    total: used: free: shared: buffers: cached:
    Mem: 14782464 13082624 1699840 0 905216 7626752
    Swap: 123367424 1224704 122142720
    MemTotal: 14436 kB
    MemFree: 1660 kB
    MemShared: 0 kB
    Buffers: 884 kB
    Cached: 6688 kB
    SwapCached: 760 kB
    Active: 7136 kB
    Inactive: 1924 kB
    HighTotal: 0 kB
    HighFree: 0 kB
    LowTotal: 14436 kB
    LowFree: 1660 kB
    SwapTotal: 120476 kB
    SwapFree: 119280 kB

  2. #2
    Join Date
    Feb 2004
    Location
    Minnesota, USA
    Posts
    25
    I'll be interested to see what you come up with. You might want to take a look at the O'Reilly book "Building Embedded Linux Systems" by Karim Yaghmour.

  3. #3
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    The idea is to use the existing cramfs in the way of using it as initrd. So, then the linux boots it will call /linuxrc - this will be a script which in fact loads the modules both for usb & fs, tries to mount new root filesystem from flash and then if it succeeds just exec init from it, otherwise it's just calling good old cramfs init.
    This seems be easy to do, but needs time...

Similar Threads

  1. No Access to USB-Disk
    By fraho in forum WL-500g Q&A
    Replies: 5
    Last Post: 11-07-2005, 16:58
  2. No à è ò in my hard disk
    By ancorato in forum WL-500g Custom Development
    Replies: 0
    Last Post: 28-05-2005, 16:46
  3. Replies: 9
    Last Post: 18-02-2005, 19:42
  4. filesystem on usb disk??
    By NIGHTCD in forum WL-500g Q&A
    Replies: 7
    Last Post: 15-09-2004, 12:23
  5. wl500g and usb disk
    By olejacob in forum WL-500g Q&A
    Replies: 0
    Last Post: 26-07-2004, 15:43

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •