Hello,

I succesfully run openwrt on an Asus WL-HDD. Just like the NSLU2's I have, I made this openwrt'ed AP run it's root filesystem from the harddisk. mostly used this instruction:

   http://wiki.openwrt.org/OpenWrtDocs/Har … 8wl-hdd%29

i removed all reference to ppp to make space. installed samba, vsftpd, ef2progs, fdisk, nas, wl and some usb modules. this way my wl-hdd had the most important functionality. as suggested, i changed the wan_proto to none... but had to include

after    ifup lan
    ifconfig eth1 up

in the /etc/init.d/S40network file to make my local LAN interface to operate. then i changed the disk layout to make it work with samba. the root filesystem is the first partition (ext3, 200 mb), the second is a swap partition of about 64 mb and the last is a extended partition of the remainder of the disk (ext3). my fstab looks like:

   /dev/discs/disc0/part5  /storage        ext3    defaults        0 0
   /dev/discs/disc0/part1  /mnt            ext3    defaults        0 0

at first i was not running it from the first partition since it was just an idea... i wanted to try running applications from the harddisk. i was able to use LD_LIBRARY_PATH="/mnt/lib' and start some binaries from the root filesystem... but then i found this information on the internet:

   http://wl500g.dyndns.org/
   http://wiki.openwrt.org/UsbStorageHowto … a50d94382a

i first made a backup using 'dd if=/dev/mtdblock/1 of=/storage/backup/firmware.trx'.
so removed the original /sbin/init and replaced it with the file below. copy the contents of / to my /root... i tried it out with this file once before reoot and it seemed to work.

#!/bin/sh

# change nvram variable 'boot_dev' to your root filesystem
boot_dev=`nvram get boot_dev`

# install needed modules for usb and the ext3 filesystem
# **NOTE** for usb2.0 replace "uhci" with "ehci-hcd"
# **NOTE** for ohci chipsets replace "uhci" with "usb-ohci"
#for module in usbcore uhci scsi_mod sd_mod usb-storage jbd ext3; do {

# install modules needed for ide and the ext3 filesystem
for module in ide-core pdc202xx_old ide-detect ide-disk jbd ext3; do {
      insmod $module
}; done

# this may need to be higher if your disk is slow to initialize
sleep 4s

# mount the root filesystem
mount "$boot_dev" /mnt

# if everything looks ok, do the pivot root
[ -x /mnt/sbin/init ] && {
      mount -o move /proc /mnt/proc && \
      pivot_root /mnt /mnt/mnt && {
            mount -o move /mnt/dev /dev
            mount -o move /mnt/tmp /tmp
            mount -o move /mnt/jffs2 /jffs2 2>&-
            mount -o move /mnt/sys /sys 2>&-
      }
}

# finally, run the real init
exec /bin/busybox init


voila. and now i have a 200 mb root filesystem... already installed a lot of handy tools. but the only thing i wonder about; why is optware not ported??? dd-wrt has its own port, oleg and more... but no openwrt. Or did i look in the wrong place???

i hope this is also helpful to other people. At least I have a very handy small AP with WDS functionality that works fine with my WRT54GL's (running OpenWRT and DD-WRT v23 sp2). Just hope optware will be available soon.


Gerard

(Last edited by gbraad on 17 Sep 2006, 22:32)