[maemo-users] [maemo-users] mounting ext2

From: krischan.keitsch at alumni.tu-berlin.de krischan.keitsch at alumni.tu-berlin.de
Date: Tue Aug 15 00:24:14 EEST 2006
Some more words on this thread ;-)

I understand that a consumer product has to support the consumer de facto 
standard for a mmc which happens to be the vfat file system. So; that is 
Nokias point of view - which is okay – as long as I have the choice to use 
something different than vfat. 

One thing I don't like about vfat is its reliability. I happen to have a 
corrupted file system from time to time and I hate to know that I have no 
tools on board to repair the vfat file system. I miss fsck.vfat. I also 
checked for the package on the debian server and ran 'apt-get install 
dosfstools'. It said it had the newest version already installed. fsck.vfat 
seems to be missing.

On a great Linux device such as the 770 I would rather like to use ext2 
formatted mmc's with the same convenience as the vfat formatted ones. (The 
ext2 filesystem used to be the Linux de facto standard file system -  see 
http://en.wikipedia.org/wiki/Ext2 ;-) )

The 770 does not support ext2 or its successor ext3 by default. However the 
needed kernel modules are there. I will point out some steps so you can use 
ext2 formatted mmc's.

Don't blame me if anything goes wrong! Unless you know what you are doing – 
don't do it! However; If you can't resist: make a complete backup or at least 
a backup from the files we are going to manipulate.

Step 1)
We need to load the ext2 kernel module. As root run:

insmod /mnt/initfs/lib/modules/2.6.16-omap1/ext2.ko

If we want the 770 to load the module during boot up add this line at the top 
of '/etc/init.d/minircS'. 

Step 2)
We don't want to manually mount the mmc when we plug it in. We change the 
following script  instead:'/usr/sbin/mmc-mount' 
mount -t vfat -o 
rw,noauto,nodev,noexec,nosuid,utf8,uid=29999,shortname=mixed "$1" "$2" 
> /dev/null


mount -t ext2 -o rw "$1" "$2" > /dev/null

Step 3)
On your Linux desktop box format a mmc with ext2. Run as 
root 'mkfs.ext2 /dev/sdx1' where x is the appropriate dev. Make sure you set 
the permissions right in order to let the 770 default user access the mmc! 
[Can some Linux guru help me out here for the command line? I used the 
konqueror for this ;-) ]
Insert the mmc and find out if it worked. Check with 'dmesg' and 'mount'.

Step 4) 
This step is optional but recommended. One reason for using ext2, is to have 
the the necessary tools  on the n770 in order to  repair the mmc's file 
system. What we need is called 'fsck.ext2'
As root run:
'apt-get install e2fsprogs'

If your repositories are set up properly (check 
http://maemo.org/maemowiki/ApplicationRepositories ) you will then be able to 
maintain your ext2 formatted mmc.

Was it worth it? In one word: Yes! My 770 penguin feels much better since it 
got its 'default' file system back! And I feel saver leaving my desktop pc 
with the card reader  behind ;-)

Of course you can use ext3 also. I just don't know if there are any benefits 
from this. This solution is not perfect: The 'mmc-mount' script should use 
different commands depending on the file system used. Then using vfat mmc's 
would also work. So far I don't know how to do this ;-( 

Please let me know if it worked for you and give me some feedback!

Regards Krischan

PS:  @Kimmo: Thank you very much for pointing me the direction!

----------  Weitergeleitete Nachricht  ----------

Subject: Re: Fwd: Re: [maemo-users] mounting ext2
Date: Montag, 14. August 2006 11:31
From: Kimmo Hämäläinen <kimmo.hamalainen at nokia.com>
To: keitsch at cs.tu-berlin.de
Cc: maemo-users at maemo.org

On Fri, 2006-08-11 at 21:40, ext maemo-users-bounces at maemo.org wrote:
> Hi Kimmo,
> thanks for sending a reply. I had a look at
> /usr/sbin/mmc-mount
> and changed it from
> mount -t vfat ...
> to
> mount -t auto ...
> It works as usual with vfat formated mmc's ;-)
> However, ext2 formated mmc's are still not accepted. Manual mount works
> (see mail below)
> So, if you have more ideas on this subject - let us know!

Try without the options (after -o), because some of the options might be
FAT-specific. There is no reason why it would not work if it works
manually... You just have to use the same command line in mmc-mount as
you use when manually mounting it.

BR; Kimmo

> Regards Krischan
> ----------  Weitergeleitete Nachricht  ----------
> Subject: Re: [maemo-users] mounting ext2
> Date: Freitag, 11. August 2006 13:52
> From: Kimmo Hämäläinen <kimmo.hamalainen at nokia.com>
> To: keitsch at cs.tu-berlin.de
> Cc: maemo-users at maemo.org
> On Wed, 2006-08-02 at 21:30, ext maemo-users-bounces at maemo.org wrote:
> > Hello
> >
> > I formated a small rs-mmc with ext2 filesystem. I believe that it is much
> > more reliable than vfat which seems to be  a standard filesystem for mmc
> > (even on an linux powered device  -- very strange ;-).
> >
> > After loading the kernel module as root:
> >
> > insmod /mnt/initfs/lib/modules/2.6.16-omap1/ext2.ko
> >
> > and mounting the mmc manually:
> >
> > mount /dev/mmcblk0 /media/mmc1
> >
> > it worked well. However I noticed that the n770 seems to expect vfat
> > formated mmc since it did not show the ext2 formated mmc in the build in
> > filemanager and complained about a corrupt mmc.
> > Question is: How can I convince n770 to also accept ext2 formated mmc as
> > well as vfat including support for swap file? There must be a tweak, eh?
> You might try editing the command line in /usr/sbin/mmc-mount file. It
> currently assumes that the memory card is VFAT-formatted.
> BR, Kimmo
> > Regards Krischan

More information about the maemo-users mailing list