Newbie questions about using 256mb flash with unslung 6.8 beta
- So I just bought an NSLU2 today along with an Aptiva 256MB flash
card (USB 2.0).
After installing Unslung 6.8 beta firmware, I tried to format my flash
card but it kept saying "Not Formatted" (even after it said Formating...)
After doing some searching I came across an article on the nslu2-linux
website that said I probably needed to manually format the flash
cartridge. I did this (using Knoppix linux) and everything seems to
be working except I am a bit confused...
When I was manually partitioning (eg. formatting) my flash cartridge
it said I needed three partitions:
1) Data partition
2) Conf partition
3) Swap partition
I'm a bit confused on the difference between the data and conf
partitions. It appears as though the data partition (/dev/sda1) is
mounted as root (/). It also appears as though my conf partition
isn't being used at all (it's mounted /share/flash/conf).
So what is the purpose of the conf partition? If all of my programs
are stored on /dev/sda1 then I'm thinking I should just have a 1 MB
Also, what is typical memory usage for th NSLU2 running Unslung 6.8
beta? It looks like I'm idling at 500 KB free memory (plus 50 MB of
swap free). Is that normal?
Thanks for your help!
- A 256MB flash card is too small to be formatted by the Linksys formatting
utilities. You will indeed need to manually format same. I don't know what
wiki article you are looking at, so I cannot comment on the rest of your
email. There are very specific rules for what it takes to format a disk to
make it appear to the Linksys firmware as if it was formatted natively. The
three required partitions are only a part of the "magic".
In terms of space, the "conf" partition is used by Linksys to store
configuration information. You might be able to get away with 1MB, but I
doubt it. Nobody has ever thoroughly reverse-engineered the disk
usage/formatting Linksys code in order to come up with better figures -- I'm
pretty sure that you can run will far less than the 128MB normally reserved
by Linksys! I've run with as little as 16MB for the conf partition for
quite some time with no problems, for what it's worth. Again, 1MB is almost
certainly going to fail though.
You can also trim down the swap space, perhaps. If you searched the wiki
you probably found the "ext3flash" page -- that will prolong the life of the
flash device greatly, but at the cost of no swap. If you do that, there's
no point in reserving the standard Linksys 128MB of space for swap either.
(At this point the reason the 256MB devices fail with the Linksys code is
obvious -- by the time they allocate 128MB for each of the swap and "conf"
partitions, there's nothing left for the data.). How small can you make it?
Dunno - I always leave at least 32MB, though. My rationale is that if I
ever run into some problem where I suspect a memory shortfall, it would be
nice to be able to temporarily re-enable the swapping on the flash, if only
to test the theory. You'll have to decide what you think best in order to
make it all fit on such a small flash device.
The key item, though, is that once partitioned, you need to find a way to
get the required content onto the device -- if you can post the page on the
wiki, I'm curious to see what technique it suggests one use to do that.
Oh - regarding memory usage - yes, any well-behaved operating system will
use all available memory, even if only for I/O buffers. The concern is if
you need to use swap, that's a bad thing. Especially if you've disabled
swapping onto the flash device; then it becomes a Very Bad Thing Indeed
should the system need to start swapping ;-)
----- Original Message -----
From: "sofakng" <jklimek@...>
Sent: Sunday, December 03, 2006 11:13 AM
Subject: [nslu2-linux] Newbie questions about using 256mb flash with unslung
> So I just bought an NSLU2 today along with an Aptiva 256MB flash
> card (USB 2.0).
> After installing Unslung 6.8 beta firmware, I tried to format my flash
> card but it kept saying "Not Formatted" (even after it said Formating...)
> After doing some searching I came across an article on the nslu2-linux
> website that said I probably needed to manually format the flash
> cartridge. I did this (using Knoppix linux) and everything seems to
> be working except I am a bit confused...
> When I was manually partitioning (eg. formatting) my flash cartridge
> it said I needed three partitions:
> 1) Data partition
> 2) Conf partition
> 3) Swap partition
> I'm a bit confused on the difference between the data and conf
> partitions. It appears as though the data partition (/dev/sda1) is
> mounted as root (/). It also appears as though my conf partition
> isn't being used at all (it's mounted /share/flash/conf).
> So what is the purpose of the conf partition? If all of my programs
> are stored on /dev/sda1 then I'm thinking I should just have a 1 MB
> conf partition...
> Also, what is typical memory usage for th NSLU2 running Unslung 6.8
> beta? It looks like I'm idling at 500 KB free memory (plus 50 MB of
> swap free). Is that normal?
> Thanks for your help!
> Yahoo! Groups Links
- Thanks for the reply.
Here's the Wiki artciel I was referring to:
I'm still confused on the memory usage though. If I don't have a swap
file (eg. I'm using the .ext3flash file), how can I tell if an
application is failing because it's out of memory?
For example, I want to run Asterisk on my NSLU2 but I'm unsure how
much memory it requires. It seems like I have (for example) 2700 KB
before running the Asterisk server daemon but 2300 KB afterwards.
That means the application is using 500 KB of memory, right? However
during use (eg. during a phone call) the application could request
much more memory and then run out. How can I detect this happening so
I know that I need a swap file?
Also, on an unrelated topic, does the Dropbear SSHD not get activated
until you click the "Manage Telnet" link on the Linksys web GUI? I
don't need to enable telnet, but I need to visit the manage telnet
page for me to be able to access SSH on the NSLU2. (eg. it says
network failure when I try to connect).
I'm using dropbear (eg. ipkg install dropbear) so I'm not sure if I
have something incorrectly configured.
Thanks for your help!