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 | + | |
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 | + | 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 | + | 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 | + | *Back up the file /usr/sbin/osso-mmc-mount.sh |
- | *Use vi or your favourite editor to edit | + | *Use vi or your favourite editor to edit /usr/sbin/osso-mmc-mount.sh |
- | *Make this change (it is line 46 on | + | *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 | + | *Back up the file /usr/sbin/mmc-mount |
- | *Use vi or your favourite editor to edit | + | *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: | ||
- | < | + | <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> |
- | </ | + | |
'''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: | ||
- | < | + | <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. |
- | </ | + | 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. | ||
- | |||
- | |||
- |
Learn more about Contributing to the wiki.