michael still google inc. october, 2006. 2 linux on the linksys nslu2 solving all your problems with...
TRANSCRIPT
![Page 1: Michael Still Google Inc. October, 2006. 2 Linux on the Linksys NSLU2 Solving all your problems with little NAS boxes Michael Still Google, Inc. October,](https://reader030.vdocuments.us/reader030/viewer/2022032703/56649f575503460f94c7b561/html5/thumbnails/1.jpg)
Michael StillGoogle Inc.October, 2006
![Page 2: Michael Still Google Inc. October, 2006. 2 Linux on the Linksys NSLU2 Solving all your problems with little NAS boxes Michael Still Google, Inc. October,](https://reader030.vdocuments.us/reader030/viewer/2022032703/56649f575503460f94c7b561/html5/thumbnails/2.jpg)
2
Linux on the Linksys NSLU2Solving all your problems
with little NAS boxes
Michael StillGoogle, Inc.October, 2006
![Page 3: Michael Still Google Inc. October, 2006. 2 Linux on the Linksys NSLU2 Solving all your problems with little NAS boxes Michael Still Google, Inc. October,](https://reader030.vdocuments.us/reader030/viewer/2022032703/56649f575503460f94c7b561/html5/thumbnails/3.jpg)
3
Who is this guy?
![Page 4: Michael Still Google Inc. October, 2006. 2 Linux on the Linksys NSLU2 Solving all your problems with little NAS boxes Michael Still Google, Inc. October,](https://reader030.vdocuments.us/reader030/viewer/2022032703/56649f575503460f94c7b561/html5/thumbnails/4.jpg)
4
What does he do at Google?
![Page 5: Michael Still Google Inc. October, 2006. 2 Linux on the Linksys NSLU2 Solving all your problems with little NAS boxes Michael Still Google, Inc. October,](https://reader030.vdocuments.us/reader030/viewer/2022032703/56649f575503460f94c7b561/html5/thumbnails/5.jpg)
5
Linksys NSLU2 NAS boxes
Consumer grade network attached storage
• 2 USB 2.0 ports
• 100 Mbit Wired Ethernet
• 133 Mhz processor
• 32 MB of RAM
• Cheap ($60 USD+)
• Linux
![Page 6: Michael Still Google Inc. October, 2006. 2 Linux on the Linksys NSLU2 Solving all your problems with little NAS boxes Michael Still Google, Inc. October,](https://reader030.vdocuments.us/reader030/viewer/2022032703/56649f575503460f94c7b561/html5/thumbnails/6.jpg)
6
Agenda
I want to cover:
• How to run your own Linux
• How to rescue yourself from a bad flash attempt
• Some ideas for projects involving NSLU2s
![Page 7: Michael Still Google Inc. October, 2006. 2 Linux on the Linksys NSLU2 Solving all your problems with little NAS boxes Michael Still Google, Inc. October,](https://reader030.vdocuments.us/reader030/viewer/2022032703/56649f575503460f94c7b561/html5/thumbnails/7.jpg)
7
How to run your own Linux
The process
• Download new firmware and upslug2 (the uploader)
– http://www.slug-firmware.net/s-dls.php
– http://sourceforge.net/project/showfiles.php?group_id=116564&package_id=164337
• Build upslug2
• Use the upgrade button pressing process
– http://www.nslu2-linux.org/wiki/SlugOS/UsingTheBinary
– You'll need a third arm here
• Run upslug2 with the new image, and watch it download
– sudo ./upslug2 -i path to firmware image from before
![Page 8: Michael Still Google Inc. October, 2006. 2 Linux on the Linksys NSLU2 Solving all your problems with little NAS boxes Michael Still Google, Inc. October,](https://reader030.vdocuments.us/reader030/viewer/2022032703/56649f575503460f94c7b561/html5/thumbnails/8.jpg)
8
How to run your own Linux
Demo of running UpSlug
![Page 9: Michael Still Google Inc. October, 2006. 2 Linux on the Linksys NSLU2 Solving all your problems with little NAS boxes Michael Still Google, Inc. October,](https://reader030.vdocuments.us/reader030/viewer/2022032703/56649f575503460f94c7b561/html5/thumbnails/9.jpg)
9
What did that give us?
DebianSlug
• A Debian install based on OpenSlug
– ipkg for package management
– Very small
– More limited package options
• Use turnup to bless a new root file system
– That can be a USB thumb drive or a USB hard disk
![Page 10: Michael Still Google Inc. October, 2006. 2 Linux on the Linksys NSLU2 Solving all your problems with little NAS boxes Michael Still Google, Inc. October,](https://reader030.vdocuments.us/reader030/viewer/2022032703/56649f575503460f94c7b561/html5/thumbnails/10.jpg)
10
What did that give us?
Demo of DebianSlug
![Page 11: Michael Still Google Inc. October, 2006. 2 Linux on the Linksys NSLU2 Solving all your problems with little NAS boxes Michael Still Google, Inc. October,](https://reader030.vdocuments.us/reader030/viewer/2022032703/56649f575503460f94c7b561/html5/thumbnails/11.jpg)
11
Debian Unstable
The next step is Debian Unstable
• Use the bootstrap process defined at:
– http://www.nslu2-linux.org/wiki/DebianSlug/Bootstrap
– Very slow
• Use turnup to bless the new root file system
![Page 12: Michael Still Google Inc. October, 2006. 2 Linux on the Linksys NSLU2 Solving all your problems with little NAS boxes Michael Still Google, Inc. October,](https://reader030.vdocuments.us/reader030/viewer/2022032703/56649f575503460f94c7b561/html5/thumbnails/12.jpg)
12
Kernel modules
There don't appear to be any Debian ARM kernel modules
• You need to use the pre-compiled ones from:
– http://www.student-zw.fh-kl.de/~pasc0010/debianslug/kernel-modules/kernel-2.6.16_preempt/
– Extract the package, grab the kernel module, and install it
wget URL to download
ar -x download.ipk
tar xvzf data.tar.gz
cd lib/modules/2.6.16/kernel/...
• Copy that to the slug, and don't forget to run depmod -a
![Page 13: Michael Still Google Inc. October, 2006. 2 Linux on the Linksys NSLU2 Solving all your problems with little NAS boxes Michael Still Google, Inc. October,](https://reader030.vdocuments.us/reader030/viewer/2022032703/56649f575503460f94c7b561/html5/thumbnails/13.jpg)
13
Recovering from a bad flash
My first attempt at flashing resulted in a brick
• It's really easy to recover though
• Download the Linksys firmware, and put it on a web server
sudo arping -f 192.168.0.1;
telnet 192.168.0.1 9000
• Now power cycle the slug
• You have two seconds to hit control-c to stop a normal boot
• You end up in RedBoot
– A network aware boot loader
![Page 14: Michael Still Google Inc. October, 2006. 2 Linux on the Linksys NSLU2 Solving all your problems with little NAS boxes Michael Still Google, Inc. October,](https://reader030.vdocuments.us/reader030/viewer/2022032703/56649f575503460f94c7b561/html5/thumbnails/14.jpg)
14
Recovering from a bad flash continued
My first attempt at flashing resulted in a brick
• Now download the firmware from the web server
ip_address -h 192.168.1.100
load -r -v -b 0x01000000 -h 192.168.0.100
-m http /NSLU2_V23R25.bin
fis write -f 0x50060000 -b 0x01060000
-l 0x7a0000
reset
• The slug will power cycle
• You're back at the Linksys firmware, and ready to try again
![Page 15: Michael Still Google Inc. October, 2006. 2 Linux on the Linksys NSLU2 Solving all your problems with little NAS boxes Michael Still Google, Inc. October,](https://reader030.vdocuments.us/reader030/viewer/2022032703/56649f575503460f94c7b561/html5/thumbnails/15.jpg)
15
Recovering from a bad flash continued
Demo of RedBoot
![Page 16: Michael Still Google Inc. October, 2006. 2 Linux on the Linksys NSLU2 Solving all your problems with little NAS boxes Michael Still Google, Inc. October,](https://reader030.vdocuments.us/reader030/viewer/2022032703/56649f575503460f94c7b561/html5/thumbnails/16.jpg)
16
Completely un-scientific testing
I am mainly interested in slugs as ATA over Ethernet NAS devices
• Compare performance of various firmware options
• Methodology
– Use postmark
set size 1000 9000
set number 2000
set transactions 50000
set location /mnt
set report verbose
run
![Page 17: Michael Still Google Inc. October, 2006. 2 Linux on the Linksys NSLU2 Solving all your problems with little NAS boxes Michael Still Google, Inc. October,](https://reader030.vdocuments.us/reader030/viewer/2022032703/56649f575503460f94c7b561/html5/thumbnails/17.jpg)
17
Postmark results
postmark will give you back results like this:Time:149 seconds total148 seconds of transactions (337 per second)
Files:27170 created (182 per second)
Creation alone: 2000 files (2000 per second)Mixed with transactions: 25170 files (170 per second)
24986 read (168 per second)24697 appended (166 per second)27170 deleted (182 per second)
Deletion alone: 2340 files (2340 per second)Mixed with transactions: 24830 files (167 per second)
Data:149.53 megabytes read (1.00 megabytes per second)161.85 megabytes written (1.09 megabytes per second)
![Page 18: Michael Still Google Inc. October, 2006. 2 Linux on the Linksys NSLU2 Solving all your problems with little NAS boxes Michael Still Google, Inc. October,](https://reader030.vdocuments.us/reader030/viewer/2022032703/56649f575503460f94c7b561/html5/thumbnails/18.jpg)
18
Permutations tested
Direct attached USB2
SMB using the Linksys firmware
SMB using DebianSlug
SMB using Debian Unstable
ATA over Ethernet using Debian Unstable
![Page 19: Michael Still Google Inc. October, 2006. 2 Linux on the Linksys NSLU2 Solving all your problems with little NAS boxes Michael Still Google, Inc. October,](https://reader030.vdocuments.us/reader030/viewer/2022032703/56649f575503460f94c7b561/html5/thumbnails/19.jpg)
19
Results
Create Create Alone
Create Mixed
Read Append Delete Delete Alone
Delete Mixed
0
500
1000
1500
2000
2500
Direct Attached USB2SMB LinksysSMB DebianSlugSMB Debian UnstableATA over Ethernet
![Page 20: Michael Still Google Inc. October, 2006. 2 Linux on the Linksys NSLU2 Solving all your problems with little NAS boxes Michael Still Google, Inc. October,](https://reader030.vdocuments.us/reader030/viewer/2022032703/56649f575503460f94c7b561/html5/thumbnails/20.jpg)
20
Results
Total time (seconds) Transactions sections0
20
40
60
80
100
120
140
160
Direct Attached USB2
SMB Linksys
SMB DebianSlug
SMB Debian Unstable
ATA over Ethernet
![Page 21: Michael Still Google Inc. October, 2006. 2 Linux on the Linksys NSLU2 Solving all your problems with little NAS boxes Michael Still Google, Inc. October,](https://reader030.vdocuments.us/reader030/viewer/2022032703/56649f575503460f94c7b561/html5/thumbnails/21.jpg)
21
Results
Data Read Rate Data Write Rate0
1000
2000
3000
4000
5000
6000
Direct Attached USB2
SMB Linksys
SMB DebianSlug
SMB Debian Unstable
ATA over Ethernet
![Page 22: Michael Still Google Inc. October, 2006. 2 Linux on the Linksys NSLU2 Solving all your problems with little NAS boxes Michael Still Google, Inc. October,](https://reader030.vdocuments.us/reader030/viewer/2022032703/56649f575503460f94c7b561/html5/thumbnails/22.jpg)
22
Other project ideas
There are lots of things you can do with low powered Linux machines with USB
• Car computing (with a USB wireless card)
• GPS data logging (USB GPS)
• Small sound player (with USB sound card and USB remote control)
• Lots of other things
![Page 23: Michael Still Google Inc. October, 2006. 2 Linux on the Linksys NSLU2 Solving all your problems with little NAS boxes Michael Still Google, Inc. October,](https://reader030.vdocuments.us/reader030/viewer/2022032703/56649f575503460f94c7b561/html5/thumbnails/23.jpg)
23
Questions?
Any questions?
I'll be putting these slides up online at http://www.stillhq.com when I get
back to Canberra tomorrow morning.
![Page 24: Michael Still Google Inc. October, 2006. 2 Linux on the Linksys NSLU2 Solving all your problems with little NAS boxes Michael Still Google, Inc. October,](https://reader030.vdocuments.us/reader030/viewer/2022032703/56649f575503460f94c7b561/html5/thumbnails/24.jpg)
24
One final note
Google is hiring, both domestically within Australia, and Internationally. Talk to me if you want to know more.
![Page 25: Michael Still Google Inc. October, 2006. 2 Linux on the Linksys NSLU2 Solving all your problems with little NAS boxes Michael Still Google, Inc. October,](https://reader030.vdocuments.us/reader030/viewer/2022032703/56649f575503460f94c7b561/html5/thumbnails/25.jpg)
Michael StillGoogle, [email protected]