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)

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


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

vBulletin® Version 3.8.8