Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
NSLU2 based Linux File Server
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Tue Feb 23, 2010 5:39 pm    Post subject: NSLU2 based Linux File Server Reply with quote

I have an old NSLU2 lying around that I brought 3.5 years ago for the purpose of setting up a NAS in my home. I tried installing open firmware on it back then and I ended up bricking it. I abandoned my home NAS project at that time, but since I brought my Linksys WRT54GS v2.1 back into service yesterday and I want to gradually transition my home from Windows Media Center to some sort of Linux based media center, I am thinking of making another attempt at getting a NAS setup in my home.

I think I still have the bricked NSLU2 lying around the house somewhere and assuming I can both find it and unbrick it, I would like to use it as a file server. I have a 320GB SATA hard drive from back then in an external USB enclosure that I was planning to use as external storage. It seems that it is possible to install Gentoo Linux on it:

http://www.gentoo-wiki.info/Gentoo_on_NSLU2

If I were to install Gentoo Linux on it with the purpose of storing television recordings and stage4 tarball backups of my laptop (roughly 1.4GB in size), which are all multigigabyte files, what sort of performance could I expect from it? Is there any sort of bottleneck I might encounter that would keep me from reading and writing multiple high definition streams to it in real time?
Back to top
View user's profile Send private message
V-Li
Retired Dev
Retired Dev


Joined: 03 Jan 2006
Posts: 613

PostPosted: Tue Feb 23, 2010 6:30 pm    Post subject: Reply with quote

Honestly? I bricked a NSLU2 some time ago and its performance is well under par. The processor is slow, the USB is slow and I would recommend going for some more recent ARM machine.
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Tue Feb 23, 2010 11:10 pm    Post subject: Reply with quote

Do you have any suggestions for what I could get? Is anything that can run Linux, has a strong processor and has at least 1 USB port and 1 ethernet port good or should I look for something more sophisticated?

Would the Asus RT-16N be a good choice?

http://www.asus.com/product.aspx?P_ID=WAa6AQFncrceRBEo
Back to top
View user's profile Send private message
V-Li
Retired Dev
Retired Dev


Joined: 03 Jan 2006
Posts: 613

PostPosted: Wed Feb 24, 2010 7:53 am    Post subject: Reply with quote

Atom-based NAS are fast, but also expensive. Maybe you drop into IRC and ask in #gentoo-embedded, there are lots of folks that are deep into these kind of things.
Back to top
View user's profile Send private message
ccp
n00b
n00b


Joined: 14 Sep 2007
Posts: 62

PostPosted: Wed Feb 24, 2010 2:30 pm    Post subject: Reply with quote

I recommend sheevaplug as replacement for nslu2.
Back to top
View user's profile Send private message
slackline
Veteran
Veteran


Joined: 01 Apr 2005
Posts: 1471
Location: /uk/sheffield

PostPosted: Wed Feb 24, 2010 4:21 pm    Post subject: Reply with quote

V-Li wrote:
Honestly? I bricked a NSLU2 some time ago and its performance is well under par. The processor is slow, the USB is slow and I would recommend going for some more recent ARM machine.


Maybe the poor performance was 'cause it was bricked? :lol:

I've an NSLU2 and did get Gentoo running on it, but its pretty useless for doing anything other than streaming MP3's, just not powerful enough, I second V-Li's recommendation to consider something more powerful.
_________________
"Science is what we understand well enough to explain to a computer.  Art is everything else we do." - Donald Knuth
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Wed Feb 24, 2010 6:24 pm    Post subject: Reply with quote

Moved from Gentoo Chat to Gentoo on Alternative Architectures.
Better off here
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
V-Li
Retired Dev
Retired Dev


Joined: 03 Jan 2006
Posts: 613

PostPosted: Wed Feb 24, 2010 9:20 pm    Post subject: Reply with quote

slack---line wrote:
V-Li wrote:
Honestly? I bricked a NSLU2 some time ago and its performance is well under par. The processor is slow, the USB is slow and I would recommend going for some more recent ARM machine.


Maybe the poor performance was 'cause it was bricked? :lol:


No, its brick-performance was just at the maximum possible.
Back to top
View user's profile Send private message
slackline
Veteran
Veteran


Joined: 01 Apr 2005
Posts: 1471
Location: /uk/sheffield

PostPosted: Thu Feb 25, 2010 11:35 am    Post subject: Reply with quote

@V-Li : I was joking :wink:
_________________
"Science is what we understand well enough to explain to a computer.  Art is everything else we do." - Donald Knuth
Back to top
View user's profile Send private message
V-Li
Retired Dev
Retired Dev


