Lost Password? No account yet? Sign up! Why bother?
  • Narrow screen resolution
  • Wide screen resolution
  • Auto width resolution
  • Increase font size
  • Decrease font size
  • Default font size

SmallNetBuilder - Small Network Help

  
Home arrow NAS arrow NAS How To arrow How To: Hacking the Linksys NSLU2 - Part 4- Customizing the Flash
How To: Hacking the Linksys NSLU2 - Part 4- Customizing the Flash Print E-mail
Jim Buzbee   
September 09, 2004

Introduction

I hope you've been enjoying the extensions you've made to your NSLU2 based on my previous articles [Part 1] [Part 2] [Part 3 ]. What we've accomplished is powerful, but there's something missing. Any time your box reboots, all of our new processes such as telnet, NFS and mt-daapd need to be manually started again. Surely we can do something to automatically start these processes at boot time like a standard computer.

If this were a normal computer we would just put our startup scripts into the boot sequence. On Linux this would mean tracing the startup sequence beginning with the first process, init, and moving through the rc script directory. We would position our script to be called somewhere after networking was initialized. But on this box it's not quite so easy. The entire startup sequence is stored on a RAM disk. Any changes we make on this disk are lost when the box reboots.

I spent quite a bit of time looking for a "hook", a file on the disk where we could put a reference to a custom script. One example of this would be crontab, a file on Unix-like systems that defines processes to be run at specific times. If we could put a reference to a custom script in crontab, Linux would run it for us. Unfortunately on the NSLU2, crontab is also on RAM disk.

The only possible file I found was the Samba configuration file. Samba had some capabilities to run external processes specified in the configuration file, but ultimately this led to a dead-end as well. My original goal was to add functionality without modifying the standard Linksys firmware, but it became apparent that there would be no easy way to do this.

Luckily, while I was spinning my wheels looking for a boot up hook, other members of the NSLU2 development community were taking a different approach. They were exploring the possibility of modifying the Linksys firmware itself. If you can modify the code in the Flash, you can change the boot up sequence to do any number of things including starting up new processes. It may seem an extreme approach, but since this is a Linux system, the layout of the Flash image is fairly standardized and well understood.

NOTE!Disclaimer: It goes without saying, but I'll say it anyway. Exploring the NSLU2 by looking at its internal file structures using any method that doesn't modify its code should leave your warranty intact. But modifying the NSLU2 in any way will void your warranty.

TomsNetworking, Tom's Guides Publishing and I are not responsible for any damage that the information in this article may cause to your NSLU2 or any data it manages.

So download a copy of the current firmware before you start, and don't go trying to get help from Linksys if you break it.



Tags: BYOD, Hacking, How To, Linksys, NAS, NSLU2,

Related Articles:

How To: Hacking the Linksys NSLU2 - Part 5- Moving to Unslung
How To: Hacking the Linksys NSLU2 - Part 2 - Adding NFS
How To:Hacking the Linksys NSLU2 - Part 3 - Adding an iTunes server
Hacking the Linksys NSLU2 Part VI - Installing a Media Server
How To: Hacking the Linksys NSLU2 - Part 1
 

Most Read

 
 

Over At The Forums

Are Cat6 and Cat5e not perfectly compatible?
So, I was rearranging some of my network today (notably moving my router to a different room) and I noticed something very odd. When I...

Captive portal for security
I've read about this in the previous Bed & Breakfast thread. Our company wants to get wireless going on one of the floors. There is only personal...

D-Link DNS-323 Mysteries
Hello folks. I'm having issues with my Nas and looking for some thoughts. 1. The 323 gets recognised by Vista as a network device but...

Gigabit Network Help!
I have a gigabit NAS (D-link 323) that I have connected to a D-Link DGS-1005D gigabit switch. I then have my desktop connected to...

Synology DS-209+ review up!!
Looks real good. Now Netgear needs to play catchup and dump that old Infrant CPU for something more modern and powerful!! http://www.trustedreviews.com/networ...ion-DS-209-/p1

Slideshows

NETGEAR ReadyNAS Pro Western Digital ShareSpace QNAP TS-509 Pro D-Link DNS-343 4-Bay Network Storage Enclosure Thecus N3200 RAID 5 NAS D-Link DIR-628 RangeBooster N Dual Band Router More

Win This!

Enter to Win!

You could win a Trendnet TEW-633GR Wireless N Gigabit Router and two TEW-621PC 300Mbps Wireless N-Draft PC Cards

Learn How!

 

Ldr:0.00162982940674, Rct:0.00565385818481, Sky:0.00737500190735, Tlink:0.225809812546, TopPG:0.225883960724, GQV:0.226113796234 seconds to load.