PDA

View Full Version : How to upgrade the internal memory by extending the root filesystem to a memory card


Wolfram Ravenwolf
01-23-2006, 05:31 PM
I found out how you can upgrade the Nokia 770 Internet Tablet's internal memory by extending the root filesystem to a memory card. My step-by-step guide with detailed instructions has been posted on the Maemo Wiki. Following the steps, one can expand the unit's memory, make it persist even through flashing, and protect the internal flash memory's durability all at the same time. All power users are welcome to check it out and see if it helps them to get even more out of our favorite Linux device. Here's the link: http://maemo.org/maemowiki/ExtendedRootFilesystem

Simon
01-23-2006, 06:18 PM
Wow! Nice Wiki page :)

Just a couple of (probably stupid) questions. What happens when you plug the USB cable into the 770 after you've done this hack? Does it affect how the device appears to the host PC? And I assume just like when running swap on a MMC plugging and unplugging the MMC while the device is on would be bad? That might be worth mentioning in the Wiki if so. Can you combine this with the swap space on MMC hack also?

Jus
01-23-2006, 06:41 PM
Great guide, now i'll just have to get myself a 1gb card and give it a try. :)

Simon, I think the first paragraph in the "First Step - Preparing the memory card:" section covers the usb connection issue. Not sure which method you used for creating the swap, but i used the one that has you create another partition and i can connect the usb without any problem. The device appears the same on my pc, just shows as being something like 48mb instead of 64.

Simon
01-23-2006, 06:57 PM
Oh yes, it does mention the first partition works the same as normal. I missed that bit sorry.

I haven't actually played with swap partitions yet. I was going to try that on the 64MB card first. I haven't had a chance to play with it on my Linux box to figure out how to partition it yet.

thoughtfix
01-23-2006, 07:34 PM
What does this do to the device's internal storage? Does it just sit unused?

Wolfram Ravenwolf
01-24-2006, 02:42 PM
Hey there - thanks for the nice comments! :)

As has been pointed out, the normal functioning of the memory card won't be affected as we're using an independent partition, so there's no problem with unmounting. It shouldn't be removed from the device, of course, unless you revert the changes first. With the script I provided, this can be done painlessly.

And yes, it can be combined with the swap. I recommend a swap file instead of a swap partion since we already created a new partition. While you could create a third one, it's probably better to simply create a swap file on the new partition, with a big memory card you'll have more than enough space. Then you can always change its size by recreating the swap file, that's easier than repartitioning and resizing a partition, so you get more flexibility. I'll add that information to the Wiki page soon...

The internal memory is still used for everything not swapped out onto the memory card. While you could move pretty much everything onto the card, I only use it for home directories and configuration files. If everything were to be put on the memory card, you'd lose the ability to instantly restore the device to your customized working state after reflashing, since then you'd have to update the files on the memory card as well. It would be fun to investigate a three-partition-setup: The first partition as the normal memory card, the second partition for home directories and configuration files, and a third one for all of the remaining stuff. So you see, there's still a lot of room for further improvement!

cantona
01-25-2006, 01:26 AM
I feel foolish asking this question but i'd love to get a step by step guide to this - lol yes even more detailed than wolfram - i get confused at the first step.

Wolfram Ravenwolf
01-25-2006, 12:02 PM
Well, actually the first step is the most difficult one, steps two and three are handled by the script. But that's what the forums are there for, to ask for help and discuss solutions. If you can describe your situation in more detail, I or someone else can try to help you better.

Wolfram Ravenwolf
01-25-2006, 04:16 PM
I just updated the Extended Root Filesystem (http://maemo.org/maemowiki/ExtendedRootFilesystem) HOWTO with information on how to create and use a swap file together with an Extended Root Filesystem.

Since it's a file on the new partition, it won't be unmounted when the device is connected to a computer by USB. And as a regular file, it can be resized easily. It's a compromise between creating a swapfile and using a new partition for swap - which combines the advantages of both (and much more).

What's best about my way of (de)activating swap is that this works independently of the actual swap file or partition. The startup, reboot and shutdown scripts will work the same no matter if there's swap available or not. To add or remove a swap file or partition, simply modify /etc/fstab (after manually deactivating swap with swapoff -a), without having to touch the scripts again. Even if you decide against swap, it's enough to delete or comment out the line(s) in /etc/fstab, the scripts will keep working. I'd actually like Nokia to include something like that in their own system scripts with a future version of the 770's OS.

I hope you find it useful and welcome further discussion here.

RogerS
01-29-2006, 01:38 AM
OK -- I bought a 1 GB mmc card. I have root access. I'm about to boot up from a LiveCD and repartition and reformat the brandnew card.

What size should I make the second partition?

I will be putting a swap file on there. I'd like to be able to put a lot of unnecessary applications on my 770 :D -- well, you know what I mean: lots of applications that I want to check out but won't use regularly, and apps I want as insurance (so that I can work on some file if I ever have to, for my job and such -- something like the gnumeric spreadsheet app). What size do you think should be big enough, without being too big and squandering space?

Your guidance here would be most appreciated.

Thanks,

Roger

dr_kludge
01-29-2006, 04:13 AM
What size should I make the second partition?

I will be putting a swap file on there. I'd like to be able to put a lot of unnecessary applications on my 770 :D -- well, you know what I mean: lots of applications that I want to check out but won't use regularly, and apps I want as insurance (so that I can work on some file if I ever have to, for my job and such -- something like the gnumeric spreadsheet app). What size do you think should be big enough, without being too big and squandering space?

There are only quesses that can be offerred. First you make a guess based on certain "known truths" and then you tune. I've often heard Oracle say that swap space should be two times the amount of physical memory. Your swap space is known as virtual memory. Physical memory--RAM in this case--is what your programs load into and run on any computer. Swap is what is used when you "over commit the use of your physical memory". When you load in more programs than the physical RAM memory on the computer, then the operating system puts programs that are idle in the swap area on disk. For regular hard drives the mechanical portions of the drive are much slower than the swap that you will be creating i.e. you will be using solidstate memory for you swap! :D

Ok so this site says that the 770 has 64MB of RAM inuxdevices.com/articles/AT5858395674.html . Based on the Oracle guess then you'd want 128MB swap space. That would still leave you with 64mg of flash ram and 812MB on your MMC card. Now when you say you are going to install lot's of applications that is not the same as using memory or swap. The installation is what you'd put in your 812MB of space. To give you a perspective the largest app that I have installed so far is 2,408,576 while rsync is the smallest at 241,548. If you run xterm, then it will consume 2.4MB of memory. I think you'd have more than enough for both areas, if you use the 128/812 configuration. But remember Oracle's recommendation is for heavy hitting databases. 128 feels to big here.

You are really on a single user system and not on a multi-user system. I've noticed that I cannot seem to run two copies of the same application. If I run marbles, then hit the launcher for the second copy, the 770 switches me back to the first running copy in memory. If I go to the xterm command and run free I see
Mem total 61828; Mem used 58428; Mem free 3400; and Mem shared 0. It is interesting that this version of the free command does not have the cached count. Compare these number with two other linux systems
[drkludge@bagheera ~]$ free
total used free shared buffers cached
Mem: 514744 498552 16192 0 18036 199612
-/+ buffers/cache: 280904 233840
Swap: 2064376 0 2064376
This machine has 512MB used as a workstation. It has a 2gig swap partition and note that under the used column zero is used.

[drkludge@baloonew ~]$ free
total used free shared buffers cached
Mem: 2054724 2027660 27064 0 57600 1753672
-/+ buffers/cache: 216388 1838336
Swap: 2064376 696 2063680
[drkludge@baloonew ~]$ uptime
00:58:36 up 77 days, 10:50, 1 user, load average: 0.19, 0.06, 0.01
(I hope the formatting stays alined or it will be confusing to try and read these numbers.)
Here's a file server that has been up for 77 days. It has 2gig of memory and a 2gig swap partition. Only 696MB of the swap partition is being used. That's a terrible waste of a 2300+MHZ athlon 64. A 500MHZ AMDK62 junker would serve NFS and SAMBA just as good. The only hope for this configuration is that when a request for user data is made, then it will come out of the used, shared, buffers, or cached memory pools. The buffers/cache line tells you how fast the linux kernel can rearrange memory from the buffers and cached pools. You really hope that you don't take from Swap because it is on disk in this case. Note that this machine has a swap partition the same size as the physical RAM and not much of it is used. :p

Now the small memory foot print of the 770 is where a swap partition would really shine. I have 3400 free right now. If I fire up vim or gaim, then the O/S will really have to figure out where to put stuff. I think I saw where thoughtfix had success with just 16MB for a swap partition. An interesting project would be to try various sizes and record the results: 16MB, 32MB, 64MB, 96MB, and 128MB. The down side is that you'd have to reformat and completely reinstall your apps/data. You can allocate space for 128MB of swap in a partition but build it for only 16MB to start. The rest would go to your user data. If you find at some point, say, 32MB is the magic number, then you want to reformat the MMC card for 32MB swap/the rest user data.

For some reason I was amazed to find the free command on the 770. I found it more amazing to see the top command. The top command allows you to see what is going on in your 770 almost realtime. Hit the fullscreen button on the 770 before you run top in the xterm window. The memory numbers at the very top of the screen will be cut off if you don't. It's impossible to scroll up fast enough to see 'em.
Top shows
Mem used 54860K; Mem free 6968K; Mem shared 0K; Mem buffers 160K; and Mem cached 20840K.
If I alt tab with the keyboard to see marbles, then I find that the 770 has paused the game. I can only see small changes in the top numbers when I create another xterm _tab_ with Properties button>file>newtab while in xterm full screen mode.

Finally, just as I have noticed that GUI apps are inactive when you switch to another application, I wonder what the impact to memory and swap is when the machine powers down the display?

Hmmm...16MB, 32MB, 48MB, or 64MB may be good starter numbers. With 1Gig of MMC, I'd save most of that for music, videos, pdf books to read, applications, or application data files, etc. As you can see much of this is a guess. You'd have to take time to perform long term trend analysis. :eek: So go with 64MB and don't worry about it! As with all caching or swaping schemes you need memory to burn and you have it. :D The moment you shutdown the device, the caching and swaping have to build up again on the next boot.

I hope this helps. Perhaps I need to clean this up and put it on the wiki too as "page two" of the swap file article--bad pun intended. :p

Greg

msaunby
01-29-2006, 05:34 AM
I'm still unsure as to whether it's really necessary to partition the card at all. Mount an ext2 partition using "mount -o loop" - requires the scratchbox mount command rather than the built in one. Use mkfs on a linux box to create the partition files (dd if=/dev/zero ... to make the empty files) then gzip and copy to mmc, unzip and mount.

It may be slightly less efficient, but makes changing the size of the (pseudo) partition much easier, or just add extra partition files as needed.

Wolfram Ravenwolf
01-29-2006, 06:34 AM
RogerS: I'm using a 1 GB MMC memory card, too. I repartitioned it so there's a 64 MB VFAT partition (exactly the same size as the original MMC that ships with the Nokia 770) and allocated the rest of the card to an EXT3 partition (which also holds the swap file). With such a Linux partition, you'd hardly need the FAT partition, I only use it to hold the files needed to restore the Extended Root Filesystem after a reflash (xterm, my Root.sh script, etc.).

dr_kludge: An interesting project would be to try various sizes and record the results: 16MB, 32MB, 64MB, 96MB, and 128MB. The down side is that you'd have to reformat and completely reinstall your apps/data.
If you use a swap file instead of a swap partition, trying different sizes is easy, you can simply recreate the swap file. Keep in mind, though, that there have been reports of sizes > 24 or 32 MB to crash the device. (Haven't tested that myself yet.)

msaunby: That's an interesting idea worth a try. It's like using a swap file instead of a swap partion, you're using an ext3 loopback mount instead of a partition. The scratchbox mount command could be stored on the MMC, too, so it's always available after a reflash.

RogerS
01-29-2006, 09:00 AM
Now when you say you are going to install lot's of applications that is not the same as using memory or swap. The installation is what you'd put in your 812MB of space. To give you a perspective the largest app that I have installed so far is 2,408,576 while rsync is the smallest at 241,548. If you run xterm, then it will consume 2.4MB of memory. I think you'd have more than enough for both areas, if you use the 128/812 configuration. Well, I was thinking that the use of the Extended Root Filesystem that Wolfram (aka Daniel) described actually put new installed apps on the second partition of the mmc:
I recommend you move the root and user home directories onto the memory card (/root and /home/user) as well as user data like bookmarks (/usr/share/osso-bookmarks), settings (/etc/bluetooth/name, /var/lib/gconf, and /etc/osso-af-init/locale), even installed programs (/var/lib/install).Please advise if I've misunderstood this.

Since I've seen it repeated so much, I guess I will start with a 24MB swap file until larger sizes are definitively shown to be more effective.

I guess the only problem I can see with all but 64 mb of the mmc card as the second partition -- as Wolf does -- is that it won't make moving a large movie from my PC to the 770 easy -- from earlier reports it seems a full-length movie can be larger than 700 mb. I won't be able to use USB transfer to the second partition.

Dr K, Wolf -- what would be the best/easiest way to transfer huge files to the 770 then?

Instead of 64/960 (W) or 960/64 (K), would this make something like 824/200 more optimal? Or 700/324 for more app room? Or 900/124 for longer movies?

I guess I don't want to be squeezed in the space I'm allocating for apps, nor do I want to waste any space. Not that I'm the only one who wants easy optimization.:)

dr_kludge
01-29-2006, 01:29 PM
Dr K, Wolf -- what would be the best/easiest way to transfer huge files to the 770 then?

RogerS find one of those multi-memory format USB read/writers. Turn off the power on the 770 and remove the MMC card. Attach the multi-memory format read/writer and insert the MMC card into the device on a PC with the video or other multi-media support. Rip the move or other media directly onto the MMC card. If you are going to process the video/wav file first then rip it to a hard drive. Once done move the processed file to the MMC card. Eject the MMC from the read/writer. Place it in the 770 and boot the device. I would think this would be the fastest method available as far as data transfer goes and complexity.

Other options:
1.) If you have a wireless lan then use a PC or other device that can serve files via a web site. This method may be slower than using the read/writer. Plus additional complexity is required to set up a web server. I am presuming that you can use right click on the filename on the server and save it. I haven't played with the browser on the 770 yet.

2.) With a USB hub and other junk attached to the 770, then you could take a 1 GIG USB thumb drive and mount it on the 770 with your video. That will take some work to setup. I do have one mounted right now. I'll document it at some point.

3.) Set up ethernet networking on the 770. There again the complexity goes way up. First you'd have to download ssh/scp to your 770. Then you'd have to setup another PC with ssh or sshd. Finally, you'd have to configure the 770 to use ethernet networking.

4.) I am sure there's even more ways that will become available. For example, if someone ports an NFS or Samba client to the 770, then you would be able to mount these shares to the 770 and copy your desired files to the MMC on the device. At some point an ftp client could be created to access an ftp server with the files. Since python is now available on the 770, a bittorent client could bring files to the 700. All of these would require ethernet networking or a wireless LAN to be available to you.

5.) Unless someone beats me and compiles vblade for the 770, this is a very cool idea. Someone has already done this on the nslu2 device http://www.nslu2-linux.org/ .
http://www.linuxjournal.com/article/8149
http://www.coraid.com/support/linux/
http://en.wikipedia.org/wiki/ATA_over_Ethernet
http://sourceforge.net/projects/aoetools/

Greg

Wolfram Ravenwolf
01-29-2006, 01:53 PM
Yes, I've put everything that's modifyable by the user onto the Extended Root Filesystem (i. e. memory card's newly created and sym-linked EXT3 partition). Movies and such I'd also store in the home directory which is on that partition. For file transfer, I installed SSH on the Nokia 770, so I can upload/download files with scp/sftp (Secure FTP - should work with Windows FTP clients, too).

KDE users should give the "fish" protocol a try - then you can browse the Nokia 770's filesystem just like your local harddisks.

If you don't want to be restricted to fixed partition sizes, the method of creating files which are mounted as loopback would be a useful alternative, then you could recreate a bigger one more easily - but of course, with only a single partition, it would get unmounted when the USB connection is established. Every method has its advantages and disadvantages...

RogerS
01-29-2006, 03:58 PM
Movies and such I'd also store in the home directory which is on that partition. For file transfer, I installed SSH on the Nokia 770, so I can upload/download files with scp/sftp (Secure FTP - should work with Windows FTP clients, too).Well, I got the 1 GB card for three reasons:


to be able to install apps without worrying about whether I needed to uninstall others I had looked at but wasn't actively using
to carry around some songs to listen to when WiFi is inaccessible -- the few I was putting on filled up the 64mb card before I knew it
to watch a movie when traveling -- maybe me, maybe to occupy my kids
The movie use is farthest from happening. So I guess I'll worry about getting such big files onto the mmc card when I need it, and if I have to figure out SSH and scp/sftp then, well, maybe I'll understand enough by then that it won't be an obstacle.

I do have a Compact Flash card reader and have used the approach Dr. K mentions with photos in my camera -- but it doesn't read mmc :( Maybe I'll be getting a new reader . . . My only question about that is, Will the PC see both partitions?

Thanks, both, for your help.

BTW, I'm posting this from Firefox running on the Mepis LiveCD. Just about to tackle the repartitioning and reformatting of the new 1GB mmc card. And, yes, I do always get into the water one toe at a time. How did you know?

dr_kludge
01-29-2006, 08:19 PM
So I guess I'll worry about getting such big files onto the mmc card when I need it, and if I have to figure out SSH and scp/sftp then, well, maybe I'll understand enough by then that it won't be an obstacle.

I do have a Compact Flash card reader and have used the approach Dr. K mentions with photos in my camera -- but it doesn't read mmc :( Maybe I'll be getting a new reader . . . My only question about that is, Will the PC see both partitions?

Please note that I forgot the simplest way: hook up the 770 to your computer via USB. However, the reason that I didn't think of this earlier is that when you put your device in USB-host mode for the power injector devices, you cannot access the memory card at all. You'd have to use the flasher to disable this mode on the 770 to plug in the 770 directly again. LOL I thought I fried my device late Friday night until I fooled around with it enough.

Yep. A new reader may be in order. I have a 9 IN 1 job. It looks like it will take the RS-MMC but did not work. There are some RS-MMC dongles that adapt the memory to the USB bus. There again I found out I have an older model that did not work.

If you don't want to fool with ssh/scp just yet, then the reader will be the easiest method.

Most modern linux distros will see the FAT partition automatically via dbus. But you may have to manually mount the ext3 partition!?

I also played with a bluetooth dongle but did not have enough time to make PLAN work--it may not work.

As I have more time I'll be writing up how-tos based on my initial experience. I just received my device last week. Played with the flasher; Mounted stuff; Have usb hub and four things hooked to it. I found one device crashed the 770 when I hook it to the hub. Still wondering about that one.

Greg

RogerS
01-30-2006, 02:07 AM
After following the instructions for extending the root filesystem, I started to enter the commands for creating a swap file.

When I entered the first command, dd .... 24576
the message I got was
dd: /Root/swapfile: No such file or directory

I had downloaded the Root.sh file to my PC and then copied it to the 64mb mmc partition and ran it, as you described.

The only odd thing, of course, is that I must have done Step 2 twice -- once entering the commands manually and once in the Root.sh file.

Any idea what's going on and how I can proceed?

Thanks,

Roger

PS: Apologies for cross-posting -- I first entered this info at your website, but also would like to share the information here at itT forums.

mk500
01-30-2006, 03:35 AM
I found out how you can upgrade the Nokia 770 Internet Tablet's internal memory by extending the root filesystem to a memory card. My step-by-step guide with detailed instructions has been posted on the Maemo Wiki. Following the steps, one can expand the unit's memory, make it persist even through flashing, and protect the internal flash memory's durability all at the same time. All power users are welcome to check it out and see if it helps them to get even more out of our favorite Linux device. Here's the link: http://maemo.org/maemowiki/ExtendedRootFilesystem

Wow, thanks so much for your instructions and script, Wolfram. My 770 is so much more useful now.

I booted my PowerBook off a PowePC Ubuntu live CD and partitioned my 1GB rsmmc card as 800MB FAT16 and 200MB linux ext3. I ran your script, and it transferred everything perfectly, giving me much more space. I then set up the swap as you recommended. This made a huge difference in multitasking!

Thanks to you, I am now chatting with a friend via gaim, have two large web pages loaded, a PDF document open, and xterm as well. AND, I can still mount my fat partition on my mac via usb to transfer some mp3s over without interrupting anything.

Thanks!

Wooky
01-30-2006, 10:32 AM
After following the instructions for extending the root filesystem, I started to enter the commands for creating a swap file.

When I entered the first command, dd .... 24576
the message I got was
dd: /Root/swapfile: No such file or directory

I had downloaded the Root.sh file to my PC and then copied it to the 64mb mmc partition and ran it, as you described.

The only odd thing, of course, is that I must have done Step 2 twice -- once entering the commands manually and once in the Root.sh file.

Any idea what's going on and how I can proceed?

Thanks,

Roger

PS: Apologies for cross-posting -- I first entered this info at your website, but also would like to share the information here at itT forums.

You could try

#touch /Root/swapfile

cantona
01-30-2006, 12:15 PM
Hi - I have a question or two about partioning (sorry Im new with this Linux stuff ;) I've burned a cd with Ubuntu live and want to partion my 1GB mmc.

1.)When I reboot into linux how can i access parted?
2.) When I execute /dev/sda does this just partion the 770 drive (i havent run parted yet so maybe this is self-explanitory - i just dont want to format my c drive ;)
3.)How do i specify the size of the partions? I'd like to have 800mb fat for movies and 200mb for linux.
4.)Does the sudo mkfs.ext3 /dev/sda2 command format just the linux partion? Is this all i need to enter?

THANKS for your help - Im just a little confused by the linux stuff.

RogerS
01-30-2006, 12:27 PM
You could try

#touch /Root/swapfile
I'm wondering why using dd works for everyone else but not me. And wondering if something went wrong when I created /Root.

---
Edited later to add:

Going through this once has reassured me that the patch to the firmware image with root access works fine.

Explaining how the mmc card is partitioned really solidified in my mind what I was doing.

Seeing that the complex steps are reduced to (A) a shell script that's easy to run and (B) a handful of commands to enter for a swapfile, I don't find this all that daunting, the way I did last week.

So, to eliminate the chance of problems from what I described here, tonight I'm going to start from scratch: reflash the 770, repartition the mmc card, run that script and make the swapfile. Having done it once, I can say with first-hand knowledge, "it's not that hard."

neiljerram
01-30-2006, 01:01 PM
I'm very grateful for Wolfram's description of how to use the MMC card effectively. I was planning to work out a similar description myself, and now I don't have to.

I don't plan to use the MMC for swap, though. As far as I can tell, flash memory is only specified to be good for up to 100,000 erase-write cycles, and it seems to me that I could run through that in no time by using flash memory for swap. Isn't anyone else worried about this?

Regards,
Neil

RogerS
01-30-2006, 01:32 PM
Cantona,

I am very much in the position you describe, except for using a different LiveCD, one with Mepis instead of Ubuntu.

