Changes

OpenWRT on Asus WL-500gP: Installation Guide

5,853 bytes added, 13:15, 15 July 2007
The following lines were added (+) and removed (-):
<big>'''9.''' </big> Configure interfaces and vlans<big>'''10.''' </big> Checking to see if all my RAM is enabled: free              total        used        free      shared      buffers  Mem:        30516        8768        21748            0          872  Swap:            0            0            0 Total:        30516        8768        21748It is.<big>'''11.''' </big> Configure the wireless interface nvram set wl0_ssid="myhotspot" nvram set wl0_mode="ap" (skip, default) nvram wl0_closed=0 (set to 1 to hide ssid) nvram set wl0_radio=0 (disabled radio if you run 'wifi' afterwards)defaults: wl_radio_x=1 wl0_radio_x=1 wl0_radio_power_x=17 size: 11539 bytes (21229 left) wl0_radioids=BCM2050 wl0_radio_time_x=00002359 wl0_radio_date_x=1111111 wl_radio_time_x=00002359 wl_radioids= wl0_radio=0 wl_radio=1 wl_radio_date_x=1111111 wl_radio_power_x=17 wifi (command to apply changes) nvram show (see the configuration)<big>'''12.''' </big> Build a current package list, this step requires an Internet connection. <nowiki>nvram set wan_ipaddr=10.21.204.250    (just until I am done configuring)</nowiki> <nowiki>nvram set lan_ipaddr=192.168.XX.3      just until I am done configuring)</nowiki> <nowiki>nvram set lan_gateway=192.168.XX.1    (just until I am done configuring)</nowiki> <nowiki>vi /etc/resolv.conf                    nameserver 64.21.192.5</nowiki> <nowiki>/etc/init.d/S40network restart </nowiki> <nowiki></nowiki> <nowiki>ipkg update                    (update package database)</nowiki> <nowiki>ipkg list                      (view list of available packages)</nowiki> <nowiki>ipkg status                    (view packages you have installed)</nowiki> <nowiki></nowiki> <nowiki>ipkg install kmod-usb2</nowiki> <nowiki>insmod ehci-hcd</nowiki> <nowiki>ipkg install kmod-usb-storage</nowiki> <nowiki>insmod scsi_mod</nowiki> <nowiki>insmod sd_mod</nowiki> <nowiki>insmod usb-storage</nowiki> <nowiki></nowiki> <nowiki>reboot</nowiki> <nowiki></nowiki> <nowiki>dmesg|grep -i usb</nowiki> <nowiki></nowiki> <nowiki>ipkg install kmod-vfat</nowiki> <nowiki>ipkg install kmod-ext2</nowiki> <nowiki>ipkg install kmod-ext3</nowiki>Using the insmod is not necessary if you reboot. insmod fat insmod vfat insmod ext2 insmod ext3 insmod jbd ipkg install http://downloads.openwrt.org/backports/rc5/fdisk_2.12r-1_mipsel.ipk mkdir -p /mnt fdisk -l mount /dev/scsi/host0/bus0/target0/lun0/part1 /mntThese settings should be retained after a reboot.  I have noticed that sometimes after a reboot the USB device does not show up.  Installing and using IPKG packages in mount point other than root*(I did not complete this procedure) echo dest usb /mnt/disc0_1 >> /etc/ipkg.confBooting from the USB drive, with failover to the Flash umount /dev/scsi/host0/bus0/target0/lun0/part1 fdisk /dev/scsi/host0/bus0/target0/lun0/part1*Press 'd' to delete 1, 2, 3, and 4*Press 'n' for new*Press 'w' for write ipkg install http://downloads.openwrt.org/backports/rc5/e2fsprogs_1.38-1_mipsel.ipk ln -s /proc/mounts /etc/mtab mke2fs -j /dev/scsi/host0/bus0/target0/lun0/part1 mount -t ext3 /dev/scsi/host0/bus0/target0/lun0/part1 /mnt mkdir /tmp/root mount -o bind /rom /tmp/root mount -o bind / /tmp/root cp /tmp/root/* /mnt -a umount /tmp/root umount /mnt rm /sbin/initAnd replace it with this script: <nowiki>#!/bin/sh</nowiki> <nowiki># change this to your boot partition</nowiki> <nowiki>boot_dev="/dev/scsi/host0/bus0/target0/lun0/part1"</nowiki> <nowiki></nowiki> <nowiki>for module in usbcore ehci-hcd scsi_mod sd_mod usb-storage jbd ext3; do {</nowiki> <nowiki>  insmod $module</nowiki> <nowiki>}; done</nowiki> <nowiki># this may need to be higher if your disk is slow to initialize</nowiki> <nowiki>sleep 4s</nowiki> <nowiki># mount the usb stick</nowiki> <nowiki>mount "$boot_dev" /mnt</nowiki> <nowiki># if everything looks ok, do the pivot root</nowiki> <nowiki>[ -x /mnt/sbin/init ] && {</nowiki> <nowiki>  mount -o move /proc /mnt/proc && \</nowiki> <nowiki>  pivot_root /mnt /mnt/mnt && {</nowiki> <nowiki>    mount -o move /mnt/dev /dev</nowiki> <nowiki>    mount -o move /mnt/tmp /tmp</nowiki> <nowiki>    mount -o move /mnt/jffs2 /jffs2 2>&-</nowiki> <nowiki>    mount -o move /mnt/sys /sys 2>&-</nowiki> <nowiki>  }</nowiki> <nowiki>}</nowiki> <nowiki># finally, run the real init (from USB hopefully).</nowiki> <nowiki>exec /bin/busybox init</nowiki>Make sure your new /sbin/init is executable: chmod a+x /sbin/initIf it mounts correctly it will look like this: <nowiki>root@OpenWrt:~# mount</nowiki> <nowiki>/dev/root on /mnt/rom type squashfs (ro)</nowiki> <nowiki>none on /dev type devfs (rw)</nowiki> <nowiki>none on /proc type proc (rw)</nowiki> <nowiki>none on /tmp type tmpfs (rw,nosuid,nodev)</nowiki> <nowiki>/dev/mtdblock/4 on /mnt/jffs type jffs2 (rw)</nowiki> <nowiki>/jffs on /mnt type mini_fo (rw)</nowiki> <nowiki>none on /dev/pts type devpts (rw)</nowiki> <nowiki>none on /proc/bus/usb type usbfs (rw)</nowiki> <nowiki>/dev/scsi/host0/bus0/target0/lun0/part1 on /mnt/mnt/disc0_1 type ext3 (rw)</nowiki> <nowiki>/dev/scsi/host0/bus0/target0/lun0/part1 on / type ext3 (rw)</nowiki>* Actually the disc0_1 line may not be correct.  Unconfirmed if this is the result of a previous attempt to mount that is "stuck" in mtab.* If booted from the USB flash drive, then packages installed by ipkg will go on the usb drive anyway.  If the system boots failover to the internal flash, that package will be absent.If everything went alright, you will not have to change your root password, and when you execute a 'ipkg list' you will see all of the packages from the database, which would otherwise have been absent.  Use 'ipkg status' to show installed packages.
Bureaucrat, administrator
16,192
edits