View Single Post
Posts: 233 | Thanked: 170 times | Joined on Nov 2009 @ Finland
#7
Originally Posted by RevdKathy View Post
So which figure should I be looking at? The line marked rootfs says it has a total of 227.6M. The line with a total of 256M is tmpfs.
Which one should I be worried about?
Here's my df (diskfree) output. The parameter -h just means "human readable", which is Linux for "change bytes to megabytes and kilobytes and whatnot".

Code:
Filesystem                Size      Used Available Use% Mounted on
rootfs                  227.9M    189.1M     34.6M  85% /
ubi0:rootfs             227.9M    189.1M     34.6M  85% /
tmpfs                     1.0M     68.0k    956.0k   7% /tmp
tmpfs                   256.0k     80.0k    176.0k  31% /var/run
none                     10.0M     72.0k      9.9M   1% /dev
tmpfs                    64.0M      4.0k     64.0M   0% /dev/shm
/dev/mmcblk0p2            2.0G    188.2M      1.7G  10% /home
/dev/mmcblk0p1           27.0G      9.7G     17.3G  36% /home/user/MyDocs
Our things of "interest" in this output are the first, next to last and last line.

We all have 227.9 megabytes of root file system available, but what's interesting is the "available" -column that says I have 34.6 megabytes or 85% in use.

The last two lines indicate that /home/user/MyDocs has a total of 27 gigabytes (with 17.3 gigs free) and /home (our home directory) has a total of 2 gigabytes (of which 1.7 gigs are still free).

This is called partitioning: The internal memory/drive has been divided into several parts, the most interesting of which are 227.9 megabytes, 27 gigabytes and 2 gigabytes in size.

These partitions can then be "mapped" (or mounted) to certain directories. That is why Linux lacks drives like windows (ie. C: and D. Instead, the physical disk or partition is mapped (connected, mounted) to a directory. So when Linux-guys insert a dvd, it doesn't become D: like on Windows. Instead it has to be manually or automatically mounted to a directory. That could be any directory, but usually ends up being something sensible like /mnt/dvd.

This is done to protect the system: We can fill up one partition and leave the other ones with plenty of space to function well. In the Maemo-case, the root mount is very small in size (228 megabytes) and should be left alone as much as possible. Instead, programs should be installed to the /opt -directory.

Interestingly, opt is part of the root filesystem! But if we look at /opt with ls, it says:

Code:
Nokia-N900-42-11:~# ls -la /opt
lrwxrwxrwx    1 root     root            9 Oct 30 13:36 /opt -> /home/opt
... which means /opt is actually a symbolic link to /home/opt. So /opt actually points to /home/opt, which has 1.7 gigs free, making it a good place to install apps.

Presumably the 18 megabyte download of today's new firmware release was significantly more when extracted. Upgrading stuff on Linux is often comparable to unzipping (extracting) packages on top of old versions (and maybe cleaning up the old versions before that). So the installer for today's firmware might have checked that it could fit completely on the rootfs. Let's say the unextracted firmware was 30 megabytes. The installer would then probably halt installation if less than 30 megabytes are available on the rootfs.

The installer is also probably not able to account for files that will be replaced (if we install a file that is 2 megabytes in size, we need zero megabytes of free space if this file replaces an older version that is also 2 megabytes. In fact, by installing the new 2 megabyte version of a file, we can INCREASE free space if we replace a more inefficiently compressed file that used to be 3 megabytes).

Sorry for writing so much, but you asked
__________________
Read about my N900 experiences from my blog.

Last edited by jaysire; 2010-01-12 at 20:55. Reason: Fixed an error and formatting
 

The Following 17 Users Say Thank You to jaysire For This Useful Post: