Where is the NAND and what's with /mnt?


JePP

Member
Joined
Aug 29, 2005
Messages
366
Location
Germany
Some general questions:

1) How much space is free in the NAND with a clean install (Angstrom OS + Minimenu)?

2) If I want to store data ON my pandora, i.e. in the NAND and not the SD cards, which folder do I use? Is it a lot faster than SD cards? Would installing a browser like Arora here give it a boost?

3) What is /mnt/utmp for? Why do some apps store data in here? Is it on the NAND or on my SD cards?

Thanks!
 
1- df -h

2- a) in /home/your folder when booting from the NAND b-) not really c) not at all

3- a) used by the .pnd for them to mount b-) not in a persistent manner c) NAND i think
 
Last edited by a moderator:
Just to add something to the third question, there:

A .pnd is its own filesystem. Ponder what happens when you put a CD in your normal computer: The disk is read, and the contents appear as a disk on its own (if you have a windows machine) or appear as its own filesystem, mounted somewhere convenient (on a Linux box). Every single pnd is like a CD on its own, so when you insert an SD card with 10 pnds on, it is as if you had added 10 CDs to the pandora. Small CDs, but still. And the contents of these CDs appear in /mnt/utmp/ as directories (just as a CD would appear under /mnt/cdrom/ or something like that, or under E:, F:, G:, ... on a windows box).

Due to some pnd magic, the content isn't actually appearing until you really try to run an application from within the pnd (you can't insert a SD card and immediately see the contents of all 10 pnds), but the principle is the same. And, just like CDs, you can't write stuff back to these locations (well...Almost). But! The contents of /mnt/utmp/mypnd/ is not on the NAND - In reality, it is inside a file (the pnd) on the SD card.

What do I mean "Almost"? Well, since an application in a pnd might want to store some data persistently, it is given a data directory. When you have a pnd on an SD-card, and the pnd contains an application called, say, "foo", then the first time you start foo, the directory "pandora/appdata/foo/" is created on your SD-card. The application will be able to write data to this directory and read it back later in a way that, to the application, seems as if it was written persistently to the pnd. So: You cannot store stuff inside the pnd, but you can store it in the appdata/foo directory in a way that seems like it is in the pnd.

Disclaimer: I might be confused, lost, and senile. If I am, by all means correct me. However, this is my understanding of how things work.
 
Last edited by a moderator:
Thanks for the replies, especially the input on the third question!

On the "df -h" input:

I got ubi0:rootfs (455.5M) - is that the NAND? What's with the other listed filesystems (or whatever) like devtmpfs, and four times tmpfs (each 244.3 Megabytes)?

As you can see, I have no clue about how Linux works... ;)
 
Just to add something to the third question, there:

A .pnd is its own filesystem. Ponder what happens when you put a CD in your normal computer: The disk is read, and the contents appear as a disk on its own (if you have a windows machine) or appear as its own filesystem, mounted somewhere convenient (on a Linux box). Every single pnd is like a CD on its own, so when you insert an SD card with 10 pnds on, it is as if you had added 10 CDs to the pandora. Small CDs, but still. And the contents of these CDs appear in /mnt/utmp/ as directories (just as a CD would appear under /mnt/cdrom/ or something like that, or under E:, F:, G:, ... on a windows box).

Due to some pnd magic, the content isn't actually appearing until you really try to run an application from within the pnd (you can't insert a SD card and immediately see the contents of all 10 pnds), but the principle is the same. And, just like CDs, you can't write stuff back to these locations (well...Almost). But! The contents of /mnt/utmp/mypnd/ is not on the NAND - In reality, it is inside a file (the pnd) on the SD card.

What do I mean "Almost"? Well, since an application in a pnd might want to store some data persistently, it is given a data directory. When you have a pnd on an SD-card, and the pnd contains an application called, say, "foo", then the first time you start foo, the directory "pandora/appdata/foo/" is created on your SD-card. The application will be able to write data to this directory and read it back later in a way that, to the application, seems as if it was written persistently to the pnd. So: You cannot store stuff inside the pnd, but you can store it in the appdata/foo directory in a way that seems like it is in the pnd.

Disclaimer: I might be confused, lost, and senile. If I am, by all means correct me. However, this is my understanding of how things work.
Very informative, thanks Moxie!
 
Thanks for the replies, especially the input on the third question!

On the "df -h" input:

I got ubi0:rootfs (455.5M) - is that the NAND? What's with the other listed filesystems (or whatever) like devtmpfs, and four times tmpfs (each 244.3 Megabytes)?

As you can see, I have no clue about how Linux works... ;)

That is indeed the NAND.     As for the tmpfs stuff,   that's the method the pandora uses to write it's temporary files to memory instead of to NAND.   A lot of things the Pandora's OS does behind the scenes involve writing temporary files to disk.  To avoid having to write these to the NAND,  these tmpfs entries allow the pandora to store these files in memory instead. They will always show the same amount of available space, because it's just several different entry points into the same memory space.

Every time you run a PND,  a log is also stored in this area in the form of a file called   /tmp/pndrun_PND-ID.out  If you have any problems and ask for help with a PND that isn't working right, you may well  be asked for the contents of the relevant .out file. Because they are in /tmp/  they are actually stored in memory rather than NAND, so are gone after the next reboot.

- Neelix
 
Just to add something to the third question, there:

A .pnd is its own filesystem. Ponder what happens when you put a CD in your normal computer: The disk is read, and the contents appear as a disk on its own (if you have a windows machine) or appear as its own filesystem, mounted somewhere convenient (on a Linux box). Every single pnd is like a CD on its own, so when you insert an SD card with 10 pnds on, it is as if you had added 10 CDs to the pandora. Small CDs, but still. And the contents of these CDs appear in /mnt/utmp/ as directories (just as a CD would appear under /mnt/cdrom/ or something like that, or under E:, F:, G:, ... on a windows box).

Due to some pnd magic, the content isn't actually appearing until you really try to run an application from within the pnd (you can't insert a SD card and immediately see the contents of all 10 pnds), but the principle is the same. And, just like CDs, you can't write stuff back to these locations (well...Almost). But! The contents of /mnt/utmp/mypnd/ is not on the NAND - In reality, it is inside a file (the pnd) on the SD card.

What do I mean "Almost"? Well, since an application in a pnd might want to store some data persistently, it is given a data directory. When you have a pnd on an SD-card, and the pnd contains an application called, say, "foo", then the first time you start foo, the directory "pandora/appdata/foo/" is created on your SD-card. The application will be able to write data to this directory and read it back later in a way that, to the application, seems as if it was written persistently to the pnd. So: You cannot store stuff inside the pnd, but you can store it in the appdata/foo directory in a way that seems like it is in the pnd.

Disclaimer: I might be confused, lost, and senile. If I am, by all means correct me. However, this is my understanding of how things work.


This is one of the best description of it all I've seen :) Well done .. the CD metaphor is pretty apt.

jeff
 
ubi is a filesystem that lives on top of NAND; nand is just raw memory, so you need to layer something on top of this so the system can deal with it.

All fo this complexity is because we wanted pnd files to be magic.. no instyall or uninstall, just drop them in like cartridges of old. But since theyr'e removable (on SD cards), it makes things interesting to say the least.. apps can come and go just like that! (Trying pulling a cart out of a SNES and see what happens.) And since you can pull an SD out of the left slot, and jack it into the right slot.. it meant we had to think a little bit.

We hide most of that complexity from everyone, but as you can see.. if you go poking, you'll run into some of it. You peak behind the covers, you find the gears, right? :)

jeff
 
...and one of the things I love about the Pandora is that we are actually able to do that: Peek behind the covers to look at the gears :D
 
Also note that ubifs does transparent compression, so both used and free space on ubi0:rootfs need to be taken with a grain of salt - although I think free space assumes no compression. But just try copying your system to an sdcard to see how much is actually stored on there...
 
Back
Top