Editing Ext2 on microSD card

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 8: Line 8:
===Format the cart into ext2===
===Format the cart into ext2===
-
 
+
Everything have to be performed as root!
-
Everything have to be performed [[root access|as root]]!
+
First make sure that you have e2fsprogs package installed
First make sure that you have e2fsprogs package installed
  apt-get install e2fsprogs
  apt-get install e2fsprogs
-
Check your MicroSD card's device name (I think it have to be the same on all N900's, but it is worth to recheck which device you are going to format anyway)
+
Check your MicroSD card's device name (I think it have to be the same on all n900's, but it is worth to recheck which device you are going to format anyway)
  mount | grep /media/mmc1
  mount | grep /media/mmc1
The output have to contain something like that:
The output have to contain something like that:
  /dev/mmcblk1p1 on /media/mmc1
  /dev/mmcblk1p1 on /media/mmc1
-
here <code>/dev/mmcblk1p1</code> is the MicroSD's card device name.
+
here ''/dev/mmcblk1p1'' is the MicroSD's card device name.
Then unmount your MicroSD card:
Then unmount your MicroSD card:
  umount /media/mmc1/
  umount /media/mmc1/
Line 32: Line 31:
===Make the card to be automounted by system===
===Make the card to be automounted by system===
-
 
As described here [http://forums.internettablettalk.com/showpost.php?p=510591&postcount=16] and here [http://forums.internettablettalk.com/showpost.php?p=510591&postcount=16] you have to do the following:
As described here [http://forums.internettablettalk.com/showpost.php?p=510591&postcount=16] and here [http://forums.internettablettalk.com/showpost.php?p=510591&postcount=16] you have to do the following:
*Become root
*Become root
-
*Back up the file <code>/usr/sbin/osso-mmc-mount.sh</code>
+
*Back up the file /usr/sbin/osso-mmc-mount.sh
-
*Use vi or your favourite editor to edit <code>/usr/sbin/osso-mmc-mount.sh</code>
+
*Use vi or your favourite editor to edit /usr/sbin/osso-mmc-mount.sh
-
*Make this change (it is line 46 on [[Maemo 5/PR1.1|PR1.1]] and [[Maemo 5/PR1.2|PR1.2]])
+
*Make this change (it is line 46 on PR1.1 and PR1.2)
Old:
Old:
  b | c | e | 4 | 6 | 14 | 16 | 1b | 1c | 1e)
  b | c | e | 4 | 6 | 14 | 16 | 1b | 1c | 1e)
Line 43: Line 41:
  b | c | e | 4 | 6 | 14 | 16 | 1b | 1c | 1e | 83)
  b | c | e | 4 | 6 | 14 | 16 | 1b | 1c | 1e | 83)
*Save the file
*Save the file
-
*Back up the file <code>/usr/sbin/mmc-mount</code>
+
*Back up the file /usr/sbin/mmc-mount
-
*Use vi or your favourite editor to edit <code>/usr/sbin/mmc-mount</code>
+
*Use vi or your favourite editor to edit /usr/sbin/mmc-mount
*Make the file to contain the following:
*Make the file to contain the following:
-
<source lang="bash">#!/bin/sh
+
<pre>#!/bin/sh
-
mount -t vfat -o $3,noauto,nodev,noexec,nosuid,noatime,nodiratime,utf8,uid=29999,shortname=mixed,dmask=000,fmask=0133,rodir "$1" "$2" > /dev/null || mount -t ext2 -o $3,noauto,noatime,nodiratime "$1" "$2" > /dev/null
+
mount -t vfat -o $3,noauto,nodev,noexec,nosuid,noatime,nodiratime,utf8,uid=29999,shortname=mixed,dmask=000,fmask=0133,rodir "$1" "$2" > /dev/null || mount -t ext2 -o $3,noauto,noatime,nodiratime "$1" "$2" > /dev/null </pre>
-
</source>
+
'''NOTE''' Patola [http://forums.internettablettalk.com/showpost.php?p=574704&postcount=17] originally suggested to modify the file that way:
'''NOTE''' Patola [http://forums.internettablettalk.com/showpost.php?p=574704&postcount=17] originally suggested to modify the file that way:
-
<source lang="bash">
+
<pre>#!/bin/sh
-
#!/bin/sh
+
mount -t vfat -o $3,noauto,nodev,noexec,nosuid,noatime,nodiratime,utf8,uid=29999,shortname=mixed,dmask=000,fmask=0133,rodir "$1" "$2" > /dev/null || mount -o $3,noauto,noatime,nodiratime "$1" "$2" > /dev/null </pre>
-
mount -t vfat -o $3,noauto,nodev,noexec,nosuid,noatime,nodiratime,utf8,uid=29999,shortname=mixed,dmask=000,fmask=0133,rodir "$1" "$2" > /dev/null || mount -o $3,noauto,noatime,nodiratime "$1" "$2" > /dev/null
+
This way, if mmc-mount is unable to mount it as a vfat card, with all the options, it tries to mount the card with the filesystem type autodetected.
-
</source>
+
But I've mentioned that it does not work if you don't have loaded kernel module of the file system you are going to use. So if you want to use that approach you have to take care that you have ext2's kernel module loaded before the execution of that script.
-
This way, if mmc-mount is unable to mount it as a vfat card, with all the options, it tries to mount the card with the filesystem type autodetected. But I've mentioned that it does not work if you don't have loaded kernel module of the file system you are going to use. So if you want to use that approach you have to take care that you have ext2's kernel module loaded before the execution of that script.
+
Save the file and reboot, now the card have to be mounted automatically in all cases.
Save the file and reboot, now the card have to be mounted automatically in all cases.
-
 
-
[[Category:Power users]]
 
-
[[Category:N900]]
 

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)

Templates used on this page: