Results 1 to 15 of 75

Thread: Using HDD drive for Root on OpenWRT

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Using HDD drive for Root on OpenWRT

    I have prepared some scripts (see attachement) to use HDD as root file system. The scripts are based on info found at:
    http://wiki.openwrt.org/OpenWrtDocs/...etgear/WGT634U
    http://openwrt.pbwiki.com/WGT634U_USB_root
    http://forum.openwrt.org/viewtopic.php?pid=24104

    As I'm not a big linux guru, the scripts might need improvements. So any feedback is welcome!

    The script ini creates mount point (/hdd) in existing root filesystem and creates new file system layout.
    linuxrc changes the root filesystem to hdd filesystem.
    /etc/init.d/done has a small adition to execute linuxrc:
    [ -f /linuxrc ] && . /linuxrc

    How to use all this:

    1. I assume you already have flashed OpenWRT firmware from http://back2basic.shacknet.nu/WL700Ge/
    2. copy ini and linuxrc to /
    3. give ini and linuxrc execute permition
    4. execute ini
    5. copy done to /etc/init.d/done
    6. reboot the router.

    You should see something like this:
    root@OpenWrt:/# mount
    /dev/root on /jffs/rom type squashfs (ro)
    none on /jffs/dev type devfs (rw)
    /dev/mtdblock/4 on /jffs/jffs type jffs2 (rw)
    /jffs on /jffs type mini_fo (rw)
    /dev/discs/disc0/part1 on / type ext3 (rw)
    none on /proc type proc (rw)
    none on /dev type devfs (rw)
    none on /dev/pts type devpts (rw)
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    190
    Great , was also trying to get the hdd mounted but I gues must learn alot more . Gonne try you're way

    THxx

    Openwrt or Custom Firmware on asus? - http://wl700ge.hezik.nl/ - Http://wl700g.homelinux.net

    My ASUS collection: WL500gp(80GB usb-hdd - Running OpenWrt Kamikaze 7.09) | WL700gE(250GB - Running OpenWrt Kamikaze 8.09rc1)

  3. #3
    Quote Originally Posted by back2basic View Post
    Great , was also trying to get the hdd mounted but I gues must learn alot more . Gonne try you're way

    THxx
    I'm not sure about these lines :
    /dev/root on /jffs/rom type squashfs (ro)
    none on /jffs/dev type devfs (rw)
    /dev/mtdblock/4 on /jffs/jffs type jffs2 (rw)
    /jffs on /jffs type mini_fo (rw)
    I guess something should be unmounted?!

  4. #4

    cleaned up ini script

    I have cleaned ini script:
    #!/bin/sh
    #script to create root filesystem on HDD drive partition
    #it is important that you customize these settings to fit your drive!

    boot_dev="/dev/discs/disc0/part1"
    mount_point="/hdd"

    # create mount point
    mkdir $mount_point

    #mount hdd
    mount $boot_dev $mount_point

    #copy root filesystem
    /bin/tar cvO -C / bin/ etc/ lib/ sbin/ usr/ www/ rom/ | /bin/tar x -C $mount_point
    cd $mount_point && mkdir tmp dev proc jffs var

    #we have writeable filesystem and don't need symlink /var to /tmp
    #copy content to real /var directory
    cp -a /var/* var

  5. #5
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    190
    Quote Originally Posted by MoD View Post
    I'm not sure about these lines :


    I guess something should be unmounted?!
    when I do a 'df -h' I see that /dev/mtdblock/4 is only a few kb I guess that's the one but I don't know It for sure .I'm trying it later and post back the results of it. mmm /jffs is also small maybe that needs to be unounted too

    Openwrt or Custom Firmware on asus? - http://wl700ge.hezik.nl/ - Http://wl700g.homelinux.net

    My ASUS collection: WL500gp(80GB usb-hdd - Running OpenWrt Kamikaze 7.09) | WL700gE(250GB - Running OpenWrt Kamikaze 8.09rc1)

  6. #6
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    190
    Quote Originally Posted by MoD View Post

    How to use all this:

    1. I assume you already have flashed OpenWRT firmware from http://back2basic.shacknet.nu/WL700Ge/
    2. copy ini and linuxrc to /
    3. give ini and linuxrc execute permition
    4. execute ini
    5. copy done to /etc/init.d/done
    6. reboot the router.

    You should see something like this:
    when I execute the script It gets me a bunch of error and @ last it tels me I ran out of space .But I didn't had the time to look into the script Ihad to go to work 15:00 - 23:00

    I just saw that you cleared out the script. I guess its back to 'firstboot' for me and try it again. Gonne try It again when I'm back @home tonight

    Openwrt or Custom Firmware on asus? - http://wl700ge.hezik.nl/ - Http://wl700g.homelinux.net

    My ASUS collection: WL500gp(80GB usb-hdd - Running OpenWrt Kamikaze 7.09) | WL700gE(250GB - Running OpenWrt Kamikaze 8.09rc1)

  7. #7
    Quote Originally Posted by back2basic View Post
    when I execute the script It gets me a bunch of error and @ last it tels me I ran out of space .But I didn't had the time to look into the script Ihad to go to work 15:00 - 23:00

    I just saw that you cleared out the script. I guess its back to 'firstboot' for me and try it again. Gonne try It again when I'm back @home tonight
    I did my tests on a fresh openwrt install. jffs2 has very little room.

  8. #8
    I was able to enable USB support, but USB-sticks are not mounted. Filesystem kernel modules depends on kmod-nls-base with is not compiled for some reason

  9. #9
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    190

    Oepsss

    Quote Originally Posted by MoD View Post
    I was able to enable USB support, but USB-sticks are not mounted. Filesystem kernel modules depends on kmod-nls-base with is not compiled for some reason
    That could be my mistake since I compiled it
    I'll check my config when I'm @home in 3 hours
    Probably I gonne recompile it(And share it with all you) to start fresh.

    Openwrt or Custom Firmware on asus? - http://wl700ge.hezik.nl/ - Http://wl700g.homelinux.net

    My ASUS collection: WL500gp(80GB usb-hdd - Running OpenWrt Kamikaze 7.09) | WL700gE(250GB - Running OpenWrt Kamikaze 8.09rc1)

  10. #10
    Quote Originally Posted by back2basic View Post
    That could be my mistake since I compiled it
    I'll check my config when I'm @home in 3 hours
    Probably I gonne recompile it(And share it with all you) to start fresh.
    I have compiled my own firmware. still no luck

    vfat compiles, but nls-base - doesnt.

  11. #11
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    190
    Quote Originally Posted by back2basic View Post
    when I execute the script It gets me a bunch of error and @ last it tels me I ran out of space .But I didn't had the time to look into the script Ihad to go to work 15:00 - 23:00

    I just saw that you cleared out the script. I guess its back to 'firstboot' for me and try it again. Gonne try It again when I'm back @home tonight
    Got the hdd to mount
    I made a tutorial on how to make a new filesystem
    http://back2basic.shacknet.nu/WL700G...thread.php?t=4

    Openwrt or Custom Firmware on asus? - http://wl700ge.hezik.nl/ - Http://wl700g.homelinux.net

    My ASUS collection: WL500gp(80GB usb-hdd - Running OpenWrt Kamikaze 7.09) | WL700gE(250GB - Running OpenWrt Kamikaze 8.09rc1)

  12. #12
    I think that in flash wl700ge should use jffs2 root filesystem not squashfs. we are switching to hdd root, so squashfs failsafe does not makes sense.

    jffs2 is writeable and is able to hold necesary customization to switch to hdd root. we dont need to swith to a new root twice (openwrt swithces from squashfs to jffs2 and uses mini_fo).

    usage of squashfs is too complicated!

  13. #13
    Quote Originally Posted by MoD View Post
    I think that in flash wl700ge should use jffs2 root filesystem not squashfs. we are switching to hdd root, so squashfs failsafe does not makes sense.

    jffs2 is writeable and is able to hold necesary customization to switch to hdd root. we dont need to swith to a new root twice (openwrt swithces from squashfs to jffs2 and uses mini_fo).

    usage of squashfs is too complicated!
    I tested this. jffs with 128k is too big:
    Write kernel and filesystem binary to FLASH (0xbfc40000)
    flash device 'flash1.trx'
    Programming...
    ERROR!! copysize is 1839104, amtcopy is 1802240
    Failed.: Unknown error

  14. #14
    #After following the great work of MoD do the following:

    mkdir -p /opt/etc
    echo "src optware http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable" > /opt/etc/ipkg.conf
    echo "lists_dir ext /opt/var/lib/ipkg" >> /opt/etc/ipkg.conf
    echo "dest /opt/ /" >> /opt/etc/ipkg.conf

    export IPKG_CONF_DIR=/opt/etc
    ipkg -V 2 update

    ipkg install mt-daapd

    #edit your /opt/etc/mt-daapd/mt-daapd.conf // runas root
    /opt/etc/init.d/S60mt-daapd

    #enjoy your mt-openwrt Server
    #Proceed with all other ~600 packages :-P

    #TODO - WLan-support

Similar Threads

  1. Lost Access to HDD
    By cokeman in forum WL-500g Q&A
    Replies: 0
    Last Post: 12-10-2006, 08:39
  2. Mirroring WL-700g external USB hard drive
    By Joho in forum WL-700g Q&A
    Replies: 0
    Last Post: 11-09-2006, 14:49
  3. twonky media server, network drive with oleg firmware
    By black_bottom in forum WL-HDD Q&A
    Replies: 3
    Last Post: 22-03-2006, 07:15
  4. Flashing Oleg's Firmware in WL HDD
    By hugo in forum WL-HDD Custom Development
    Replies: 29
    Last Post: 21-10-2004, 14:55
  5. USB HDD connects as Webcam
    By Oldchatterman in forum WL-500g Q&A
    Replies: 12
    Last Post: 19-10-2004, 17:54

Posting Permissions

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