[maemo-users] Freeing up N800 memory

From: Gary D Walborn gwalborn at gmail.com
Date: Thu Jan 24 17:20:56 EET 2008
>> Is it possible to have applications install on the SD cards instead
>> of the built in memory?


	I am a new N800 user and I have been experimenting a bit with the
memory cards.   I think the terminology is a little muddied when talking
about "internal" memory.  I'm not sure if your talking about
the 256 MB flash ram or the "internal" CARD.  In any case, here's what I
did to free up flash.

	1) Start with an SD card that you would like to dedicate to N800
	   memory.  I used a 4GB SD, but you could use any size.  It is
	   possible to move to a bigger card later if you want.

	2) Insert the SD card into a PC (a Linux machine would be easiest)

	3) Format the card as type "ext2" (using, for example, mkfs.ext2)

	4) Insert the SD card into the internal slot of the N800

The N800 sees ext2 filesystems just fine, so it will recognize and mount the
internal SD as /media/mmc2 (in my case).  Now comes the tricky part... :-)
While it is not easy to make the installer INSTALL to the SD card, it is
fairly simple to MOVE things to the SD card, freeing up flash.  CAUTION - 
not everything can be moved!  Fortunately, many (perhaps most) can.  I
found (through trial and error) that your home directory CANNOT (well, 
without consequences, anyway).  Perhaps the card is not mounted soon
enough, but when I moved my entire home directory, the machine was
usable, but the initial desktop was all messed up.  HOWEVER, many of 
the larger items in the home directory (/home/user) CAN be moved. For
example, all of you media is stored in /home/user/MyDocs.  To move
my media to the card, it did:

	1) mkdir /media/mmc2/home/user

	2) cp -a /home/user/MyDocs /media/mmc2/home/user

	3) Make sure everything from MyDocs is stored on the card

	4) rm -rf /home/user/MyDocs

	5) ln -s /media/mmc2/home/user/MyDocs /home/user/MyDocs

Now, your media files are stored on the card and NEW media that is
automatically placed in MyDocs will automatically go to the internal
SD card.

	Another place you can save a lot of storage is the /usr/lib
directory.  The N800 uses Python for many of the programs that it runs.
I have successfully moved the python library to the card with no ill

	1) mkdir /media/mmc2/usr/lib

	2) cp -a /usr/lib/python2.5 /media/mmc2/usr/lib

	3) Verify that python library copied correctly

	4) rm -rf /usr/lib/python2.5

	5) ln -s /media/mmc2/usr/lib/python2.5 /usr/lib/python2.5

	You should be getting the "drift" of this by now.  MANY things
can be easily and safely moved to the memory card and linked in.  I have
linked many of the binaries in /usr/bin to the memory card.  For example,
I made a /media/mmc2/usr/bin directory, moved FBReader to it and linked
to the binary from /usr/bin with no problem.  The app still loads from the
menu and launches just fine.

	To sum up (sorry for the long post), I have reduced the usage on
my flash to 61% (down from 90+%) and still have over 3GB available on my
4GB card!  Just be careful to test everything when you move it.  Generally
if it causes any problems, it it not TOO difficult to move it back.  Be
careful about moving anything that MIGHT be used during the boot process as
you could leave the N800 unable to boot.

Gary Walborn
gwalborn at gmail.com

More information about the maemo-users mailing list