OESF Portables Forum

General Forums => General Discussion => Topic started by: Anonymous on March 15, 2004, 11:31:54 pm

Title: Auto Mount a card on startup
Post by: Anonymous on March 15, 2004, 11:31:54 pm
I\'ve got a dodgy Danelec SD card that doesn\'t work properly unless i manually \"mount /dev/mmcda /mnt/card\" from a shell, the problem is when my Z crashes or I reboot, my apps disappear until i mount the card, my question is how can i get the Z to automatically issue a mount on startup? Is it something to do with /etc/ rc files? i\'m not sure.

Running OZ 3.3.6 pre1

Cheers
Title: Auto Mount a card on startup
Post by: BlackCardinal on March 15, 2004, 11:38:37 pm
Check your /etc/fstab file.  The entry in mine which causes my SD card to mount on boot looks like this:

/dev/mmcda1     /mnt/card       auto    noauto,owner    0  0
Title: Auto Mount a card on startup
Post by: Anonymous on March 15, 2004, 11:48:02 pm
Great! I changed it to /dev/mmcda and it works perfect.

Many thanks
Title: Auto Mount a card on startup
Post by: lardman on March 16, 2004, 04:47:59 am
You could always fdisk the card and create a valid partition (which would then be mmcda1).

Simon
Title: Auto Mount a card on startup
Post by: catachresis on March 17, 2004, 07:36:06 am
Sorry if the answer to this is obvious:  Is there a practical superiority for formatting SD cards with either FAT16 or the Linux format (can\'t recall the name)?

Would someone outline the procedure for formatting a flash card with the linux format: can this be performed from a Win system or must it occur within true linux?

Thanks for your help!
Title: Auto Mount a card on startup
Post by: Stubear on March 17, 2004, 10:29:54 am
Quote
Sorry if the answer to this is obvious:  Is there a practical superiority for formatting SD cards with either FAT16 or the Linux format (can\'t recall the name)?

If you are a windows user who wants to use your SD card in windows then you only have one option - fat16. (Actually there are a few applications that allow you to read ext2 formatted drives on windows but they are a bit buggy) Fat16 superiority rests in the fact that you can take the card from your Z put it into a card reader on windows, a digital camera, a mp3 palyer etc and it will work.

However, If you have already thrown off the shackles of MS and are a linux user then ext2 has some pros - ability to create links to files (kinda like shortcuts in windows but much more usefull), better handling of fragmentation, & less wasted space due to filesystem dead space. However it isn\'t compatible with many devices that use SD cards, and there is a problem with possible ext2 corruption if a SD card is removed without being unmounted (ejected). Note this is not just a Z problem its a problem with all drives/machines using ext2.

Quote
Would someone outline the procedure for formatting a flash card with the linux format: can this be performed from a Win system or must it occur within true linux?

Thanks for your help!

It can\'t be done from a windows system, you need to do it from the Z or a linux system.

The command to format a drive to ext2 is
Code: [Select]
mke2fs
Where you replace <device> with the device you want to format. On the C760 the SD card is /dev/mmcda, and there is normally 1 partition /dev/mmcda1, normally you would use mke2fs /dev/mmcda1.

You will need to unmount the SD card before formatting it.

I have seen an application that will format SD/CF cards for you using a GUI - it is called Formatter - sorry I can\'t remember where I saw it.

hope this helps - if you have specific questions, please ask

Stu
Title: Auto Mount a card on startup
Post by: BlackCardinal on March 17, 2004, 12:38:05 pm
I believe ext2 is also required if you want to use the file ownership and permission features of Linux, as well.  Someone please correct me if I am wrong.  But the ability to use symlinks is definitely the best reason to use ext2, at the price of compatibility with other devices, as Stubear says.
Title: Auto Mount a card on startup
Post by: Anonymous on March 19, 2004, 02:37:51 am
Quote
You could always fdisk the card and create a valid partition (which would then be mmcda1).

Simon

How would one go about doing this?
Title: Auto Mount a card on startup
Post by: Anonymous on March 19, 2004, 02:56:20 am
I guess this is my problem

Quote
Command (m for help): p

Disk /dev/mmcda: 125 MB, 125960192 bytes
8 heads, 32 sectors/track, 961 cylinders
Units = cylinders of 256 * 512 = 131072 bytes

     Device Boot    Start       End    Blocks   Id  System
/dev/mmcda1   ?   3039594   7498616 570754815+  72  Unknown
Partition 1 has different physical/logical beginnings (non-Linux?):
     phys=(357, 116, 40) logical=(3039593, 3, 5)
Partition 1 has different physical/logical endings:
     phys=(357, 32, 45) logical=(7498615, 3, 3)
Partition 1 does not end on cylinder boundary.
/dev/mmcda2   ?    658944   8221554 968014120   65  Novell Netware 386
Partition 2 has different physical/logical beginnings (non-Linux?):
     phys=(288, 115, 43) logical=(658943, 3, 19)
Partition 2 has different physical/logical endings:
     phys=(367, 114, 50) logical=(8221553, 6, 2)
Partition 2 does not end on cylinder boundary.
/dev/mmcda3   ?   7304225  14866835 968014096   79  Unknown
Partition 3 has different physical/logical beginnings (non-Linux?):
     phys=(366, 32, 33) logical=(7304224, 3, 26)
Partition 3 has different physical/logical endings:
     phys=(357, 32, 43) logical=(14866834, 4, 25)
Partition 3 does not end on cylinder boundary.
/dev/mmcda4   ?         1  14207916 1818613248    d  Unknown
Partition 4 has different physical/logical beginnings (non-Linux?):
     phys=(372, 97, 50) logical=(0, 0, 1)
Partition 4 has different physical/logical endings:
     phys=(0, 10, 0) logical=(14207915, 7, 32)
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order
Title: Auto Mount a card on startup
Post by: catachresis on March 19, 2004, 05:48:15 am
Thanks Stubear for the excellent, detailed and illuminating response.  Cheers!
Title: Auto Mount a card on startup
Post by: jchung on March 19, 2004, 02:28:43 pm
Quote
I have seen an application that will format SD/CF cards for you using a GUI - it is called Formatter - sorry I can\'t remember where I saw it.
Stu

I remember seeing tkcROM having a Formatter app pre-installed..
Title: Auto Mount a card on startup
Post by: jchung on March 19, 2004, 02:31:44 pm
Quote
Quote
You could always fdisk the card and create a valid partition (which would then be mmcda1).

Simon

How would one go about doing this?

 located in Unofficial Zaurus FAQ:

http://www.zaurususergroup.com/modules.php...20for%20newbies (http://www.zaurususergroup.com/modules.php?op=modload&name=phpWiki&file=index&pagename=Step-by-step%20CF%2FSD%20fdisk%2Fformatting%20for%20newbies)