Joined: 03 Jan 2006
Posts: 613

PostPosted: Thu Feb 25, 2010 11:48 am    Post subject: Reply with quote

slack---line wrote:
@V-Li : I was joking :wink:


So was I. I hate smileys.
Back to top
View user's profile Send private message
orvtech
Tux's lil' helper
Tux's lil' helper


Joined: 28 Aug 2004
Posts: 115
Location: US. Florida

PostPosted: Thu Mar 11, 2010 10:32 pm    Post subject: Reply with quote

TBH i dont think it is slow, i have been running a webserver for the past 4 years on it along with torrent server/client, FTP, SSH, DNS, Mail, etc... i have even done some livecast of autocross races (generating images, etc... http://www.subyforums.com/livecast/753984271.jpg).

I have been having some trouble to reinstall it with Gentoo tho... lots of packages broken. Could anyone share a stage3 with me?
_________________
http://orvtech.com
http://www.linuxevolution.org
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Thu Mar 18, 2010 3:50 am    Post subject: Reply with quote

It turned out that I did not throw away my NSLU2 and to make things even better, I did not brick it either; I only thought I did. I just found it in my closet and apparently, it still has the stock Linksys firmware on it. I was inexperienced with these things back then, so I did not realize my attempt to flash it did not touch its flash at all.

I am on a limited budget, so since I have the NSLU2 available to me, I want to try getting it to work. I want it to do these things:

  • Run as a file server, such that I can just ssh stage4 tarball backups of my laptop's hard drive to it over the network.
  • Run as a private rsync mirror for portage
  • Run a VPN server

Would someone direct me to resources that might be helpful in doing this? Also, while I want to install Gentoo Linux on it, the difficulty of getting it onto the NSLU2 makes me wonder if it would be possible to evaluate its performance in those categories with another OS, such as OpenWRT, so I can get an idea of whether or not it would be worthwhile to even use it before I go ahead with a Gentoo Linux installation that I expect would take months to compile (I like running ~arch).

Lastly, I know that the wiki suggests having Gentoo piggyback on a SlugOS installation, but with the idea of using OpenWRT as a test OS to see how things perform in mind, would there be any issue if I had Gentoo piggyback on OpenWRT instead of SlugOS? This approach is attractive to me because I have DD-WRT installed on a Linksys WRT54GS router I have on my home network and the common Lineage DD-WRT shares with OpenWRT makes me expect that I would have an easier time working with OpenWRT than SlugOS, which as far as I can tell, has as little in common with Linux distributions I have used in the past as is possible.
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Fri Mar 19, 2010 3:05 am    Post subject: Reply with quote

Okay, I have OpenWRT running on my NSLU2. I initially compiled OpenWRT without telnet support, so I bricked my NSLU2 after I flashed it because apparently, the default root password is empty and OpenWRT has dropbear's sshd_config file's PermitEmptyPasswords property set to no by default. After realizing what had happened, I proceeded to rebuilt the firmware with telnet support, managed to connect to it via redboot and reflashed it with the new firmware, a process which is much harder than it sounds the first time you attempt it. I learned a nice amount about nmap, route and arping in the process.

Anyway, my NSLU2 worked like a charm after that. In case anyone has the same sort of problem, here are some resources that helped me:

http://www.gentoo.org/doc/en/gentoo-sparc-netboot-howto.xml?style=printable
http://www.albany.edu/its/quickstarts/qs-telnet.html
http://www.nslu2-linux.org/wiki/HowTo/TelnetIntoRedBoot
http://www.nslu2-linux.org/wiki/HowTo/ReflashUsingRedbootAndTFTP

It is late, but the next item on my to-do list with this is to get an external hard drive working. Then I will try installing Gentoo on top of OpenWRT after my classes tomorrow.
Back to top
View user's profile Send private message
orvtech
Tux's lil' helper
Tux's lil' helper


Joined: 28 Aug 2004
Posts: 115
Location: US. Florida

PostPosted: Fri Mar 19, 2010 3:14 am    Post subject: Reply with quote

the problem with that guide is that it is outdated, it works with the stage3-armeb-uclibc-softfloat-2005.1.tar.bz2 which is 5 years old and as soon as you try to compile anything it will break. I have been trying to find an updated stage3 but havent have any success. right now I have my slug running de Debian installation but frankly it is slower than my old gentoo install.
_________________
http://orvtech.com
http://www.linuxevolution.org
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Fri Mar 19, 2010 10:24 am    Post subject: Reply with quote

orvtech wrote:
the problem with that guide is that it is outdated, it works with the stage3-armeb-uclibc-softfloat-2005.1.tar.bz2 which is 5 years old and as soon as you try to compile anything it will break. I have been trying to find an updated stage3 but havent have any success. right now I have my slug running de Debian installation but frankly it is slower than my old gentoo install.


Maybe we could bootstrap it with the instructions in the faq:

http://www.gentoo.org/doc/en/faq.xml#stage12

Otherwise, it might be necessary to start with a stage 1. I wonder if instructions for doing that are still available.
Back to top
View user's profile Send private message
orvtech
Tux's lil' helper
Tux's lil' helper


Joined: 28 Aug 2004
Posts: 115
Location: US. Florida

PostPosted: Fri Mar 19, 2010 7:17 pm    Post subject: Reply with quote

Yes you culd but the SlugOS that the guide suggest has an outdated toolchain and an outdated kernel. so in theory you would have to take one of the other firmwares and start from there. I do have 2 NSLU2 at home just for this but havent had a chance to start working on this for the past 2 years, these next 10 days I think i have time, ill try something.
_________________
http://orvtech.com
http://www.linuxevolution.org
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Sat Mar 20, 2010 2:36 am    Post subject: Reply with quote

orvtech wrote:
Yes you culd but the SlugOS that the guide suggest has an outdated toolchain and an outdated kernel. so in theory you would have to take one of the other firmwares and start from there. I do have 2 NSLU2 at home just for this but havent had a chance to start working on this for the past 2 years, these next 10 days I think i have time, ill try something.


OpenWRT is not particularly better, using GCC 4.1.2, Binutils 2.17, and Linux 2.6.26.8. I believe you can get it to GCC 4.2.3 (via its build system), Binutils 2.18 (also via its build system) and kernel 2.6.28 (I have no clue about this), but I am not sure how safe this is to do with what appears to me to be a non-rolling distribution.

Anyway, I found instructions on the OpenWRT forums for how to replace its jffs file system on the device's flash memory with an ext3 file system on an external drive. It seems that the jffs filesystem is superimposed over the ROM file system to create OpenWRT's root directory. Perhaps with some hacking, it would be possible to get it to use jffs when an external drive is not plugged into it and ext3 when an external drive is plugged into it, with the external drive's userland overriding the ROM userland when the external drive is present.

I still need to find the power cable for my external hard drive enclosure. It looks like I will need to order either a new external hard drive enclosure or a power adapter compatible with a Nexstar external hard drive enclosure and will not have much time to work on this until two weeks from now, so I probably will not have any more information on this topic for a while.
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Sat Mar 20, 2010 5:47 pm    Post subject: Reply with quote

I know that I said that I would not work on this until next week because I have school work, but I decided to procrastinate a bit and do some more work on this. I found my power adapter for my external hard drive enclosure, so I was able to connect the drive to my NSLU2. I made a new partition table for it and then found out very quickly that I did not configure OpenWRT with e2fsprogs support, so I need to reflash my NSLU2.

Here is the contents of the .config file I am using:

http://paste.pocoo.org/show/191874/

I am recompiling OpenWRT now. I tried switching OpenWRT over to binutils 2.18 and GCC 4.2.4, but it would not compile, so I am sticking with binutils 2.17 and GCC 4.1.2 until I can get Gentoo's userland on the external disk. If there is anything I have in there that I should not have or should have in the configuration file to help with this, please comment on it. I think the settings should be adequate for the NSLU2, but I am not 100% certain.

I found a very informative post on the OpenWRT forums made by one of OpenWRT's cofounders, mbm, regarding how it works:

https://forum.openwrt.org/viewtopic.php?id=2649

According to that, I might need to redo this to make OpenWRT use a jffs filesystem, rather than a squashfs/jffs hybrid, although I am not certain at this point.
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Sat Mar 20, 2010 8:05 pm    Post subject: Reply with quote

Since I compiled OpenWRT myself, it was not configured in a way that allowed its mtd tool to flash the device. I found out about a tool called upslug2 that could be used to do this. It made it very easy and it would have saved me a great deal of trouble had I known about it when my NSLU2 was "bricked". A bunch of the information about it is on the following page:

http://www.nslu2-linux.org/wiki/Main/UpSlug

To get things to work, I just had to plug my NSLU2 into my laptop via an ethernet cable, bring its ethernet jack online and put an entry in the routing table so messages to 192.168.0.1 would go through the wired interface. Then I proceeded with its instructions.
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Sat Mar 20, 2010 9:33 pm    Post subject: Reply with quote

I have a small update. It looks like there is a stage3 that could work with the NSLU2; apparently, the stage3-armv5tel-20100220.tar.bz2 should work:

http://armin762.wordpress.com/2010/02/23/armv4larmv4tlarmv5telarmv6jarmv7a-gentoo-stages/

I am decompressing it on the NSLU2 now, depending on how long it takes, I might stop here and get back to this next week, because I have other things to do.

Edit: This does not appear to work. Trying to execute anything results in the same error message:

Code:
root@OpenWrt:/mnt/sda2# /mnt/sda2/usr/bin/gcc -v
/mnt/sda2/usr/bin/gcc: line 1: syntax error: word unexpected (expecting ")")


Chrooting is even more interesting:

Code:
root@OpenWrt:/mnt/sda2# chroot /mnt/sda2 /bin/bash         
chroot: cannot execute /bin/bash: Exec format error


While I do not have ldd installed in OpenWRT because I did not think I would need it, it looks like the Gentoo executables want to load glibc and since OpenWRT is using ulibc, this does not work. It seems like it will be necessary to make a new stage3 from stage1 for this. Maybe Gentoo's ARM team could assist with that.
Back to top
View user's profile Send private message
orvtech
Tux's lil' helper
Tux's lil' helper


Joined: 28 Aug 2004
Posts: 115
Location: US. Florida

PostPosted: Wed Mar 24, 2010 6:33 pm    Post subject: Reply with quote

what would be the technical part of doing a bootstrap? im sorry if the question sounds noobish but i have over 4 years that i dont do this. from what i remember it wasnt that difficult
_________________
http://orvtech.com
http://www.linuxevolution.org
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Fri Apr 02, 2010 3:17 am    Post subject: Reply with quote

orvtech wrote:
what would be the technical part of doing a bootstrap? im sorry if the question sounds noobish but i have over 4 years that i dont do this. from what i remember it wasnt that difficult


I have been too busy to work on this again until today when I spent an hour looking through some documentation. Anyway, the most difficult part of this procedure that I can imagine is figuring out how to get the bootloader to instruct OpenWRT's kernel to mount an external disk as root.

OpenWRT looks like a blackbox to me, so I am having trouble discerning exactly what would need to be modified to get that effect.
Back to top
View user's profile Send private message
armin76
Retired Dev
Retired Dev


Joined: 24 Apr 2006
Posts: 174

PostPosted: Mon Apr 05, 2010 7:07 pm    Post subject: Reply with quote

Have you tried installing Debian?

The problem in using my stages is that they are built for little endian, as such you need a little endian kernel.

May want to have a look here: http://www.cyrius.com/debian/nslu2/unpack.html
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Mon Apr 05, 2010 11:37 pm    Post subject: Reply with quote

I had no idea that ARM was a bi-endian architecture. I will give the Debian tarball a try when I get a chance and report back whether or not it works.
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Mon May 31, 2010 11:43 pm    Post subject: Reply with quote

I put this down about two months ago and I have not had time to try it again until today. I actually came across some relatively useful information that should let me make this work:

http://www.gentoo.org/proj/en/base/embedded/cross-development.xml
http://www.gentoo.org/proj/en/base/embedded/handbook/index.xml?full=1
http://www.gentoo-wiki.info/Gentoo_on_NSLU2

Right now the NSLU2 is identifying itself as having a armv5teb ISA:

Code:
root@OpenWrt:~# uname -m
armv5teb


Because of that, I would expect to make my CHOST "armv5teb-softfloat-linux-uclibc", but at the same time, that unofficial wiki suggests making the CHOST "armeb-softfloat-linux-uclibc". I realize that the unofficial wiki's information is dated, so I went to the GCC manual, which does not list armv5teb as an option:

http://gcc.gnu.org/onlinedocs/gcc-4.4.3/gcc/ARM-Options.html#ARM-Options

The closest to it that it lists is armv5te and I cannot find any information online about the differences between armv5te and armv5teb. Does anyone have any idea which of the following it should be?

  • armv5teb-softfloat-linux-uclibc
  • armv5te-softfloat-linux-uclibc
  • armeb-softfloat-linux-uclibc


Edit: I have answered my own question. The following site explains the difference between armv5te and armv5teb and says to use armv5teb:

http://www.bedug.com/?q=node/6

The difference is that the trailing 'b' signifies big endian support. I wish that GCC's documentation had mentioned this.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum