maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Upgrading (https://talk.maemo.org/forumdisplay.php?f=8)
-   -   How to upgrade the internal memory by extending the root filesystem to a memory card (https://talk.maemo.org/showthread.php?t=1165)

aflegg 2006-04-26 08:55

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 2006-05-06 04:41

How can you tell if the swapfile is on or off?

troubleshootr 2006-05-07 01:48

Quote:

Originally Posted by mike9285
How can you tell if the swapfile is on or off?

type "free" in Xterm.

c_legaspi 2006-05-10 04:31

Just giving Wolfram his due credit
 
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 2006-06-14 04:52

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 2006-06-14 09:10

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 2006-06-14 22:18

Quote:

Originally Posted by aflegg
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 2006-06-15 08:12

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 2006-07-08 07:43

get script
 
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 2006-07-09 17:36

Is this it here, extendedroot

Does anyone know how unionfs is coming along for IT2006?

Rich

bradb 2006-07-11 07:49

Do you feel lucky?
 
1 Attachment(s)
Quote:

Originally Posted by richie
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, 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 2006-07-11 11:54

Hi Brad

Quote:

Originally Posted by bradb
Rich-
According to his site, 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 2006-07-11 15:15

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:

Code:

#!/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 2006-07-11 18:29

Quote:

Originally Posted by aflegg
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 2006-07-28 05:23

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 2006-07-28 13:18

Quote:

Originally Posted by ascherjim
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 2006-07-29 02:24

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 2006-07-29 11:00

Hi

Something is using the mmc card, for some background reading have a look here to help understand, http://www.umiacs.umd.edu/~jusub/uni...s/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
Code:

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 2006-07-29 18:55

Quote:

Originally Posted by ascherjim
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 2006-07-30 16:37

Quote:

Originally Posted by ascherjim
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 2006-07-30 17:21

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 2006-07-31 09:03

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/O...RS-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 2006-08-02 16:10

Quote:

Originally Posted by howlcoyote
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 2006-08-02 20:54

Quote:

Originally Posted by richie
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 2006-08-06 17:57

cfdisk in OS2006?
 
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...-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 2006-08-07 11:55

I use qtparted or gparted under linux. You could use a live cd like knoppix to do it.

naparicio 2006-08-07 15:02

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 2006-08-11 05:58

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 2006-08-11 17:36

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 2006-08-12 05:19

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 2006-08-12 12:59

Quote:

Originally Posted by ascherjim
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 2006-08-12 15:40

Quote:

Originally Posted by richie
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 2006-08-12 17:42

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 2006-08-13 06:04

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 2006-08-16 14:12

Shouldn't access to the MMC-Card be much slower than to the internal RAM?

ascherjim 2006-08-16 14:39

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 2006-08-17 08:36

IT2006 - How to mount an ext2 filesystem during boot?
 
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 2006-08-17 09:32

Quote:

Originally Posted by Reinhard
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 2006-08-17 12:38

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:

Code:

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:

Code:

/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 2006-08-17 13:02

Quote:

Originally Posted by schmolch
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 :-)


All times are GMT. The time now is 20:53.

vBulletin® Version 3.8.8