memdisk.zip 26k .zip file
I thought I should start a summer project. All the cool kids are doing it.
I re-wrote this post July 26th 2013. I didn't have any replies before and I've made some progress now. Maybe someone will find it useful if nothing else.
Table of contents
In summary, the idea is to turn my Asus RT-N16 router into really a MIPS-based Linux box. Using said Linux box-router I'll then setup DNSMasq/a TFTP daemon for easy PXE network booting of multiple PCs at once.
Specs at Asus support page
Information from infodepot
Now you might say "when not just build a router from an atom-based box/netbook/whatever".
The advantage of a router as a Linux machine is that it's small, super low power consumption/no fans and already has WiFi and a multi-port gigabit Ethernet switch built in (as of this writing the RT-N16 is about $75, also). This N16 also has two USB ports for adding storage devices. Although a netbook with a usb ethernet NIC and 8 port switch strapped to it and also no battery so it powers off when you pull the power cord...well that would require two power cords anyway but...meh, forget it.
The original idea was to install DebWRT, basically Debian built for MIPS processors, on this router so I could set it up the same way I setup all my other servers.
I've run into a few snags in doing this however: DebWRT is a derivative of OpenWRT and the N16 is only available via the bleeding edge, recently compiled "trunk builds" of OpenWRT (referred to as "Barrier Breaker"). In other words DebWRT doesn't actually install on the N16 with a simple firmware download (as far as I know). It might with a custom compilation but I'm not sure I'm going to try that or want to do so that badly. And that the DebWRT web site keeps going down doesn't exactly help.
As of this writing I actually have my new first step completed: I managed to install OpenWRT on my N16. This took an enormous amount of time and frustration to simply realize it was supported in the bleeding edge trunk builds, not in the official release builds. As far as I can tell. Even then I got the build that finally worked from a server in Romania. And now, AFTER I figured this out, the OpenWRT wiki page finally shows as much.
The first the you want to do is logon to router via telnet. Just put in root for the user name and you'll be logged right in. Use the command passwd to set a new password. After that it should let you SSH into it with no issues.
Update: When I first wrote this I thought the convenient web interface for OpenWRT was already installed. Since re-installing I've learned it perhaps is not. The web interface is thus installed:
opkg install luci
The secondary step on enabling the http daemon is also necessary:
/etc/init.d/uhttpd start
After that the router should be reachable at http://192.168.1.1/
I should mention I switched firmware, from a pre-built binary from the Romanian site to the most recent trunk build. It could very well be the Romanian person compiled the luci into the firmware because the Luci I have now for the latest trunk build is way different/much better than the one I was on.
Theoretical summary of steps to completing this project:
I thought I should start a summer project. All the cool kids are doing it.
I re-wrote this post July 26th 2013. I didn't have any replies before and I've made some progress now. Maybe someone will find it useful if nothing else.
Table of contents
- August 1st: The rovio build, frustrations, banging one's head against a wall (I enjoy pain. Must be a Linux user)
- August 2nd: Switching to the OpenWRT trunk build, successfully mounting a USB disk drive
- August 3rd: Working through the frustration: the successful network boot of two clients
- Agust 5th - 18th: I pushed a button and all I got was this...lousy logger entry
In summary, the idea is to turn my Asus RT-N16 router into really a MIPS-based Linux box. Using said Linux box-router I'll then setup DNSMasq/a TFTP daemon for easy PXE network booting of multiple PCs at once.
- CPU: MIPS R2 clocked at 480Mhz (reportedly capable of running at 533MHz) -- All references seem to say Linux kernel 2.6 only (no 2.4)
- Flash storage: 32 Megs
- System memory: 128Megs
- USB ports: USB 2.0 x 2
- Wifi: 802.11b/g/n
- Wifi Chipset: WLAN DSP Broadcom Processor (BCM4718A SoC, otherwise known as BCM47xx)
- Networking: 4 Gigabit Ethernet ports + 1 WAN Gigabit port
Specs at Asus support page
Information from infodepot
As almost entirely thoroughly mentioned in the below posts I've actually switched things up a little to get to where I am right now:
- No longer pursuing a DebWRT-based solution because I'm not sure I would have ever figured it out and apparently the site is completely dead/gone (not even a filler/spam sort of page).
- Having switched over to OpenWRT, I originally found a work TRX file on a site called ravio.ro (I'll just call this the "ravio build") since the actual regular release builds won't work with the rt-n16. I couldn't get the storage device to work with the ravio build. I had some many problems I decided to just try the "barrier breaker" bleeding edge trunk build from OpenWRT (and this working much better).
- It's fortunate the trunk builds work with the n16 because the ravio.ro domain is gone as well.
I'm effectively done with the project right now (see my August 3rd post). The USB storage mounts, DNSMasq/the tftp daemon both look to the USB storage for all the files they need and I successfully booted two clients into memtest86+ at the same time.
Only thing really missing is some how assigning a WPS button push to mounting the usb storage device. Or possibly automounting said storage at device bootup and using the WPS button to unmount it. Haven't figured that part out yet.
Only thing really missing is some how assigning a WPS button push to mounting the usb storage device. Or possibly automounting said storage at device bootup and using the WPS button to unmount it. Haven't figured that part out yet.
Now you might say "when not just build a router from an atom-based box/netbook/whatever".
The advantage of a router as a Linux machine is that it's small, super low power consumption/no fans and already has WiFi and a multi-port gigabit Ethernet switch built in (as of this writing the RT-N16 is about $75, also). This N16 also has two USB ports for adding storage devices. Although a netbook with a usb ethernet NIC and 8 port switch strapped to it and also no battery so it powers off when you pull the power cord...well that would require two power cords anyway but...meh, forget it.
The original idea was to install DebWRT, basically Debian built for MIPS processors, on this router so I could set it up the same way I setup all my other servers.
I've run into a few snags in doing this however: DebWRT is a derivative of OpenWRT and the N16 is only available via the bleeding edge, recently compiled "trunk builds" of OpenWRT (referred to as "Barrier Breaker"). In other words DebWRT doesn't actually install on the N16 with a simple firmware download (as far as I know). It might with a custom compilation but I'm not sure I'm going to try that or want to do so that badly. And that the DebWRT web site keeps going down doesn't exactly help.
As of this writing I actually have my new first step completed: I managed to install OpenWRT on my N16. This took an enormous amount of time and frustration to simply realize it was supported in the bleeding edge trunk builds, not in the official release builds. As far as I can tell. Even then I got the build that finally worked from a server in Romania. And now, AFTER I figured this out, the OpenWRT wiki page finally shows as much.
I flashed over to the stock asus firmware to start this but there's no reason this wouldn't work from some other firmware like tomato. No idea about DD-WRT, haven't even tried that one...
List of ingredients:
For the next steps you'll need some ingredients/make a few PC adjustments:
First set a static IP address for 192.168.1.2 on your PC. On Windows this is easy with this command:
netsh interface ip set address name="Local Area Connection" static 192.168.1.2 255.255.255.0
Next download the Asus rescue flash utility. This is supposed to be possible via TFTP push as well but I never did get that to work.
You can now set your PC back to DHCP:
netsh interface ip set address name="Local Area Connection" source=dhcp
List of ingredients:
- ASUS RT-N16 Firmware Restoration Utility (only for windows)
- OpenWRT firmware that works on the RT-N16. It's supposed to work with the latest trunk builds. As of this writing I got the working from firmware at http://openwrt.razvi.ro/ (just using the one with the most recent date).
Update: this ravi.ro site seems to go up and down at random. I haven't tried the plain trunk build hosted by OpenWRT.org yet but that would be the next easiest pre-built image to try: http://downloads.openwrt.org/snapshots/trunk/brcm47xx/
Update again (august 1st, 2013): After struggling with USB support (see the July 31st post below) I decided I would "start over" with the latest barrier breaker/trunk build which was, appropriately enough, dated July 31st 2013. See link above.
- unplug router
- push and hold down the RED WPS BUTTON
- plug router in
- power LED should start blinking in a 3 blinks-and-pause sort of a pattern
- release WPS button
For the next steps you'll need some ingredients/make a few PC adjustments:
First set a static IP address for 192.168.1.2 on your PC. On Windows this is easy with this command:
netsh interface ip set address name="Local Area Connection" static 192.168.1.2 255.255.255.0
Next download the Asus rescue flash utility. This is supposed to be possible via TFTP push as well but I never did get that to work.
- Unplug router
- Use pen/paper clip/etc to push and hold down BLACK RESET BUTTON
- plug router in: within a second a two the power LED should start flashing in a once-per-second sort of pattern
- let go of reset button
- Use Asus flash utility to push the router firmware over. It will transfer over and start doing a restoration.
- You're supposed to wait "at least 7 minutes" for the router to reboot itself. Mine apparently rebooted in less than five seconds (the power LED blinked off, came back on and 192.168.1.1 was again ping-able).
netsh interface ip set address name="Local Area Connection" source=dhcp
The first the you want to do is logon to router via telnet. Just put in root for the user name and you'll be logged right in. Use the command passwd to set a new password. After that it should let you SSH into it with no issues.
Update: When I first wrote this I thought the convenient web interface for OpenWRT was already installed. Since re-installing I've learned it perhaps is not. The web interface is thus installed:
opkg install luci
The secondary step on enabling the http daemon is also necessary:
/etc/init.d/uhttpd start
After that the router should be reachable at http://192.168.1.1/
I should mention I switched firmware, from a pre-built binary from the Romanian site to the most recent trunk build. It could very well be the Romanian person compiled the luci into the firmware because the Luci I have now for the latest trunk build is way different/much better than the one I was on.
Theoretical summary of steps to completing this project:
- Get OpenWRT/DebWRT installed on my RT-N16 [completed with OpenWRT]
- Setup DNSMasq and a TFTP Daemon [All the router ports provide an IP and TFTP works!]
Update: it occurred that I didn't actually cover how to install tftpd-hpa so I'll make a quick little paragraph here.- First, once I was sure the router was actually on the internet I learned about the package manager, opkg: it's a lot like apt-get so I issued the update:
opkg update - Then, similar to apt-get as well, issue the command to install tftpd-hpa:
opkg install tftpd-hpa - This could as easily have been done through the web interface, luci, but i hadn't gotten there yet and I wanted to learn the commands
- First, once I was sure the router was actually on the internet I learned about the package manager, opkg: it's a lot like apt-get so I issued the update:
- Confirm USB storage devices are easily recognized in OpenWRT
- Successfully PXE boot a PC from the RT-N16 into DBAN/DOS image/memtest86+/whatever via image stored on USB storage device
Attachments
-
25.5 KB Views: 92