<$BlogRSDURL$>
Davids Jewish Traveler and Hacker
Wednesday, July 14, 2004
 
In trying to figure out ext2 mounting my SD card on the zaurus looks like I have a solution, I will test it tomorrow.
http://openembedded.org/oe_wiki/index.php/SDCardAndWireless

If the link ever dies I will archive his fix for mounting the card.

OpenZaurus doesn't come with fdisk, and YOU DO NOT NEED IT. I blew away two Lexar SD cards and spent an extra $20 to upgrade to a PNY in the end. I left the VFAT filesystem in tact, but instead created a large file, formatted the file ext2 and mounted it as a loopback! THIS is the correct solution for stability. Assuming a new SD card or one with a good VFAT filesystem on it, the following should work and should also leave your card's blocks alone:
(This trick, now obvious to me, was donated by zaurus@undertow.2y.org)
(a) Eject the SD card with the Eject feature, or umount /dev/mmcda1. Remove
the SD card.
(b) Modify the /etc/sdcontrol file and change the mount point to /mnt/sd (c) Mkdir /mnt/sd (d) Update your /etc/fstab to reflect the change (e) Insert the SD card. It should automatically mount on /mnt/sd. Alternatively,
you can use mount /mnt/mmcda1 /mnt/sd.
(f) Create a big file which will become your ext2 filesystem
dd if=/dev/zero of=/mnt/sd/120MBfile bs=1M count=120
(wait a little while until the prompt comes back. Mine took several minutes)
(g) Make a filesystem. mkfs -text2 /mnt/sd/120MBfile
("This is not a block device, proceed anyway? y")
(h) Mount your new filesystem on /mnt/card: mount -o loop /mnt/sd/120MBfile /mnt/card
cd /mnt/card df . Filesystem 1k-blocks Used Available Use% Mounted on /dev/loop0 118997 2586 110267 2% /mnt/card
You will have to modify your startup scripts to automatically mount this. I haven't done this yet myself.
Note that ejecting the card will be a little more difficult, as you can't umount a busy filesystem. If you are running anything that uses /mnt/card, /mnt/sd will inherantly be busy. This shouldn't ever be a problem anyway.
The nice thing about this method is that you can make multiple filesystems by adjusting the size of the file you create. You can then, for example, create a seperate partition to be mounted on /home or /var/data as you wish.
 
Comments: Post a Comment
Traveling and settling as an immigrant kollel family on a shoestring in Israel. Plenty of Sharp Zaurus hacking too. Contact me dj(a)personaltelco.net

ARCHIVES
04/01/2004 - 05/01/2004 / 05/01/2004 - 06/01/2004 / 06/01/2004 - 07/01/2004 / 07/01/2004 - 08/01/2004 / 08/01/2004 - 09/01/2004 / 09/01/2004 - 10/01/2004 / 10/01/2004 - 11/01/2004 / 11/01/2004 - 12/01/2004 / 12/01/2004 - 01/01/2005 / 01/01/2005 - 02/01/2005 / 02/01/2005 - 03/01/2005 / 03/01/2005 - 04/01/2005 / 05/01/2005 - 06/01/2005 / 06/01/2005 - 07/01/2005 / 07/01/2005 - 08/01/2005 / 08/01/2005 - 09/01/2005 / 09/01/2005 - 10/01/2005 / 10/01/2005 - 11/01/2005 / 01/01/2006 - 02/01/2006 / 02/01/2006 - 03/01/2006 / 03/01/2006 - 04/01/2006 / 04/01/2006 - 05/01/2006 / 05/01/2006 - 06/01/2006 / 06/01/2006 - 07/01/2006 / 07/01/2006 - 08/01/2006 / 11/01/2006 - 12/01/2006 / 03/01/2007 - 04/01/2007 / 11/01/2007 - 12/01/2007 / 02/01/2008 - 03/01/2008 /


Powered by Blogger