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

Hi,For many years I use a Raspberry Pi with Domoticz. And an Asus router RT-AC68U. In the router, I made a reservation for the IP-address for the RPi ...
Im looking for a new router to replace my basic Asus acrh13. I just switched from 3mbps dsl to a 100mbps cable internet connection for now & im also l...
I have used Networx network traffic monitor for a number of years and had no problems with it until I started using my RT-AC86U. Networx can either be...
I am looking for motion sensors that can connect with my Lenovo display(google assistant). Was looking at the smart things motion sensors but every st...
Have there been any revisions to this model, aka version numbers? Don't recall any like a bunch of other ASUS models have had. It's time to upgrade to...

Don't Miss These

  • 1
  • 2
  • 3