Like every other website on the planet, SmallNetBuilder uses cookies. Our cookies track login status, but we only allow admins to log in anyway, so those don't apply to you. Any other cookies you pick up during your visit come from advertisers, which we don't control.
If you continue to use the site, you agree to tolerate our use of cookies. Thank you!

Router Charts

Click for Router Charts

Router Ranker

Click for Router Ranker

NAS Charts

Click for NAS Charts

NAS Ranker

Click for NAS Ranker

More Tools

Click for More Tools

NAS How To

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.

SmallNetBuilder, Pudai LLC 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.

More NAS

Wi-Fi System Tools
Check out our Wi-Fi System Charts, Ranker and Finder!

Support Us!

If you like what we do and want to thank us, just buy something on Amazon. We'll get a small commission on anything you buy. Thanks!

Over In The Forums

I own an AC86U router and I want UPnP disabled. Unfortunately I've been told UPnP must be enabled for my mates new internet-of-things Phillips Hue lig...
Hi, this is my first post to SNBForums, and its very nice to be here. (if this is posted in the wrong area I apologize) After reading many posts, this...
say, what are people using here ?? Default message log levelLog only messages more urgent thanmy log was full of dhcp, and everything else.what would ...
So, my Asus RT-AC1300UHP has been behaving weirdly lately. This has been happening for the last two days. Suddenly, my connected mobile phones will sh...
I see a difference here in my bridge 192.168.1.15, which in connected to an access point 192.168.1.11Why the difference in transmission rates?View att...

Don't Miss These

  • 1
  • 2
  • 3