stillhq.com : Mikal, a geek from Canberra living in Silicon Valley http://www.stillhq.com The life, times, travel and software of Michael Still en Copyright (c) Michael Still 2000 - 2006 blosxom simplerss20 v20050208hh 180 http://blogs.law.harvard.edu/tech/rss OMG, Kernel modules /diary/toys/nslu2 Fri, 18 Aug 2006 22:16:00 PST So, once you've Debian bootstrapped the NSLU2 slug, there isn't any way I can see to get new kernel modules for DebianSlug. However, you can <a href="http://www.student-zw.fh-kl.de/~pasc0010/debianslug/kernel-modules/kernel-2.6.16_preempt/">download the unslung kernel modules, unpack them and use the kernel module from that</a>. Unpacking looks like this: <br/><br/> <ul><pre> wget "http://www.student-zw.fh-kl.de/~pasc0010/debianslug/kernel-modules/ kernel-2.6.16_preempt/kernel-module-raid1_2.6.16-rc4-git9-r0.0_ixp4xxle.ipk" ar -x kernel-module-raid1_2.6.16-rc4-git9-r0.0_ixp4xxle.ipk tar xvzf data.tar.gz cd lib/modules/2.6.16/kernel/drivers/md/ </pre></ul> <br/><br/> And there you go. <br/><br/><i>Tags for this post: blog(<a href="http://www.stillhq.com/diary"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/nslu2/000004&tag=blog&format=.png" border="0" alt="S"></a>) toys(<a href="http://www.stillhq.com/toys"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/nslu2/000004&tag=toys&format=.png" border="0" alt="S"></a>) nslu2(<a href="http://www.stillhq.com/nslu2"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/nslu2/000004&tag=nslu2&format=.png" border="0" alt="S"></a>) </i> <a href="http://www.stillhq.com/diary/toys/nslu2/000004.commentform.html">Comment</a> http://www.stillhq.com/diary/toys/nslu2/000004.html http://www.stillhq.com/diary/toys/nslu2/000004.html Debian bootstrap complete /diary/toys/nslu2 Fri, 18 Aug 2006 11:53:00 PST <a href="http://www.nslu2-linux.org/wiki/DebianSlug/Bootstrap">Debian bootstrap is easy, but time consuming on the slug</a>. That is all. <br/><br/><i>Tags for this post: blog(<a href="http://www.stillhq.com/diary"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/nslu2/000003&tag=blog&format=.png" border="0" alt="S"></a>) toys(<a href="http://www.stillhq.com/toys"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/nslu2/000003&tag=toys&format=.png" border="0" alt="S"></a>) nslu2(<a href="http://www.stillhq.com/nslu2"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/nslu2/000003&tag=nslu2&format=.png" border="0" alt="S"></a>) </i> <a href="http://www.stillhq.com/diary/toys/nslu2/000003.commentform.html">Comment</a> http://www.stillhq.com/diary/toys/nslu2/000003.html http://www.stillhq.com/diary/toys/nslu2/000003.html Recovering from a bad flash /diary/toys/nslu2 Thu, 17 Aug 2006 18:29:00 PST <a href="/diary/toys/nslu2/000001.html">In the previous post</A> I mentioned that I had a couple of bad experiences with the Debian installer and the Linksys upload web page. <a href="http://www.nslu2-linux.org/wiki/HowTo/TelnetIntoRedBoot">Luckily, it's really easy to recover from these</a>. You do that with the magical RedBoot sequence (RedBoot is the boot loader the slug uses). Do something like this: <br/><br/> Download the Linksys firmware from their web site. I tried this technique with the Debian installer image and it didn't work, so I only know it works with the Linksys firmware. Put that firmware on a web server on your local LAN which the slug will have access to. Then, connect to the boot loader. You do that by running this command... <br/><br/> <ul><pre> sudo arping -f 192.168.0.1; telnet 192.168.0.1 9000 </pre></ul> <br/><br/> ...and then power cycling the slug. You'll end up with this: <br/><br/> <ul><pre> $ sudo arping -f 192.168.0.1; telnet 192.168.0.1 9000 ARPING 192.168.0.1 from 192.168.0.100 eth0 Unicast reply from 192.168.0.1 [00:0F:66:7D:1E:09] 10.717ms Sent 17 probes (17 broadcast(s)) Received 1 response(s) Trying 192.168.0.1... Connected to 192.168.0.1 (192.168.0.1). Escape character is '^]'. == Executing boot script in 1.670 seconds - enter ^C to abort ^C RedBoot&gt; </pre></ul> <br/><br/> You have to be pretty quick on the draw here with the control C, as you have about 2 seconds to hit the sequence before the slug starts to boot normally instead. Now that you're logged in, you can download the new firmware: <br/><br/> <ul><pre> ip_address -h 192.168.1.100 <b>The IP of the HTTP server</b> load -r -v -b 0x01000000 -h 192.168.0.100 -m http /NSLU2_V23R25.bin <b>Load the firmware file</b> fis write -f 0x50060000 -b 0x01060000 -l 0x7a0000 <b>Write it</b> reset <b>Reboot</b> </pre></ul> <br/><br/> And you should be back at the Linksys firmware. Note that you will still have the network settings that you had set before... <br/><br/><i>Tags for this post: blog(<a href="http://www.stillhq.com/diary"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/nslu2/000002&tag=blog&format=.png" border="0" alt="S"></a>) toys(<a href="http://www.stillhq.com/toys"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/nslu2/000002&tag=toys&format=.png" border="0" alt="S"></a>) nslu2(<a href="http://www.stillhq.com/nslu2"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/nslu2/000002&tag=nslu2&format=.png" border="0" alt="S"></a>) </i> <a href="http://www.stillhq.com/diary/toys/nslu2/000002.commentform.html">Comment</a> http://www.stillhq.com/diary/toys/nslu2/000002.html http://www.stillhq.com/diary/toys/nslu2/000002.html Slugging away /diary/toys/nslu2 Thu, 17 Aug 2006 18:23:00 PST <table> <tr> <td><img src="/diary/pictures/nslu2.jpg"></td><td> I've been sitting on a Linksys NSLU2 for a few weeks until I time to hack at it. That time came today. The NSLU2 (called a slug) is a Linksys NAS device, which runs Linux natively. There are two USB 2.0 ports, and a wired ethernet port. The CPU runs at 133MHz normally, but that can be bumped up to 266MHz by removing a resistor from the board. <a href="http://www.nslu2-linux.org/wiki/Main/HomePage">Thanks for the NSLU2 Linux project</A> you can also run your own distro on them, and do cool random things. Oh, and they're cheap at about $60 to $90 US. <br/><br/> So, let's talk about the install of Debian on this thing. First off, you need to use the Linksys user interface to configure the network settings. I recommend a static IP, because otherwise it's going to use DHCP, which will make it hard to find later... <br/><br/> There is a Debian installer option, which uploads firmware via the Linksys web interface, and then you run through the installation with ssh. That's a great idea, and I would be much more keen on it if it had worked. I gave it a couple of tries, and then declared it not working. <br/><br/> Instead, I went for the <a href="http://www.nslu2-linux.org/wiki/DebianSlug/HomePage">DebianSlug image</a>, which isn't as Debiany as the Debian installer option. Think ipkg instead of dpkg. You need to grab <a href="http://www.slug-firmware.net/s-dls.php">the firmware image</a>, and a program called <a href="http://nslu.cvs.sourceforge.net/nslu/">upslug2</a>, for which you can find a source download at <a href="http://sourceforge.net/project/showfiles.php?group_id=116564&package_id=164337">SourceForge</a>. Do the normal source building thing with upslug2. <br/><br/> Next, you need to grow another arm, and try the magical reset sequence, which is <a href="http://www.nslu2-linux.org/wiki/SlugOS/UsingTheBinary">documented under the heading "Flashing the image" on this page</a>. Then, run upslug like this: <br/><Br/> <ul><pre> $ sudo ./upslug2 -i <i>path to firmware image from before</i> Password: LKG7D1E09 00:0f:66:7d:1e:09 Product ID: 1 Protocol ID:0 Firmware Version: R23V63 [0x2363] Upgrading LKG7D1E09 00:0f:66:7d:1e:09 . original flash contents * packet timed out ! being erased - erased u being upgraded U upgraded v being verified V verified Display: &lt;status&gt; &lt;address completed&gt;+&lt;bytes transmitted but not completed&gt; Status: * timeout occured + sequence error detected 7983f+000000 ...u------------------------------------------------------------ </pre></ul> <br/><Br/> This takes a while. Be patient, it probably hasn't crashed. Probably. <br/><br/> The slug will reboot, and now you can ssh into it to play. Use the username root, and the password opeNSLUg. At this point it's a useful computer, and you can keep it like this if you don't mind using ipkg for everything and dealing with the rather limited set of packages available. If you need pointers on where to go from here, then I recommend you try a <i>turnup help</i> on the command line, and play with <i>ipkg update</i> and it s friends <i>ipkg list</i> and <i>ipkg install</i>. There are <a href="http://www.nslu2-linux.org/wiki/OpenSlug/InitialisingOpenSlug">more instructions here if you want them</a>. </td></tr></table> <br/><br/><i>Tags for this post: blog(<a href="http://www.stillhq.com/diary"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/nslu2/000001&tag=blog&format=.png" border="0" alt="S"></a>) toys(<a href="http://www.stillhq.com/toys"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/nslu2/000001&tag=toys&format=.png" border="0" alt="S"></a>) nslu2(<a href="http://www.stillhq.com/nslu2"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/nslu2/000001&tag=nslu2&format=.png" border="0" alt="S"></a>) </i> <a href="http://www.stillhq.com/diary/toys/nslu2/000001.commentform.html">Comment</a> http://www.stillhq.com/diary/toys/nslu2/000001.html http://www.stillhq.com/diary/toys/nslu2/000001.html