Author Topic: Auto Mount a card on startup  (Read 4093 times)

Anonymous

  • Guest
Auto Mount a card on startup
« 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

BlackCardinal

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
    • http://www.gelhaus.net
Auto Mount a card on startup
« Reply #1 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
BlackCardinal : http://www.gelhaus.net : Zaurus page

SL-C1000, Cacko ROM v1.23
Lexar SD 512MB, Kingston CF 512MB
Symbol Spectrum24 CF 802.11b

SL-5500 Sharp ROM v3.10
Lexar SD 256MB
Pocketop keyboard, Nutshell 207 leather case

Anonymous

  • Guest
Auto Mount a card on startup
« Reply #2 on: March 15, 2004, 11:48:02 pm »
Great! I changed it to /dev/mmcda and it works perfect.

Many thanks

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Auto Mount a card on startup
« Reply #3 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
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

catachresis

  • Newbie
  • *
  • Posts: 48
    • View Profile
    • http://
Auto Mount a card on startup
« Reply #4 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!

Stubear

  • Hero Member
  • *****
  • Posts: 1164
    • View Profile
    • http://
Auto Mount a card on startup
« Reply #5 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
SL-C1000, Hand converted to English with Japanese Input
Running X apps via X/Qt
iRiver USB host cable; Diatec P-Cord usb power cable (extendable); Acro's Reel Cable USB (A to A, B, Mini-B,  & Mini-B 8pin); GreenHouse 1Gb PicoDrive+; 2x256Mb Hagiwara SD cards; 128Mb Transcend CF card; 512Mb PQI CF card; AmbiCom WL1100C-CF 11B WLAN card

BlackCardinal

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
    • http://www.gelhaus.net
Auto Mount a card on startup
« Reply #6 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.
BlackCardinal : http://www.gelhaus.net : Zaurus page

SL-C1000, Cacko ROM v1.23
Lexar SD 512MB, Kingston CF 512MB
Symbol Spectrum24 CF 802.11b

SL-5500 Sharp ROM v3.10
Lexar SD 256MB
Pocketop keyboard, Nutshell 207 leather case

Anonymous

  • Guest
Auto Mount a card on startup
« Reply #7 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?

Anonymous

  • Guest
Auto Mount a card on startup
« Reply #8 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

catachresis

  • Newbie
  • *
  • Posts: 48
    • View Profile
    • http://
Auto Mount a card on startup
« Reply #9 on: March 19, 2004, 05:48:15 am »
Thanks Stubear for the excellent, detailed and illuminating response.  Cheers!

jchung

  • Full Member
  • ***
  • Posts: 137
    • View Profile
Auto Mount a card on startup
« Reply #10 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..
C700 w/ Cacko 1.21b | 5500 w/ tkcROM
C760 w/ Cacko 1.21b
Lexar 256MB SD | Viking 1GB CF
Netgear MA701 WiFi | Ambicom WL1100C WiFi
Sharp CE-AG06 Camera | PDAir Leather Case | PDAir 3 in 1 stylus | G2 PDA Screen Protector

jchung

  • Full Member
  • ***
  • Posts: 137
    • View Profile
Auto Mount a card on startup
« Reply #11 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
C700 w/ Cacko 1.21b | 5500 w/ tkcROM
C760 w/ Cacko 1.21b
Lexar 256MB SD | Viking 1GB CF
Netgear MA701 WiFi | Ambicom WL1100C WiFi
Sharp CE-AG06 Camera | PDAir Leather Case | PDAir 3 in 1 stylus | G2 PDA Screen Protector