In my case, I worried very closely about whether the mmc card was automatically mounted (it wasn't). But seeing how the mount/unmount worked with the hard disks looked easy enough.

Partition software
In the K menu in Mepis -- the equivalent of Windows' Start menu -- I looked for utilities and found QTparted in a folder of system utilities. I'm guessing that it is parted built with QT widgets.

Resize partition 1
QTparted is graphical, and highlighting the first item (partition) in the list in the righthand pane made a menu option available that I was able to use to specify a new size for it -- instead of 995 mb, 64mb (as Wolf suggests) or 128mb (as Dr K suggests -- or does he say 995-128?) or 800mb as you want. I think this is identified as FAT16. You're not doing anything here except specifying the size you want it, and that the rest of the mmc card is unused. Was this command called Resize partition? Something like that.

Anyway now you have a smaller-than-1GB partition and the rest of the disk is identified as free space.

Create partition 2
You select the line about the free space and choose the Create operation, where you set the size of this second partition (all available space in my case and yours) and specify ext3 as the partition type.

The graphic now shows two partitions, but you have to choose Commit for the changes to be made. This means you can go back and adjust things if you didn't get them right in the two dialogs.

Shutdown
Then after all this, the 770 has to be rebooted. As Wolfram notes in his instructions, you should use the shutdown command.

In my case, the shutdown command didn't work -- I wasn't root. In Xterm, I typed "sudo gainroot' and hit enter to gain root access, and then the shutdown command as Wolfram indicated.

Make sure you have Xterm
In order to become root, I had just reflashed my 770 with a new firmware image, the one with root enabled. So before I even started, I made sure I installed Xterm.

I don't know if parted is a command line utility, but I would bet that the Ubuntu LiveCD has this kind of software with a graphical interface, even if it's not QTparted.

Maybe some other, more experienced Linux users will correct my misstatements and identify the pertinent differences that show up in Ubuntu.

Step 2 -- stop
I then made a mistake I should warn you against. Wolfram describes the second step in great detail and lists five very long commands to enter in XTerm.

Don't enter these.

The shell script
Farther down, after talking about step three in general terms (for instance, he suggests directories to move but doesn't explain how to do that for Linux innocents like me), he provides a shell script that does step 2 and 3 for you.

In my case, I chose to follow his suggestions as to the directories to swap out, but you can edit those first before running the script.

I also had difficulty getting this shell script onto the 770 mmc card so I could run it. I couldn't get Opera on the 770 to download it,. So I downloaded it using Firefox on the LiveCD and mailed it to myself at Gmail. Then I couldn't download it as an attachment.

Ultimately I re-attached the 770 to the PC and transferred the file to the mmc card in the usual fashion, and then I was able to run it in Xterm.

Roger

PS: I found a good description of how QTparted works in PC magazine: pcmag.com/article2/0,1895,1902337,00.asp (http://www.pcmag.com/article2/0,1895,1902337,00.asp)
This was after I used it, of course.

PPS: I looked at this post before clicking submit and realized it was so long it was hard to follow. So I inserted the bold phrases just to make it easier to read. I don't really think this way: heading, text, heading, text.

cantona
01-30-2006, 02:47 PM
WOW! Thank you Roger - that is a huge help!

Wolfram Ravenwolf
01-30-2006, 05:36 PM
Hello all!

Sorry that I can't help you more right now, I'm very busy at work, so I don't have as much time to post as I'd like. But I see Roger is doing a great job, both learning and teaching, that's nice. I've updated the HOWTO a bit to include more information and a link back here so others can find and join the discussion.

I also noticed that "How to Partition" is a much bigger problem than anticipated, unfortunately it can't be automated like the others steps since it's done outside of the Nokia 770, depending on your actual computer setup which widely varies between different users. Anyway, that's why a forum is such a good place to talk about it and help each other.

Last not least I really appreciate all the comments, both about what works for you and where you see a need for improvement. I'll try to update the Wiki page as often as necessary. Of course, being a Wiki page, it can be updated with your latest discoveries as well. Let's all work together to make the Nokia 770 Internet Tablet even better and greater.

Happy hacking,

mrp
01-31-2006, 01:38 AM
I have not been able to get root extended to my 512 memory card. I thought that creating the ext3 partition would be trivial, but was a bit of a nightmare. Tried parted with fc3 (installed), Ubuntu 5.X live, QTparted in fc3. Problem with parted was, that no ext3 was supported, and I tried with an extended partition, no file system in it and formatting that to an ext3, input/output error. Finally I created a 300 MB fat16 partition, left Linux and created a 200 MB ext3 partition, using Partition magic, in windows.
Now, as I at last have an ext3 partiton, I can't get the root.sh work for me. may be the ext3/windows is not suitable or maybe the memory card is faulty. I'm going to try with the 64 MB card that came with 770.

Wishes of some of us have been answered:

http://gparted.sourceforge.net/download.php

a really easy to use GPL Live CD-partitioning software (latest release 29.1)


edited: used gparted/sourceforge yesterday, partitioning was done in a minute. Ran Root.sh, did not work, reflashed, restored my settings, installed Xterm, ran Root.sh again. Now it worked. Created a 24 MB swap, opened a digitv -> mediaconverter->280x160 007-avi.file from mounted slug hdd through wlan. Film went on smoothly as watched on TV.

Thank's a lot for the instructions and great effort Wolfram!

cantona
02-01-2006, 02:30 AM
At least thanks to all your help Im making progress - lol now have a root enabled version on my 770. Current issue is with partitioning my 1GB card - qtparted wont let me reduce the exisiting partion below 7000mb ( i think i dont have it in front of me - but in any case it is nowhere near 64 or 128) Any ideas?

mrp
02-01-2006, 06:36 AM
At least thanks to all your help Im making progress - lol now have a root enabled version on my 770. Current issue is with partitioning my 1GB card - qtparted wont let me reduce the exisiting partion below 7000mb ( i think i dont have it in front of me - but in any case it is nowhere near 64 or 128) Any ideas?

I spent a couple of hours with parted and qtparted. Just did not work for me,but with the Live-CD gparted it was really easy. Give it a try

cantona
02-01-2006, 09:28 PM
It worked! THANK YOU ALL! I could not have done it without your help!

Wolfram Ravenwolf
02-02-2006, 04:37 PM
Since partitioning the memory card is the hardest step in extending the root filesystem, I'm trying to automate this process as well. Here's my first attempt. You'll require the "sfdisk" program which is part of the "util-linux" Ubuntu package (installed by default!) but probably available for other GNU/Linux distributions as well.

Connect the Nokia 770 to your Linux computer. Make sure the memory card's partition is auto-deteced but not mounted. If it's auto-mounted, unmount it. I'll use /dev/sda to refer to the memory card, but if it's a different device on your system, substitute it accordingly.


sfdisk /dev/sda -uM << EOF
,64,6
;
EOF
mkfs.vfat /dev/sda1
mkfs.ext3 /dev/sda2


With this set of commands (run as root - I recommend copy & paste!) you repartition the memory card (/dev/sda) so there's a 64 MB VFAT partition and the rest of the card space is allocated to the Extended Root Filesystem.

Please give this a try and report back how it worked for you - then I'll add it to the HOWTO.

Xyzo
02-03-2006, 02:41 AM
Hi!
Thank you very much Wolfram for this step-by-step howto :-)
Yesterday I've received and configured my 1GB MMC-Mobile card: I think I've done it well as the system works but I'm not exactly sure whether what I've done at step 1 was right or not. See below.
I've used fdisk (on FC4) to partition the RSMMC card. Out of the box, it was shown as FAT16 by fdisk (type 6). In your tutorial, you mentioned VFAT: what does this exactly mean as I was not able to find it in supported formats by fdisk? Someone told me that formats specified by fdisk were just here for information, but the real partition type depends on what you use to format each partition: right? Well, I've removed the existing partition and created 2 brand new partitions using the original format (ie. FAT16). After this, the 1st partition (768MB, to be mounted on host when USB connecting the N770) has been formated using mkfs.vfat, and the 2nd partition (256MB, to be used for swap and extension of root filesystem) using mkfs.ext3: was all of this right? When I display the partition table using fdisk, the 2 partitions are still displayed as FAT16: should I simply ignore this?
TIA for your help!

Wolfram Ravenwolf
02-03-2006, 03:15 AM
I've used fdisk (on FC4) to partition the RSMMC card. Out of the box, it was shown as FAT16 by fdisk (type 6). In your tutorial, you mentioned VFAT: what does this exactly mean as I was not able to find it in supported formats by fdisk? Someone told me that formats specified by fdisk were just here for information, but the real partition type depends on what you use to format each partition: right?

Right! That's exactly the way it is. In the code posted above, the second line says ",64,6". "64" is the size in megabytes and "6" refers to the partition type FAT16. It becomes a VFAT filesystem once it's formatted with "mkfs.vfat".

Well, I've removed the existing partition and created 2 brand new partitions using the original format (ie. FAT16). After this, the 1st partition (768MB, to be mounted on host when USB connecting the N770) has been formated using mkfs.vfat, and the 2nd partition (256MB, to be used for swap and extension of root filesystem) using mkfs.ext3: was all of this right? When I display the partition table using fdisk, the 2 partitions are still displayed as FAT16: should I simply ignore this?

The second partition should be of type 83. You should be able to change it without destroying the partition. If you don't want to risk anything, you won't have to change it if it's working anyways, though.

Wolfram Ravenwolf
02-03-2006, 04:35 PM
To make it even easier, I've created a Maemo installer package: extrootfs_1.0_arm.deb (http://wolfram.ravenwolf.de/extrootfs_1.0_arm.deb)

It bundles the script which creates the Extended Root Filesystem (http://maemo.org/maemowiki/ExtendedRootFilesystem) with utilities for partitioning and formatting the memory card (cfdisk, mke2fs, mkfs.ext2, mkfs.ext3, sfdisk). It's never been easier to extend the Nokia 770's root filesystem onto the memory card. Now you can repartition and reformat from within the device. I've also updated the HOWTO since the old Root.sh script has been deprecated and replaced with this release. Simply install the package and you've got everything you need to set it up.

Setup has become so simple:

sudo gainroot
umount /media/mmc1
/var/lib/install/sbin/cfdisk /dev/mmcblk0
mkfs.vfat /dev/mmcblk0p1
shutdown -r now

sudo gainroot
/var/lib/install/sbin/mkfs.ext3 /dev/mmcblk0p2
/var/lib/install/sbin/extrootfs


If you've already used the Root.sh shell script to set it up, you don't really need the package, but you can install it anyway. It's fully compatible. Just use /var/lib/install/sbin/extrootfs instead of the Root.sh script from now on.

By the way, "sfdisk" is included, too - so you can try that with the info I posed above instead of using "cfdisk" for automatic partitioning.

RogerS
02-03-2006, 05:28 PM
Wow. This is really something.

Thank you, Wolfram (or should we say, Thank you, Stefan Daniel?)

bahtaraigi
02-03-2006, 05:48 PM
Hi,

I get an error message in cfdisk when running:

/var/lib/install/sbin/cfdisk /dev/mmcblk0

FATAL ERROR: Bad primary partition 0: Partition ends in the final partial cylinder

I have root access, and mmc card is unmounted.

Any ideas?

bahtaraigi
02-03-2006, 06:04 PM
Never mind...I formatted it in ubuntu instead. :D

mk500
02-05-2006, 04:25 AM
Is there a command that lets you see how much swap is being used? I'm trying to guage the effects now that I've set up swap with swapon.

Jus
02-05-2006, 06:28 AM
the command free will show memory usage.

mk500
02-09-2006, 06:40 AM
the command free will show memory usage.

Thanks, that's just what I needed. I've learned I need more VM.

rjungmann
02-09-2006, 05:08 PM
thank you Wolfram Ravenwolf !

thank you for doing the tutorial to explain how to extend the
memory to a swap on the mmc...

it seems to work on my 770.

thank you for your .deb wich automate the copy, of
the internal files....

i just want to indicate this :
this process take some second, or minutes.
just wait... (i just thinked that i bricked my 770)
but no !

it works...


the only problem i have is that because i'm not skilled with
linux commands, especially with partitioning, i just want to mention
some things :
- to do the partition, you need to use cfdisk given with wolfram .deb :
/var/lib/install/sbin/cfdisk /dev/mmcblk0 (don't forget the space before the /dev...)
- then, you must delete the existing partition !
(simply press D)
- create after that the first partition that will be used for data storage (in the same way as your original mmc worked) it must be a FAT16 partition. to do that press N.
- don't forget to indicate the type of partition (press T); it's number 06.
- i mentionned it bootable (should i ?) by pressing B
- then i created the second partition, used for the swap.
(press N)
- it create a linux partition. (number 83 i think). i leave it like that

booth partition are Primary (i created it like that)

now, the important thing (that i forgot to do, i understand this when readin help, always read help ! :) ) :
don't forget to write the partition table to the mmc :
use Write (press W, not w, but W ! then answer "yes")

now, you can quit and format the new created volumes !
the first one with :
mkfs.vfat /dev/mmcblk0p1

after you need to reboot then :
shutdown -r now

and then, go back to xterm, gain root (sudo gainroot)
and :
/var/lib/install/sbin/mkfs.ext3 /dev/mmcblk0p2

that's it !

you now created two partition on your mmc !


for information, mine is 512MB big (i'm waiting for 1GB),
i created the first part (FAT16) to 384MB (this is now the main data
memory, accessed by your main computer when connecting through USB), and the second one with the rest (approx. 129MB) for swapping. i hope it will be good !

this thing will be very usable when you want a lot of apps installed, or running. you will have a large space for saving your mails, and bookmarks... but, i want to mention this, Wolfram your script does the reverse thing, take all this back to the internal memory.
but now, because of this new swp size (bigger than the internal memory) a lot of people won't be able to get all the data back inside the 770. every one need to know this. then. if you want to copy all this to a new MMC (bigger... :) ) you need a computer running linux, and wo can access booth partitions to copy all this !

i'm happy !

surfing is now cool, and fast...

:)

renaud. :)

Jus
02-10-2006, 09:48 PM
Got a bit carried away trying to install kismet and ended up with the 770 constantly rebooting. Re-flashed, run the script, re-booted and had things back to exactly as they were before i broke it. :D ... thanks Wolfram, u've saved me a whole load of hassle.

Jus
Now where did i put those packages...

TVD
02-16-2006, 06:34 PM
OK, my first attempt to use a swap file on the standard 64 Mb MMC failed :( and resulted in a reboot loop... So I had to flash my 770 :'(

Can somebody confirm the settings Rjungmann used in cfdisk? I didn't read them when I tried to make the partitions but I did almost the same except from the bootable partition part. Then I ran the extrootfs script but errors showed up, something like "not enough space"... I made both partitions 32 Mb big. Is this to small?

Any idea what I have to do to prevent the reboot loop?

Thanx!

Seii
02-16-2006, 09:27 PM
Thanks for the excellent guide guys. I created the 128mb ext3 partition and also the swap file from the maemo wiki article. However, how do I check whether I've done it correctly or not? Also, is there a way to check what's in the 2nd partition?

I noticed that when I browse to anandtech.com and have the audio player running, the memory plugin shows that I'm using full capacity of the ram(all the way to red).


Thanks.

cantona
02-18-2006, 02:22 PM
I have a basic (read dumb) question - I followed Wolfram's wonderful instructions and think all is good but I dont understand how to access the "big" partion on my 1gb card - if i look on the 770 its there but when i connect via usb i only see the 64mb swap - i thought i should see the bigger partion - even if i pull the card and try and connect using a card reader only the 64mb is there - am imissing something?

Thanks

log2ins
02-19-2006, 06:10 AM
Hi,

I get an error message in cfdisk when running:

/var/lib/install/sbin/cfdisk /dev/mmcblk0

FATAL ERROR: Bad primary partition 0: Partition ends in the final partial cylinder

I have root access, and mmc card is unmounted.

Any ideas?

Well, I have the same error with a Kingston 1GB mmc. No problems with the original Nokia 64MB mmc.

Anyone knows how to solve the problem?

Thanks,
Antonio

subsecond
02-21-2006, 04:43 AM
Hallo,

I have a question about the usage of the extended 1GB N 770?

Can I run a full blown Browser with javavm - run applets started by websites on it?

Thanks subsecond

djs_tx
02-21-2006, 11:18 PM
I did the extrootfs script with no problems but swapon is failing.

If I try the commands exactly as written:
1. Create an empty file to hold the swap:
* dd if=/dev/zero of=/Root/swapfile bs=1024 count=24576
2. Turn the empty file into a swap file:
*mkswap /Root/swapfile
3. Now it can be activated like that (as root):
*swapon /Root/swapfile
4. To deactivate it, use this command (as root):
*swapoff /Root/swapfile

It first chokes on step 1 unless I am root because it won't let me create a new file in /Root as user.

I then sudo gainroot and it chokes on step 3 with a mysterious "swapon: /Root/swapfile: Invalid argument"

Any ideas?

Oh and how come the second partition is obviously working but it does not show up in the list when you issue the "mount" command with no args?

disq
02-22-2006, 02:15 PM
why not use jffs2? iirc it detects the often-written parts of the flash and balances its lifetime.

rwa
02-23-2006, 10:26 AM
Hi,

I get an error message in cfdisk when running:

/var/lib/install/sbin/cfdisk /dev/mmcblk0

FATAL ERROR: Bad primary partition 0: Partition ends in the final partial cylinder

I have root access, and mmc card is unmounted.

Any ideas?

Well, I have the same error with a Kingston 1GB mmc. No problems with the original Nokia 64MB mmc.

Anyone knows how to solve the problem?

Thanks,
Antonio

I ran into this same issue, and I think it must be related to the way Kingston formats/partitions the card a I was using a Kingson 1 GB also.

I got the exact same error, and by the text it seemed it must be an incompatibility between partitioning programs. I played around some by repartitioning and formatting in OS X via a card reader (in OS X Disk utility choose Partition, then the Options... button, select PC partitioning scheme then choose to format as PC-DOS).

This didn't work initially, but it did change the error to one saying that the first partition was longer than the physical size of the disk when cfdisk was run. This too seemed like maybe the OS X formatter and Kingston's were making a partition slightly larger than cfdisk thought could go on the media.

So I then went back to OS X and partitioned the card into two partitions. I made the second format as "Free Space" and made it as small as OS X allowed (you could type a smaller number but it then flagged the partition with an asterisk, I stopped at the smallest size w/o an asterisk which was about 70 MB). I formatted the first partition as PC-DOS and left the second as free space, I was hoping the first partition would look valid to cfdisk since it was smaller.

This worked. cfdisk started up fine and I was able to follow the steps as listed from then on. Also, when I deleted the large PC-DOS partition in cfdisk it combined that and the free space at the end, so I didn't waste any space on the card.

If you don't have OS X I'd guess there's some way to do this same thing in Windows, but I can't say how.

Good luck,
Ware

log2ins
02-23-2006, 11:13 AM
OK, thank you very much.

I'll do the same and let you know if it works.

Regards,
Antonio

uNtouched
02-23-2006, 11:23 AM
I tried this with my 64 mb card, but I had no luck. I ended up having less memory then I started with. Any ideas?

What I did.

umount /media/mmc1
/var/lib/install/sbin/cfdisk /dev/mmcblk0
parted the mmc into 2 parts, 1 was 40 MB the second was 24.

jayholler
02-25-2006, 01:13 AM
i modified the extrootfs script because i was unable to partition the card. i didn't realize that you couldn't do the partitioning from the 770 device until i read this thread. maybe you can and i am missing something, i'm somewhat of a n00b and only have mac osx at my disposal. but....i was able to modify the script, and do it all on the device itself after installing the port of vim. the device is definitely snappier so thanks to eveyone who shared their info to help me out. i was a little scared to make mods to the script, but it all worked fine and the only downside is that i have no external storage...that is untl i spring for the 1GB mmc! if anyone wants the modified extrootfs script i would be happy to share it. i'm just so happy this hack worked and my mods didn't brick the device!

-posted from a 770.

argh
02-26-2006, 04:26 AM
The info is a great help, but just to ask the obvious question, could the mmc card be formatted from the 770 with the right software installed?

It would sure make life easier than downloading a live-CD over GPRS for those of us less-fortunate ones out here!

jayholler
02-28-2006, 11:57 AM
ok, wolfram. if i understand the above, i can take a brand new rs-mmc and do the partitioning and root extension all from the 770? that is terrific!

jayholler
03-01-2006, 08:14 PM
ok, i got the 1gb card, and after following the advice of various others i have set up everything working perfectly. thank you all for helping me get the most out of my 770. browsing is much improved now!

Simon
03-02-2006, 02:40 PM
I'm at work and bored so I thought why not finally try this on my 770 and 1GB card. I followed the instructions and managed to get it working (I think). I followed Renauds instructions on how to do the partitioning part. Had a wee bit of trouble with the partitioning tool but that was because I wasn't full screen I think and so it messed up the display. I am just copying everything back onto the 800MB or so partition I can see on the 770 now. How much free memory should I see on the device now. I forgot to look before I started what it was using! Thanks Renaud and Stefan for your instructions :)

Kralisec
03-03-2006, 05:10 PM
Hi,

After reading this thread I see nobody with the same problem I encountred.

The 2 latest lines from http://maemo.org/maemowiki/ExtendedRootFilesystem
propose to prefer ext2 as ext3 to default format.

Ext3 with /var/lib/install/sbin/extrootfs work fine,
but ext2 format cause problem with mount/umount system (doesn't work)
cause parameter ext3 line 26 from the extrootfs script

I replace ext3 with ext2 and as far as I can see all looks ok :D


Really thank you for great script Wolfram Ravenwolf !!!


Good day,
Laurent.

Kralisec
03-03-2006, 05:14 PM
2.) When I execute /dev/sda does this just partion the 770 drive (i havent run parted yet so maybe this is self-explanitory - i just dont want to format my c drive ;)


Since some Sata hardrive appear with /dev/sda device,
the best if you use some LiveCD is to unplug your harddrive :D

just in case of ...


Good day,
Laurent.

psychedelicbeats
03-04-2006, 03:33 PM
i have a question here. all we are doing is extending the root filesystem, correct? if so,

will the device properties and xterminal (in theory) recognize a larger internal memory?

i am pulling up screens below, and i do not see any sign of extension. i have done everything per instructions, and it does go fine, but i dont see/feel any difference thus far. i am using nokia supplied 64mb rsmmc for testing.

also, screenshot #4 is an oddball. it shows a random amount of memory. i've seen anything from ~20 to ~70 total memory

http://img136.imageshack.us/img136/7277/screenshot004fn.png
http://img133.imageshack.us/img133/4379/screenshot030in.png
http://img136.imageshack.us/img136/8688/003re.png
http://img133.imageshack.us/img133/8412/screenshot042ec.png

Kralisec
03-07-2006, 05:45 AM
Hi psychedelicbeats,

What result with mount command ?
(juste enter "mount" in xterminal)

uNtouched
03-07-2006, 06:56 PM
I'm about to slam this thing into the ground. I've reflashed it about 7 times already trying to extend the root fs. Here's what I'm doing.

sudo gainroot
umount /media/mmc1
/var/lib/install/sbin/cfdisk /dev/mmcblk0
I make one partition 771MB, Primary, beginning, change the type to 06, and leave it alone.
I make another partition 256.61MB, primary, and make that type 83
Quit
mkfs.vfat /dev/mmcblk0p1
shutdown -r now

sudo gainroot
/var/lib/install/sbin/mkfs.ext3 /dev/mmcblk0p2
/var/lib/install/sbin/extrootfs

I endup with a bricked device everytime. I'm using a Transcend 1GB MobileMMC card. When I reflash, I check the card without reformatting it or anything, and I end up with the following.

Memory in use: 251393526 kB
Memory Available: 1000208 kB
Email, audio, video, etc are all 0 kB up until I get to...
Other files: 251393526 kB

-Edit-

umount: lazy umount of (null) failed!
umount: /dev/mmcblk0p2: Invalid argument

musicoman
03-08-2006, 11:43 AM
Like psychedelic , I don't know if it works. I got the same issue in the memory panel and with the command free so I put my "mount" here.


/ $ mount
/dev/mtdblock4 on /mnt/initfs type jffs2 (rw,noatime)
none on /mnt/initfs/proc type proc (rw,nodiratime)
none on /mnt/initfs/sys type sysfs (rw)
none on /mnt/initfs/tmp type tmpfs (rw)
/dev/mtdblock4 on / type jffs2 (rw,noatime,rpsize=1024,rpuid=0,rpuid=30000)
none on /tmp type tmpfs (rw)
/proc on /proc type proc (rw,nodiratime)
sysfs on /sys type sysfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
none on /dev type tmpfs (rw)
/dev/mmcblk0p2 on /Root type ext3 (rw,noatime)
devpts on /dev/pts type devpts (rw)
/dev/mmcblk0p1 on /media/mmc1 type vfat (utf8,uid=29999)
/ $


any idea ?

djs_tx
03-08-2006, 02:11 PM
uNtouched:
I might be wrong but I think your issue is that you are not putting a file system on the second partition. After mkfs.vfat for the first partition, do a mkfs.ext3 for the second partition.

musicoman:
/dev/mmcblk0p2 on /Root type ext3 (rw,noatime) means the second partition on your mmc card is mounted on /Root. I would take that to mean it is working
David

uNtouched
03-08-2006, 04:13 PM
Ok let me ask you this, what does your fstab look like? I kinda deleted the line that mounted the mmcblk0p2 thinking there was something wrong with it, and expecting it to get re-written.

Although, there is no mmcblk0p1 or p2 when doing the mount command, the only thing I see is mmcblk0 mounted to /media/mmc1

djs_tx
03-08-2006, 06:01 PM
/dev/mmcblk0p2 /Root ext3 defaults,errors=remount-ro,noatime 0 0

Exactly. You did not format the second partition with an Ext3 filesystem so the mount fails. Once you correctly format the second partition you might try the script again and see if it adds the correct line in fstab. If not manually edit it as above.

David

uNtouched
03-08-2006, 06:26 PM
Dj, I did do the ext3 format part. I just manually deleted it from fstab. I just reflashed and I'm about to redo it.

-edit-

One of 3 things could be the problem....

1. The 770 isn't formatting that card right
reason: the original 64MB card worked with the same steps I've been trying.

2. The card simply can not hold certain partitions/formats.

3. The card is bad.

EDIT!

It works, I used partition manager for windows. Works fine, wouldn't work though while trying to do it from within the 770.

Simon
03-13-2006, 03:27 PM
I finally got around to doing first the extended file system hack then the swap on the new partition one and wanted to share my observations.

The device is certainly a lot more stable. No more "Out of memory" warnings which I used to get with as little as 2 browser windows open. Now I can run all sorts of things and haven't seen any memory errors. The device also seems faster but it is hard to really quantify that. General loading of stuff is still slow as a dog. 15 seconds for the video player to open a 1 hour episode of Top Gear for example. Or 10 seconds to jump from the first page to the last of a 33 page PDF file. But I guess these sort of things you wouldn't expect to be faster. The email app definitely seems faster as does the file manager. I installed the CPU/Memory Load Applet with the mod to allow me to turn on and off the swap (available on the Maemo downloads page). That works great once I found out I had to edit my /etc/sudoers file to allow the swapon, swapoff command to work without a password.

The biggest change I have found is whereas before I would have to remember to close things before opening others (like I would have to stop the browser to open the inbox) now I can run multiple things and change between them quickly.

Thanks to you guys who figure out how to do all this stuff and make it possible for us Linux newbies to get them running without too much drama.

Simon

Simon
03-13-2006, 04:33 PM
Ah, and another thing that seems A LOT better is the performance of Flash in the browser.

jayholler
03-13-2006, 09:58 PM
i chmod'ed /etc/sudoers so now sudo gainroot doesn't. tells me that the mode is 0740 should be 0440. if i flash the r&d image can i get back in to change it?

aflegg
03-14-2006, 03:59 AM
You can reflash any image - it'll overwrite /etc/sudoers back to the default.

jayholler
03-14-2006, 08:49 AM
yeah, just enabling r&d mode didn't work. i should be able to just reflash the image and the extrootfs will remain intact right? do i understand that correctly? you guys are the best!

aflegg
03-14-2006, 08:51 AM
Correct: the MMC card isn't touched by the flasher.

djs_tx
03-14-2006, 10:39 AM
I think you will need to re-install the extrootfs package and run the script so it can set up the links again.

aflegg
03-14-2006, 10:48 AM
Good point.

jayholler
03-14-2006, 11:03 PM
well, you were both right. i reflashed the OS, enabled r&d mode to modify gainroot, and then disabled r&d mode. after running the extrootfs script again my system has been restored EXACTLY as it was previously, with the exception of the chmod'ed /etc/sudoers file. i can now safely get in and add the entry in sudoers for the swapfile menu item in the new load_plugin_aw that is now available on maemo.org. it is REALLYnice to be able to get things right back the way they were with so little effort. thanks for your help! goodtimes indeed for this linux novice. my new issue is i accidentally popped out the usb cable from my ibook before all this nonsense with /etc/sudoers, but under Control Panel>Memory it says my usb cable is attached. i tried mount and umount, but to no avail. regardless i have access to both partitions, which is where i saved my vim-tiny, extrootfs, and all other installation files. i'll have to figure that one out later.

dandrewk
03-18-2006, 02:23 PM
Greetings, and let me add to the chorus of thank you's to Wolfram and others who are making the 770 even more functional. This reminds me of the early days of the Palm Pilot, except the 770 is just a bit more powerful. :)

I did the partition (1GB Sandisk), using 64mb as ext2 and the rest for ext3. I moved the swapfile and altered the start/stop scripts to have swap-on always on.

This worked great, but this morning I tried to save a note to the documents file, and I kept getting "file is read only". I was able to save to the mmc. I then checked the home directory via a USB cable, and changed all the permissions to give total access. I rebooted and was then able to save to the documents folder.

However, for some reason this blitzed by news reader, erased the connection settings, web home page, bookmarks and URL history. I will have to go to backup to restore those, but it is disturbing this happened. Was it because I used the USB to access the 770 file system? I do have a card reader, but the USB cable is the easiest.

Any clue as to what has happened? The 770 is SO much better the the efs!

One other question - I am debating whether to keep the swap file on ext3. As mentioned, I have altered the start/stop scripts. I am a Linux rookie, how do I return those scripts back to the original state to stop using the swap transfer?

Wooky
03-23-2006, 03:30 PM
I have seen some questions arouse here that seem to still go unaswered.

First, I believe the best mode to transfer large files to the N770 is using NFS, since there is no need to install anything. At maemo wiki there is a howto explaining how to setup an NFS server in Windows machines as well, since the N770 can't do SMB. NFS is quite transparent and much easier to do than scp or taking off the RSMMC card. IMHO, of course.

Next, the "2x your RAM" thumb rule was valid for a specific platform at an specif time. Suppose you have 4GB of RAM in your desktop. Are you really setting up an 8GB swap file?

And last, command 'free' display real RAM (and swap if set up), whereas the GUI memory manager display (flash)ROM where the apps and OS is located, and henceforth also displays space available in the sym-linked RSMMC partition.

bro
04-10-2006, 06:35 PM
Hi,

I get an error message in cfdisk when running:

/var/lib/install/sbin/cfdisk /dev/mmcblk0

FATAL ERROR: Bad primary partition 0: Partition ends in the final partial cylinder

I have root access, and mmc card is unmounted.

Any ideas?


I encountered the same problem with a new 1GB Kingston mmc-rs card. Just add the -z switch to the cfdisk command to counter this, thus:

./cfdisk /dev/mmcblk0 -z

You'll get a blank partition table to start with and after creating the partitions, can write it to your card. Then proceed as described in the wiki.

Further: I also decided in favour of ext2 instead of ext3, since I see no value in having journaling enabled, while it does create extra write actions to the card (for updating the journal). Anyone more knowledgeable able to comment on it?

Not that I am that worried about the memory card, it only cost E 36,85 (Netherlands) and comes with lifetime warranty.

To conclude: a big thank you to Wolfram and all the others for enabling this hack, it makes the 770 a lot more usable! 64M is just too little, the 24M swap makes all the difference.

gtsmith
04-10-2006, 07:57 PM
I've been running in rdmode for a while now. Is there any issues I should be aware of or concerned about keeping the 770 in rdmode?

dandrewk
04-11-2006, 07:55 PM
If perchance something happens and you need to re-flash, you won't be able to in rdmode. Then you are pretty much fubar'ed.

cantona
04-11-2006, 11:05 PM
How do you get out of rd mode? is it just the command:

./flasher --disable-rd-mode --reboot

kutibah
04-11-2006, 11:11 PM
How do you get out of rd mode? is it just the command:

./flasher --disable-rd-mode --reboot
Yes, initiate that command through Linux. (it's the same way you enabled rd mode)

cantona
04-11-2006, 11:19 PM
Thanks Kutibah

SM!LeY
04-16-2006, 03:12 PM
Great guidance...thx.
What is the best partition size with 1GB for the linux partition?

kutibah
04-16-2006, 03:18 PM
After partitioning everything correctly, I ran /var/lib/install/sbin/extrootfs which is supposed to automatically do Step 2 and 3 for me. After it finished, it rebooted, but the files on my 770 memory are still there, not on my memory card. Isn't this supposed to move them and a symbolic link will be created on the internal memory?

troubleshootr
04-16-2006, 06:14 PM
After partitioning everything correctly, I ran /var/lib/install/sbin/extrootfs which is supposed to automatically do Step 2 and 3 for me. After it finished, it rebooted, but the files on my 770 memory are still there, not on my memory card. Isn't this supposed to move them and a symbolic link will be created on the internal memory?

I only got this script to work on a "fresh" flash. I ended up just editing the files that mount and unmount the ext3 file system by hand. I created a symbolic link to just my home directory only. Just a note but after you extend the file system, Windows XP will no longer mount the drive when using the USB. If you are running only Windows, you should keep this in consideration. Linux has no problem, it mounts all partitions on the mmc. For some reason Windows will see the drive in "Disk Management" but not assign it a drive letter, and all options are greyed out. This is my experience anyway.

kutibah
04-16-2006, 07:00 PM
I only got this script to work on a "fresh" flash. I ended up just editing the files that mount and unmount the ext3 file system by hand. I created a symbolic link to just my home directory only. Just a note but after you extend the file system, Windows XP will no longer mount the drive when using the USB. If you are running only Windows, you should keep this in consideration. Linux has no problem, it mounts all partitions on the mmc. For some reason Windows will see the drive in "Disk Management" but not assign it a drive letter, and all options are greyed out. This is my experience anyway.
Hmm, not being able to access the 770 through USB is changing my mind. I do have Knoppix Live but it's a hassle to boot it every time I want to access my memory card. Anyways, maybe I'll keep it the way it is right now. I'm not in a hurry to move any of the files. Thanks for the help.

kutibah
04-16-2006, 07:18 PM
Ahh ****. I think something went wrong. I deleted the 2 partitions and created a new one with the full amount of space available and made it FAT16. I then formatted it using vfat and rebooted my 770. Now, the 770 boots up and the bar gets stuck at around 40%. It's been that way for a few minutes. I tried turning it off and on again, same problem. Am I going to have to reflash it?

And even worse, I forgot to backup my settings :(

troubleshootr
04-16-2006, 07:27 PM
Ahh ****. I think something went wrong. I deleted the 2 partitions and created a new one with the full amount of space available and made it FAT16. I then formatted it using vfat and rebooted my 770. Now, the 770 boots up and the bar gets stuck at around 40%. It's been that way for a few minutes. I tried turning it off and on again, same problem. Am I going to have to reflash it?

And even worse, I forgot to backup my settings :(

Sure looks that way. Hopefully it was just settings and not data you forgot to backup. There is no "recovery" mode on the 770. If it don't boot, you must reflash. Personally, I feel the 64 Meg Nokia provided for applications is plenty.. I installed quite a few applications and have plenty of space left.

troubleshootr
04-16-2006, 07:32 PM
If perchance something happens and you need to re-flash, you won't be able to in rdmode. Then you are pretty much fubar'ed.


I had no trouble reflashing in RD mode using the Linux flasher. I must have done it several times.

kutibah
04-16-2006, 08:33 PM
Sure looks that way. Hopefully it was just settings and not data you forgot to backup. There is no "recovery" mode on the 770. If it don't boot, you must reflash. Personally, I feel the 64 Meg Nokia provided for applications is plenty.. I installed quite a few applications and have plenty of space left.
How do I flash it with the firmware through Linux? I can't use the Software Update Utility through Windows because of various reasons, so it has to be through Linux.

troubleshootr
04-16-2006, 08:42 PM
How do I flash it with the firmware through Linux? I can't use the Software Update Utility through Windows because of various reasons, so it has to be through Linux.


http://maemo.org/maemowiki/HOWTO_FlashLatestNokiaImageWithLinux

kutibah
04-16-2006, 08:56 PM
http://maemo.org/maemowiki/HOWTO_FlashLatestNokiaImageWithLinux
Thank you!

kutibah
04-17-2006, 09:06 AM
I reflashed and everything is fine, but my memory card is not. On my PC, it shows that the total size is only 771mb. Yet, in my partition through the 770, the full 1027mb are supposed to be there?

troubleshootr
04-17-2006, 05:28 PM
You need to delete all partitions and format the device. Say you have your mmc card showing up as /dev/mmcblk0 with partition /dev/mmcblk0p1. Delete the /dev/mmcblk0p1 partition so that there is no partitions on the mmc card. Insert into the 770 and format the mmc using the File Manager utility. Windows should now see the full amount of memory.

kutibah
04-17-2006, 07:39 PM
You need to delete all partitions and format the device. Say you have your mmc card showing up as /dev/mmcblk0 with partition /dev/mmcblk0p1. Delete the /dev/mmcblk0p1 partition so that there is no partitions on the mmc card. Insert into the 770 and format the mmc using the File Manager utility. Windows should now see the full amount of memory.
Thanks. But how am I supposed to Format it on FAT16? I can only do FAT32?

troubleshootr
04-17-2006, 08:18 PM
Thanks. But how am I supposed to Format it on FAT16? I can only do FAT32?

I thought the 770 defaulted to vfat (fat32)

Well you could also do it hand

as root:

umount /media/mmc1
mkfs.vfat /dev/mmcblk0

kutibah
04-17-2006, 08:26 PM
I thought the 770 defaulted to vfat (fat32)

Well you could also do it hand

as root:

umount /media/mmc1
mkfs.vfat /dev/mmcblk0
Ya, I tried it via that method before and then my PC would not see the memory card anymore?

troubleshootr
04-17-2006, 08:35 PM
Do you have a digital camera that takes SD cards? You can format it in most cameras with the little adapter.

kutibah
04-17-2006, 08:39 PM
Ya, it won't let me format it because its not an SD. It fits, just wont format. :( I also tried to format it via Norton Partition Manager and it just gives me an error...

kutibah
04-17-2006, 08:52 PM
Ok, I also tried formatting it via File Manager in the 770. My computer still doesn't see it?

troubleshootr
04-17-2006, 08:59 PM
Ya, it won't let me format it because its not an SD. It fits, just wont format. I also tried to format it via Norton Partition Manager and it just gives me an error...

Ok, try this. I assume you got a dual boot computer with a card reader. Boot into linux, put the card in your reader with the little adapter thingy. Su to root. Check dmesg, card will probably be detected as sda. You probably got a partition as sda1. Unmount any partitions that auto-mounted:

umount /dev/sda1

then open cfdisk:

cfdisk /dev/sda

delete ALL partitions, CFDISK should show all space as free space. Write changed to disk and exit CFDISK.

Force a format of entire device:

mkfs.vfat -I /dev/sda (note the -I that is a capital i)

NOTE: Change sda to whatever dmesg showed you as device name.

Hopefully this will work.

troubleshootr
04-17-2006, 09:14 PM
Ok, disregard that, it did not see my card in Windows. You need to create a partition on the card (sorry about that). Use the max size and make it bootable in CFDISK. write the changes and exit. Then try mkfs.vfat /dev/sda1. I just did this and Windows (2000) now sees my entire mmc by USB.

kutibah
04-17-2006, 09:25 PM
Ok, disregard that, it did not see my card in Windows. You need to create a partition on the card (sorry about that). Use the max size and make it bootable in CFDISK. write the changes and exit. Then try mkfs.vfat /dev/sda1. I just did this and Windows (2000) now sees my entire mmc by USB.
I did this through the Partition Program in XTerm and it still doesn't see it? Do I need to do this through Linux?

c_legaspi
04-17-2006, 09:26 PM
first of all, i dont have any linux experience and dont have linux. i do have a nokia 770 and a pc running 2k.

some time in the future i would like to do the 1gig extension of the foot file system as describe but with so much posting, im a bit confused. i hope you will help me by answering my questions.

1. ive downloaded the extroofs and exterm. are these the only two files i need to do the extended root file system?

2. will xterm allow me to get root access or do i need another file.

3. where do i install or load the extroofs file.

4. how do i execute the extroofs

5. when executing extroofs, will it ask how large i want the partitions to be.

6. what problems am i to encounter. by reading thru the post, it seems that some people have run into some snags but got it working. i on the other hand dont have any experience with linux so all that coding is a bit over my head.

7. will this upgrade free the physical memory so it will run faster and larger programs.

8. what is the recommended partition size for each partition

Im sure ill have other questions but any other help with this will be appreciatted.



thanks,
claudio

troubleshootr
04-17-2006, 09:48 PM
I did this through the Partition Program in XTerm and it still doesn't see it? Do I need to do this through Linux?

I did it through Linux. Do NOT do the mkfs.vfat -I /dev/sda. Just delete all partitions through CFDISK in Linux. Then make a new Primary partion, max size, and bootable. Then WRITE and QUIT. Then format with mkfs.vfat /dev/sda1.

troubleshootr
04-17-2006, 10:18 PM
first of all, i dont have any linux experience and dont have linux. i do have a nokia 770 and a pc running 2k.

some time in the future i would like to do the 1gig extension of the foot file system as describe but with so much posting, im a bit confused. i hope you will help me by answering my questions.

1. ive downloaded the extroofs and exterm. are these the only two files i need to do the extended root file system?

2. will xterm allow me to get root access or do i need another file.

3. where do i install or load the extroofs file.

4. how do i execute the extroofs

5. when executing extroofs, will it ask how large i want the partitions to be.

6. what problems am i to encounter. by reading thru the post, it seems that some people have run into some snags but got it working. i on the other hand dont have any experience with linux so all that coding is a bit over my head.

7. will this upgrade free the physical memory so it will run faster and larger programs.

8. what is the recommended partition size for each partition

Im sure ill have other questions but any other help with this will be appreciatted.



thanks,
claudio


1. Yes
2. No, you need a Linux or OSX operating system and follow instructions here:
http://maemo.org/maemowiki/HowDoiBecomeRoot
or you can use a Linux live boot CD or Virtual Linux install. see here:

http://www.internettablettalk.com/wiki/index.php/Setting_up_Windows_XP_to_Use_the_Flasher_(For_Root _Access,_USB_Host_Mode,_etc.)

3. This is not a program, but rather a script. It will move the required files and set up the required links automatically.

http://maemo.org/maemowiki/ExtendedRootFilesystem

4. You run the command via Xterm as the root user.

5. No, you need to partition the RS-MMC before hand
6. Hopefully None. In my experience the memory card will no longer be seen by Windows when using the USB cable.
7. Not directly, but you can set up a swap file later for more available system memory. It will not run any faster though.
8. It depends on the size of your memory card and your preferences.

c_legaspi
04-17-2006, 10:59 PM
i thought everything can now be done on the nokia 770. i still do more research before i do this but for now, it does what i need it to do

thanks

troubleshootr
04-17-2006, 11:08 PM
i thought everything can now be done on the nokia 770. i still do more research before i do this but for now, it does what i need it to do

thanks

The hard part for Windows users is becoming root user. Nokia decided that end-users would not want to modify any system settings, thus made it difficult (especially for Windows users) to become root. There was a modified flash image (with root access built in) floating around this forum. I think it was pulled due to licencing issues. The author then decided to offer a patch that would allow users to "patch" the firmware for root access. Perhaps a search would find it or someone could provide a link.

c_legaspi
04-17-2006, 11:27 PM
yup, ive downloaded that as well. just trying to do it without any complications.

Banner
04-19-2006, 01:53 AM
What sort of performance upgrade will this bring to the 770? I don't know if I want to do this or not, as I haven't been unhappy with the performance so far.

Amper_CZ
04-19-2006, 06:51 AM
Somebody ask same question but there is not answer. Do anybody know answer why is JFFS is not recomended. I was found somewhere that internal flash storage use JFFS, so it seems logical to me (I understand that JFFS partition is not accessible wia USB from Windows box)

troubleshootr
04-19-2006, 07:07 AM
What sort of performance upgrade will this bring to the 770? I don't know if I want to do this or not, as I haven't been unhappy with the performance so far.

It will not make it run any faster. Having a swap partition will allow you keep more applications open, and load more complex web pages without running low on system memory and possibly causing a crash or reboot.

dandrewk
04-20-2006, 03:28 PM
Greetings. I altered my start/stop scripts to auto load/unload the swapfile at startup and stop, using Wolfram's script:

echo -e "/Root/swapfile\tnone\tswap\tsw\t0\t0">>/etc/fstab
sed -i '/exit/iswapon -a 2>/dev/null' /etc/init.d/minircS
sed -i '/umount/iswapoff -a 2>/dev/null' /etc/init.d/minireboot /etc/init.d/minishutdown

I am a linux rookie. I don't want the swap-load to occur automatically. Can someone please tell me how to return the start/stop scripts back to default? I really don't want to brick my 770. :)

Thanks for any help.

jayholler
04-21-2006, 12:36 PM
Hi all,

I'm pretty new to *nix, and i was wondering if the anticipated 2006 OS will work with my system which already has the extrootfs applied. My understanding is that the new OS will include a number of improvements, including low-level improvements such as a new way of handling installation files, which will be incompatible with existing installation files, requiring a recompile of every app currently available.

So will the extrootfs still work, or will it be broken by the changes in the new OS?

I assume Nokia will expect that you flash the new image and then wait for updates to the apps, and I'm not even sure the existing apps will work under the new OS if you are able to successfully run the extrootfs under the 2006 OS..

Any ideas anyone?

richie
04-21-2006, 02:55 PM
Somebody ask same question but there is not answer. Do anybody know answer why is JFFS is not recomended. I was found somewhere that internal flash storage use JFFS, so it seems logical to me (I understand that JFFS partition is not accessible wia USB from Windows box)

I'm not an expert on this, but I think it is because memory cards have a wear levelling controller built in, whereas the internal memory does not have this built in and needs JFFS to do wear levelling. JFFS on a memory card is bad, because JFFS journalling adds to the number of write/erase cycles, which on a memory card would reduce its life. Therefore I think it is recommended internal memory use JFFS2 and for memory cards ext2.

Rich

polyesterangst
04-24-2006, 09:18 PM
I need some assistance. I was following the directions using the Unbuntu for flasher to get the Nokia into R&D mode, but when I get to the part to connect the Nokia, the Windows OS prompts for nokia 770 (host) drivers to be installed. Does anyone have this issue, or know the way around it. I tried connecting my Nokia when it is on, to the system, and can swap files, but the flasher states that the device is not suitable.

Neil McAllister
04-25-2006, 04:10 PM
OK, apologies if everybody understands this but me, but this is a long thread and the answer to me seems unclear.

Why, exactly, would we want to do this?

Personally, extending the internal memory sounds like a good idea because I hate the idea that installing applications on the device will make the applications you already have run more poorly (because they have access to less memory). Some posts in this thead seem to suggest that this trick isn't really going to help you much in that regard, though. So what's the reason for it, again?

If I understand correctly, doing the steps described in this thread will result in:

1. An RS-MMC card where most of it is formatted ext2fs or some other Linux filesystem, meaning that when you plug it into a Windows PC the PC won't be able to access the card (i.e. you won't be able to get any files on or off it)

2. You'll end up with a portion of your root filesystem on the card, so you don't ever want to take the card out of the device or you risk crashing it.

Neither of these seems particularly desirable. Am I missing some obvious benefit? I understand the swap partition idea; I'm just strictly talking about the extended root filesystem now.

aflegg
04-26-2006, 04:55 AM
Neil,

I think the biggest benefit is that reflashing the device won't lose your personal documents, settings and installed applications.

Of course, upgrading the OS runs the risk that part of your mirrored filesystem is supposed to be different, and you'll end up with weird and unexpected problems. Most likely to be a problem when 2006 OS comes out.

HTH,

Andrew

mike9285
05-06-2006, 12:41 AM
How can you tell if the swapfile is on or off?

troubleshootr
05-06-2006, 09:48 PM
How can you tell if the swapfile is on or off?

type "free" in Xterm.

c_legaspi
05-10-2006, 12:31 AM
Wolfram Rocks. He really makes this upgrade easy to do. Everyone who has a Nokia 770 needs to do this upgrade and do his recomended swap file method

acdczip
06-14-2006, 12:52 AM
Just upgraded to the 2006 OS and already I am starting to miss the extended root fs. Was wondering if Wolfram is going to recompile the deb he wrote for the 2005 OS into the new 2006 OS. Also I am wondering if unionfs would work easier and better with the new 2006 OS.

aflegg
06-14-2006, 05:10 AM
UnionFS is a much *much* better idea.

Although you won't be able to use it for installed applications now, as the 3rd party debs are installed into /, intermingling them with the OS-proper.

bradb
06-14-2006, 06:18 PM
Although you won't be able to use it for installed applications now, as the 3rd party debs are installed into /, intermingling them with the OS-proper.

Andrew-

I would have thought you could simply create a number of unions for each of the most likely installation points (such as /usr/bin).

Not as easy but it should be possible. Of course maybe that means you couldn't easily boot without the union installed?

Brad.

aflegg
06-15-2006, 04:12 AM
True, you could unionise /usr to get more space. Without the MMC you'd still boot to a largely vanilla 2006 OS, however there'd be some cruft in /etc, /var/lib/dpkg etc.

Still, might be worth trying...

tomjnsn
07-08-2006, 03:43 AM
I've upgraded to 2006 but in the process lost the script. Until a new package is built could someone please post the script for copying & pasting?

richie
07-09-2006, 01:36 PM
Is this it here, extendedroot (http://maemo.org/maemowiki/ExtendedRootFilesystem?highlight=%28root%29)

Does anyone know how unionfs is coming along for IT2006?

Rich

bradb
07-11-2006, 03:49 AM
Does anyone know how unionfs is coming along for IT2006?

Rich-

I've exchanged a few e-mails with the author of mmc-unionfs, but that was about a month ago. According to his site (http://www.hczim.de/software/mmc-unionfs.html), the port to 2006 is on hold because the shutdown scripts use /home/user as their home directory.

Bummer. I hope this gets resolved soon.

Until then... if you're the daring sort... I've attached my port of mmc-unionfs. The installer will simply install the kernel module and software for mmc-unionfs, so you'll have to run "setup" and "enable-boot" (as per the above documentation) to actually setup and activate a union.

This package will install as "mmc-unionfs-hack" and should be un-installed and replaced with the "real" mmc-unionfs package as soon as it's released.

I don't guarantee it works, but I've been using it for weeks now without problems (well, unless I crash the 770 - then I need to pull the MMC and run e2fsck on it to make sure the filesystem is ok).

Oh yeah... this is important - You'll need to modify a pair of scripts in /etc/init.d (as root, of course):

Specifically, edit "minireboot" and "minishutdown".
you'll need to manually edit the line:

umount -r /media/mmc1 /mnt/initfs /

To be:

umount -r /media/mmc1 /media/mmc2 /mnt/initfs /

This will make sure the union will be unmounted at shutdown and reboot. If you don't, you'll end up with a corrupt ext2 filesystem.

Just for practice, I'm going to modify the installer to automatically modify the minireboot and minishutdown scripts just to make things easier; I'll update this post when the time comes FWIW.

Hope this is useful,

Brad.

richie
07-11-2006, 07:54 AM
Hi Brad

Rich-
According to his site (http://www.hczim.de/software/mmc-unionfs.html), the port to 2006 is on hold because the shutdown scripts use /home/user as their home directory.

Thanks for the attached. Are you able to make a union of the home directory with your version? A bit confused why the problem of /home/user shutdown scripts with the authors version of mmc-unionfs, yet yours uses shutdown scripts in /etc/init.d/ Or am I mixing two different shutdown scripts up?

Cheers
Rich

aflegg
07-11-2006, 11:15 AM
The problem is that the user invokes "Turn off the device" from the desktop, and maemo_af_desktop then (eventually) invokes /etc/init.d/minishutdown.

The current working directory of the script when invoked like this is /home/user, meaning that trying to unmount it - if it's a union (which most people would have) - is tricky.

The suggestion I've made to Heike is to re-execute the shutdown scripts; something like:

#!/bin/sh

if [ "x$1" != "xreexec" ]; then
cd /
exec $0 reexec
fi

...

Then, from '...' onwards, you'll be guaranteed that /home/user is not
the current directory.

Cheers,

Andrew

bradb
07-11-2006, 02:29 PM
The current working directory of the script when invoked like this is /home/user, meaning that trying to unmount it - if it's a union (which most people would have) - is tricky.

Well, I guess I'm confused (no surprise there) but I still don't understand the problem. After all, the scripts even umount "/".

At any rate, I've been using a union for /home/user for weeks and everything seems fine. Maybe I've just been lucky?

I do know that failing to modify the shutdown/reboot scripts will result in file corruption (or at least a warning about mounting an unchecked filesystem).

Brad.

ascherjim
07-28-2006, 01:23 AM
In my initial tries to "upgrade the internal memory by extending the root filesystem to a memory card" (with x-term installed on the 880 and apparently running well), after I entered "umount/media/mmc1," I get the message "Device or resource busy." What does this mean and what do I do now? Thanks for any help you can provide.

richie
07-28-2006, 09:18 AM
after I entered "umount/media/mmc1," I get the message "Device or resource busy." What does this mean and what do I do now? Thanks for any help you can provide.

It normally means some application or terminal is using the mmc card. In the xterm is the current directory using /media/mmc1 or is an application accessing the mmc card? If xterm is using it, change to another directory, or close the application that was accessing the card.

Rich

ascherjim
07-28-2006, 10:24 PM
Rich: I'm very frustrated. This is the first command I'm instructed to enter in this exercise -- and it fails! I can't get past the "Device or resource busy" message. The only "devise or resource" I can discover to be "busy" is apparently the x-term itself -- which I assume I need to have operational in order to enter the command. Where do I look on my 880 to see if perhaps something else is "busy", and what characterizes a "device or resource" which could be "busy?. I expect I'm asking too much of you, or anyone else reading this. But, as I said, I am frustrated. Thanks for your interest. Jim

richie
07-29-2006, 07:00 AM
Hi

Something is using the mmc card, for some background reading have a look here to help understand, http://www.umiacs.umd.edu/~jusub/unix-hints-and-hacks/19270039.htm

Using a Linux PC I sometimes get this error and it would mean I have a file manager accessing the card, or in a xterm the directory I am in, is the mounted filesystem I want to umount. Simply changing to another directory would mean I can umount.

In the xterm you could type cd / and then try umount.

Or if this doesn't work, have a go at posting the same problem to the Maemo mailing list,
https://maemo.org/mailman/listinfo/maemo-users

Cheers
Rich

fpp
07-29-2006, 02:55 PM
Rich: I'm very frustrated. This is the first command I'm instructed to enter in this exercise -- and it fails! I can't get past the "Device or resource busy" message. The only "devise or resource" I can discover to be "busy" is apparently the x-term itself -- which I assume I need to have operational in order to enter the command. Where do I look on my 880 to see if perhaps something else is "busy", and what characterizes a "device or resource" which could be "busy?. I expect I'm asking too much of you, or anyone else reading this. But, as I said, I am frustrated. Thanks for your interest. Jim
I think the problem is that you are following instructions written specifically for the 770 and trying to make them work on a 880, which no one else here has seen or heard of yet...

(sorry - just kiddin' :-)

aflegg
07-30-2006, 12:37 PM
after I entered "umount/media/mmc1," I get the message "Device or resource busy." What does this mean and what do I do now?

If you've got virtual memory/swap already enabled, this will have to be turned off first.

HTH,

Andrew

howlcoyote
07-30-2006, 01:21 PM
Hello,

after investigating for hours on how to extend root fs in OS2006 I still don't know how to do it. The http://wolfram.ravenwolf.de/extrootfs_1.0_arm.deb doesn't work on OS2006, but is there a way to still use links pointing on to my 1GB MMC for the installation routine?

There's another question I've got regarding the "Virtual memory" option:
Although I've inserted a 1GB card it only offers me 64MB maximum available space. The Memory card details tell me it's "Storage memory available: 966.5 MB".

Kane
07-31-2006, 05:03 AM
What are the consequences of using a MMC as a swap partition? I think someone's asked this question earlier on in the thread, and there hasn't been a satisfactory reply.

Based on http://lkml.org/lkml/2005/6/1/131 the author suggests that a MMC (or any flash memory for that matter) isn't the best medium for swap files because it has a finite, and from what I understand, relatively small number (someone mentioned 100,000?) of maximum write cycles before it becomes unusable.

The article mentioned above also hints at the possiblity that MMCs don't have self-levelling processors. Is this the case? A quick google can't confirm or deny this.

Can anyone clarify? It would really suck to just have the machine start crapping out because the swap file is randomly corrupted after a couple months of use.

Found this bit of information:

MMC
SanDisk MultiMediaCard and Reduced-Size MultiMediaCard - Product Manual Version 1.3
http://www.sandisk.com/Assets/File/OEM/Manuals/ProdManRS-MMCv1.3.pdf

1.8 Defect and Error Management (p1-3) - Almost the same as CF
1.9 Endurance (p1-4)
"The SanDisk MultiMediaCard and RS-MultiMediaCard have a typical endurance specification for each sector of 100,000 writes (reading a logical sector is unlimited)."

There's MRAM, but I don't think it's available yet...

richie
08-02-2006, 12:10 PM
Hello,

after investigating for hours on how to extend root fs in OS2006 I still don't know how to do it. The http://wolfram.ravenwolf.de/extrootfs_1.0_arm.deb doesn't work on OS2006, but is there a way to still use links pointing on to my 1GB MMC for the installation routine?


You could set up the links manually, look at the scripts inside extrootfs and enter the commands manually. Though I think you would have the same problem as per mmc-unionfs shutting down and umount the MMC card if /home is mounted on the card, see previous page of this thread or http://www.heike-zimmerer.de/software/mmc-unionfs.html

Rich

bradb
08-02-2006, 04:54 PM
Though I think you would have the same problem as per mmc-unionfs shutting down and umount the MMC card if /home is mounted on the card

I don't think that problem applies here.

This method uses /etc/fstab to mount an ext2 filesystem, then at shutdown, if you modify the shutdown/reboot scripts to explicitly umount the filesystem, I'd think it would work.

(I think that's a solution to the unionfs problem, but I could be wrong as well)

Brad.

naparicio
08-06-2006, 01:57 PM
Hello.

As it was noted above, the package extrootfs_1.0_arm.deb doesn't work on OS2006. I have been looking for a working cfdisk for OS2006. I copied the cfdisk in the Maemo 2.0 SDK from http://repository.maemo.org/stable/2.0/armel/Maemo_Dev_Platform_v2.0_armel-rootstrap.tgz and although it runs, I got an illegal instruction when running it:

Nokia770-26:~/bin# ./cfdisk /dev/mmcblk0
Illegal instruction

Any hints of what is happenning or links to a good cfdisk (or fdisk) for the OS2006?. Anybody has been able to partition the card within the Nokia 770 with OS2006?


naparicio

BanditRider
08-07-2006, 07:55 AM
I use qtparted or gparted under linux. You could use a live cd like knoppix to do it.

naparicio
08-07-2006, 11:02 AM
Yes I know how to do it with Linux. My question was about if the tools worked in the Nokia hardware. I couldn't make them work so I opened a bug for the Maemo SDK 2.0 (bug #735) as the binary should work without the "illegal instruction".

mrp
08-11-2006, 01:58 AM
is there more in extrootfs than listed in wiki in maemo org? As Wolfram's deb is not installable in OS2006, could somebody, please mail me the complete script content,

mika joukanen at gmail com,

Mika

Dr. Hood
08-11-2006, 01:36 PM
Isn't this done on the 2006 OS edition by doing the following?

(1) Use stylus to launch the application menu.

(2) Click on Tools --> Control Panel

(3) Click on the Memory icon

A window will appear with 3 tabs

(4) Click on the Virtual memory tab

(5) Click on the box that extends the virtual memory to the MMC card (64 Mb max).

Once step 5 is done, the memory card is reformatted (presummably creating two partitions). It took a while for me and a blue bar went across the screen during the process. Once finished, I had just over 900 Mb of usable space on the MMC card.

Dr. Hood

ascherjim
08-12-2006, 01:19 AM
I have been frustrated for some time because Wolfram's seemingly excellent deb is not usable with OS 2006. I know that I can now partition swap space without it, but I want to be able to do more than that. I want to be able to fully effect the partitioning recommended by Wolfram (moving key elements of the root system to the memory card, and accessing them on the card). In other words (or the same words!) I want to be able to install Wolfram's script (or its equivalant aspects) to my 770 for accessing as part of the repartitioning process. Can anyone out there help me?

richie
08-12-2006, 08:59 AM
I have been frustrated for some time because Wolfram's seemingly excellent deb is not usable with OS 2006. I know that I can now partition swap space without it, but I want to be able to do more than that. I want to be able to fully effect the partitioning recommended by Wolfram (moving key elements of the root system to the memory card, and accessing them on the card). In other words (or the same words!) I want to be able to install Wolfram's script (or its equivalant aspects) to my 770 for accessing as part of the repartitioning process. Can anyone out there help me?

Last I heard mmc-unionfs is being worked on, though the last update was back in July, http://www.heike-zimmerer.de/software/mmc-unionfs.html

This might be more elegant and easier, if the author Heike can get it working.

Rich

ascherjim
08-12-2006, 11:40 AM
Last I heard mmc-unionfs is being worked on, though the last update was back in July, http://www.heike-zimmerer.de/software/mmc-unionfs.html

This might be more elegant and easier, if the author Heike can get it working.

Rich

Rich: Thanks. Will give it a try. Jim

richie
08-12-2006, 01:42 PM
Sorry I've mislead you, its not working yet for IT2006, it did for 2005 OS. I meant that the package is being worked on to make it work with IT2006 and hopefully will be available soon.

ascherjim
08-13-2006, 02:04 AM
Richie: No problem. I'll wait until that method is perfected for the 2006 OS. In the meantime I may have a try at the system described in http://maemo.org/pipermail/maemo-de...ust/005040.html transferring the whole root system to, and accessing from, the memory card. I'll keep my eye on this forum as things develop. Thanks for the assistance. Jim

schmolch
08-16-2006, 10:12 AM
Shouldn't access to the MMC-Card be much slower than to the internal RAM?

ascherjim
08-16-2006, 10:39 AM
Good point. I guess I'll just sit back and watch the forum and wait for the "union" system to be perfected. Thanks again. Jim

Reinhard
08-17-2006, 04:36 AM
I've upgraded to IT2006 and I'm now looking for a way to mount an ext2 filesystem duing boot (and umount it during shutdown).

Things have changed a lot in IT2006 and I'm lost. This works for me:

insmod /mnt/initfs/lib/modules/current/ext2.ko
mount /dev/mmcblk0p2 /media/mmc2

But which startup file should I modify to automate this during the boot sequence?

Reinhard

neiljerram
08-17-2006, 05:32 AM
This works for me:

insmod /mnt/initfs/lib/modules/current/ext2.ko
mount /dev/mmcblk0p2 /media/mmc2

But which startup file should I modify to automate this during the boot sequence?

Reinhard

/etc/init.d/minircS

At least, that makes sense to me, and seems to be working well.

And a question in return: does anyone know if it's safe to mount an ext3 fs as ext2, or why the corresponding insmod for ext3.ko (same as above but with 3 instead of 2) fails? I realize that ext3 is not recommended, but I mistakenly chose ext3 for my MMC partition some time ago and have quite a lot of stuff on it now.

- Neil

BanditRider
08-17-2006, 08:38 AM
I put the insmod near the top of /etc/init.d/minircS just after the PATH= line,
I put the mount near the bottom of that file just before the exit 0.

I unmount (umount) the filesystem in /etc/init.d/minireboot and minishutdown on the same line that mmc1 is unmounted:

echo "Unmounting filesystems... "
umount -r /media/mmc1 /media/mmc2 /mnt/initfs /
swapoff -a
echo "done."

I can reference just the mountpoint because I have a line in /etc/fstab for mmc2:

/dev/mmcblk0p2 /media/mmc2 ext2 rw,noauto 0 0

Neil, copy your stuff off to your hard drive, delete the ext3 partition, create an ext2 partition (and maybe a swap partition) then copy your stuff back.

fanoush
08-17-2006, 09:02 AM
Shouldn't access to the MMC-Card be much slower than to the internal RAM?
In theory, yes. Raw mmc read speed is 1,5MB/s, raw internal flash read speed is 4MB/s (both measured by dd utility). In reality it is hard to notice. Internal flash uses jffs2 filesystem which is compressed. This saves space in flash but takes cpu cycles to decompress and slows things down both for reading and writing. It even feels to me that ext2 on mmc is a bit faster than jffs2 on internal flash. I may get some numbers in future but I know I can hardly tell whether I booted from mmc or internal flash without using df utility to check :-)

fanoush
08-17-2006, 09:43 AM
Hmm, did a bit non-scientific test of filesystem performance for both systems

ext2 on mmc

Nokia770-26:~# time tar >/dev/null cf - /usr
tar: Removing leading '/' from member names
tar: Names longer than 100 chars not supported.
tar: Names longer than 100 chars not supported.
tar: Names longer than 100 chars not supported.
tar: Names longer than 100 chars not supported.
real 1m 23.95s
user 0m 3.23s
sys 0m 12.28s

jffs2 on internal flash

Nokia770-26:~# time tar >/dev/null cf - /usr
tar: Removing leading '/' from member names
tar: Names longer than 100 chars not supported.
tar: Names longer than 100 chars not supported.
tar: Names longer than 100 chars not supported.
tar: Names longer than 100 chars not supported.
real 1m 11.50s
user 0m 3.44s
sys 0m 54.65s

This reads everything under /usr. Looks like jffs2 is a bit faster but look also on sys time. While with mmc sys time is only 12s (i.e the cpu is mostly idle and waits for mmc i/o) with jffs2 it is 54s (out of 71s) so the CPU is mostly maxed out while reading. This means that when you want your nokia to actually do something cpu intensive while reading (xvid playback, any application startup), using MMC is probably better.

fanoush
08-17-2006, 10:23 AM
does anyone know if it's safe to mount an ext3 fs as ext2,

yes

or why the corresponding insmod for ext3.ko (same as above but with 3 instead of 2) fails?
module dependencies, you need ext2.o and jbd.o inserted for ext3.o

schmolch
08-17-2006, 06:51 PM
i got 1m25 internal and 2m33 mmc (fat)

fanoush
08-18-2006, 01:36 AM
well, you can't boot from fat or have exact copy of linux filesystem on fat, what exacly did you measure and how? You also need to be aware of filesystem cache and flush it somehow before each test.

schmolch
08-19-2006, 05:28 PM
well, you can't boot from fat or have exact copy of linux filesystem on fat, what exacly did you measure and how? You also need to be aware of filesystem cache and flush it somehow before each test.

I used fat cause i was too lazy to make a ext2 and backup all my stuff. So i just copied /usr to the mmc and tar'ed it to /dev/null from there. I know thats kinda ugly and maybe i even copied whole dirs that were supposed to be only links on ext2.


Btw... initially i was wondering if the mmc card would not be slower than the internal Memory.
But now i got the impression the internal memory is flash too.
Now we got the opposite case because if both are flash one would have to assume that the mmc-card is faster because its newer (and therefore has higher density and higher speed, not sure if this assumption is correct in that case though).

kcallis
10-20-2006, 01:42 AM
Unfortunately, I am reading the forum with my 770, and I just jumped to the end. If I make the extension to root, if I use the bootroot application, this will allow me to switch between booting of the mmc card, and booting straight from the device?

I doubt that I am going to remove my card, but I want the comfort of knowing that should my mmc card get damaged, I will always be able to fall back to the default layout.

Assuming that the above is true, when I boot off of the default root filesystem, how does the mmc look to the 770? For instance, if I create a directory on the mmc filesystem (lets call it /home/user/ebooks), and later on I decide to boot back into the 770, can is still be able to point the 770 to the mmc card to view my ebooks with no problem?

Like I said, I don't plan not to not book off the mmc, but I like to know my options!

kcallis
10-20-2006, 08:04 PM
I finally decided to expand my root... So I cleard everything off of the mmc card and was all set to go. I downloaded the http://wolfram.ravenwolf.de/extrootfs_1.0_arm.deb, got ready to install it and got a following message:

package architecture (arm) does not match system (armel)

I am running under 2006 with the kernel that supports IP6 and 2GB mmc. So what did I do wrong?

fpp
10-21-2006, 05:16 AM
Nothing. The root extender only exists for the obsolete 2005 OS. It was never ported to the present one.

Milhouse
10-21-2006, 06:31 PM
So what did I do wrong?

You didn't read more of this thread than just the title? ;)

kcallis
10-21-2006, 08:01 PM
You didn't read more of this thread than just the title? ;)

Statement!!! ;)
> Unfortunately, I am reading the forum with my 770, and I just jumped > to the end. If I make the extension to root, if I use the bootroot
> application, this will allow me to switch between booting of the mmc > card, and booting straight from the device?


Of course, it would be nice is there was a 770 version of the site so that it was more easier to read. Nevertheless, with the guidance of one of the user, I was able to successfully boot off the MMC, and now I am a happy camper!!!

Unfortunately, I am reading the forum with my 770, and I just jumped to the end. If I make the extension to root, if I use the bootroot application, this will allow me to switch between booting of the mmc card, and booting straight from the device?

Milhouse
10-22-2006, 09:58 AM
Have you tried setting your forum preference to "PDA Style" (take a look at the style chooser in the very bottom left of this page).

fpp
10-22-2006, 10:47 AM
That's how I browse ITT on my tablet, but the skin certainly could use a whole lot of improvement !...

Lexapro4
02-25-2008, 03:07 PM
Newbie here. I have an N810 and I went to the Wiki site on changing the OS boot to the removable card. I noticed that no one wrote about trying this with the N810. Will bad things happen if I try this?

braveally
03-04-2008, 04:33 AM
Newbie here. I have an N810 and I went to the Wiki site on changing the OS boot to the removable card. I noticed that no one wrote about trying this with the N810. Will bad things happen if I try this?

I have the same question. I just got an 8gb card and I would like to boot up and save stuff there. Is it possible?