Author Topic: 512mb Sd (non)automount Using Hentges Rom  (Read 4147 times)

layers

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • http://www.nerdwarfare.com
512mb Sd (non)automount Using Hentges Rom
« on: February 28, 2005, 10:11:25 pm »
i have been using hentges rom with no problems for quite some time now, but i just upgraded my sd card from a 128 to a 512, and reflashed the ROM. my (new) sd card is not detected during the boot, so i halted the opie gui start and mounted from console.. then ran the cardfs install script and everything went well... almost. now everytime i boot the Z i have to go into konsole and manually mount the sd using mount /dev/mmcda1 /media/card ... once i do, all my apps show up and its like there was no prob whatsoever.. can anyone help me with this? even something as basic as how to add a script to the boot process, or after opie starts..  

edit: seems to also unmount when my z goes into standby
« Last Edit: February 28, 2005, 10:13:49 pm by layers »

SL5500
PNY 512mb SD
Lexar 128mb SD
Sandisk 128mb CF
PNY 128mb CF
Linksys WCF11 wifi
OZ 3.5.2 [opie]

CoreDump

  • Hero Member
  • *****
  • Posts: 713
    • View Profile
    • http://www.hentges.net
512mb Sd (non)automount Using Hentges Rom
« Reply #1 on: March 01, 2005, 02:54:51 pm »
At some point the auto-mounter script was updated to finally support
multiple partitions on a SD card.

I need a little bit more info to look into this.

What is the exact command you issue when you manually mount the card?

What is the content of /proc/partitions after a reboot with SD card inserted but not mounted?
What is the output of "dmesg" right aftera  reboot?

Please use paste and copy for all messages!
Webmaster of hentges.net & Embedded Linux Developer.

layers

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • http://www.nerdwarfare.com
512mb Sd (non)automount Using Hentges Rom
« Reply #2 on: March 01, 2005, 11:07:09 pm »
thanks for your time..


At some point the auto-mounter script was updated to finally support
multiple partitions on a SD card.

I need a little bit more info to look into this.

What is the exact command you issue when you manually mount the card?


Code: [Select]
mount /dev/mmcda1 /media/card

What is the content of /proc/partitions after a reboot with SD card inserted but not mounted?

Code: [Select]
major     minor     #blocks     name

     3            0         125184     hda
     3            1         125168     hda1

What is the output of "dmesg" right aftera  reboot?

Code: [Select]
Linux version 2.4.18-rmk7-pxa3-embedix- (mhentges@mhcln01) (gcc version 2.95.3 20010315 (release)) #1 Tue, 14 Dec 2004 18:08:28 +0100
CPU: Intel StrongARM-1110 revision 9
Machine: Sharp-Collie
Security risk: creating user accessible mapping for 0x00000000 at 0xe8000000
Security risk: creating user accessible mapping for 0x08000000 at 0xea000000
Security risk: creating user accessible mapping for 0xc2000000 at 0xf2000000
Security risk: creating user accessible mapping for 0x40000000 at 0xf0000000
On node 0 totalpages: 16384
zone(0): 16384 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: console=tty1 root=/dev/mtdblock4 rootfstype=jffs2 jffs2_orphaned_inodes=delete mem=64M
Relocating machine vectors to 0xffff0000
Console: colour dummy device 80x30
Calibrating delay loop... 137.21 BogoMIPS
Memory: 64MB = 64MB total
Memory: 62328KB available (1688K code, 363K data, 80K init)
Dentry-cache hash table entries: 8192 (order: 4, 65536 bytes)
Inode-cache hash table entries: 4096 (order: 3, 32768 bytes)
Mount-cache hash table entries: 1024 (order: 1, 8192 bytes)
Buffer-cache hash table entries: 4096 (order: 2, 16384 bytes)
Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
GA Chip: L1
UCB1200 generic module installed
RCSR = 1
suspend main adc = 592(592)
fatal chk = 381
full reset !
suspend main adc = 593(593)
fatal chk = 382
apm: BIOS version 1.2 Flags 0x02 (Driver version 1.14)
apm: Current AC Status : 0
batok installed
Starting kswapd
JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB.
comadj = 157,44414d43,44414d43
Console: switching to colour frame buffer device 60x53
Collie frame buffer driver initialized.
keyboard initilaized.
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with no serial options enabled
COLLIE serial driver version 1.3
ttyS0 on SA1100 UART3 (irq 17)
ttyS1 on SA1100 UART1 (irq 15)ttyS2 on SA1100 UART2 (irq 16), using IRDA
touch adj= 18121,24988,-1310720,-2883584
ucb1200 touch screen driver initialized
sharpled_init: done.
SA1100 Real Time Clock driver v1.00
block: 128 slots per queue, batch=32
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
loop: loaded (max 8 devices)
PPP generic driver version 2.4.1
PPP BSD Compression module registered
ide-cs.c 1.26 1999/11/16 02:10:49 (David Hinds)
Collie Sound Driver Installed
TC35143F audio driver initialized
MTD Sharp chip driver
SA1100 flash: probing 32-bit flash bus
Using static partition definition
Creating 6 MTD partitions on "SA1100 flash":
0x00000000-0x00020000 : "Angel Monitor"
0x00020000-0x00040000 : "CF Updater"
0x00040000-0x000c0000 : "Diagnostics"
0x000c0000-0x001c0000 : "kernel"
0x001c0000-0x00fe0000 : "jffs2"
0x00fe0000-0x01000000 : "angel stuff"
Linux Kernel Card Services 3.1.22
  options:  [pm]
SA-1100 PCMCIA (CS release 3.1.22)
sa1100_pcmcia_init(0)
sa1100_pcmcia_init(1)
Frontlight Driver Initialized.
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 4096)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NetWinder Floating Point Emulator V0.95 (c) 1998-1999 Rebel.com
IrCOMM protocol (Dag Brattli)
VFS: Mounted root (jffs2 filesystem) readonly.
Freeing init memory: 80K
klips_info:ipsec_init: KLIPS startup, Openswan KLIPS IPsec stack version: 2.2.0
klips_info:ipsec_alg_init: KLIPS alg v=0.8.1-0 (EALG_MAX=255, AALG_MAX=251)
klips_info:ipsec_alg_init: calling ipsec_alg_static_init()
IPv6 v0.8 for NET4.0
IPv6 over IPv4 tunneling driver
usbdcore: usbdcore 0.1 035 2002-06-12 20:00 (dbg="")
net_fd 0.1 035 2002-06-12 20:00 (dbg="",alwaysup=0,OUT=64,IN=64)
vendorID: 4dd productID: 8004
sa1100_bi 0.2 035 2002-06-12 20:00 (dbg="")
bi_modinit: call udc_startup_events
bi_device_event: call udc_enable
bi_device_event: call udc_all_interrupts
SD Driver Initialized.
sharp_mmcsd 0.21 27 Sep 2002
IrDA: Registered device irda1
hostap_crypt: registered algorithm 'NULL'
hostap_cs: 0.3.7 - 2005-02-12 (Jouni Malinen )
hostap_cs: setting Vcc=33 (constant)
hostap_cs: CS_EVENT_CARD_INSERTION
hostap_cs: ignoring Vcc=33 (from config)
Checking CFTABLE_ENTRY 0x01 (default 0x01)
IO window settings: cfg->io.nwin=1 dflt.io.nwin=1
io->flags = 0x0046, io.base=0x0000, len=64
hostap_cs: Registered netdevice wifi0
hostap_cs: index 0x01: Vcc 3.3, irq 35, io 0xc4850000-0xc485003f
prism2_hw_init: initialized in 220 ms
wifi0: NIC: id=0x800c v1.0.0
wifi0: PRI: id=0x15 v1.0.5
wifi0: STA: id=0x1f v1.3.4
wifi0: defaulting to bogus WDS frame as a workaround for firmware bug in Host AP mode WDS
wifi0: registered netdevice wlan0
hostap_crypt: registered algorithm 'WEP'
wifi0: TXEXC - status=0x0004 ([Discon]) tx_control=000c
   retry_count=0 tx_rate=0 fc=0x4108 (Data::0 ToDS)
   A1=00:00:00:00:00:00 A2=00:06:25:ac:de:0f A3=ff:ff:ff:ff:ff:ff A4=00:00:00:00:00:00
wifi0: LinkStatus=6 (Association failed)
wifi0: LinkStatus: BSSID=44:44:44:44:44:44
wifi0: TXEXC - status=0x0004 ([Discon]) tx_control=000c
   retry_count=0 tx_rate=0 fc=0x4108 (Data::0 ToDS)
   A1=44:44:44:44:44:44 A2=00:06:25:ac:de:0f A3=33:33:ff:ac:de:0f A4=00:00:00:00:00:00
wifi0: LinkStatus=1 (Connected)
wifi0: LinkStatus: BSSID=00:80:c8:b7:f1:de
BlueZ Core ver 2.4 Copyright (C) 2000,2001 Qualcomm Inc
Written 2000,2001 by Maxim Krasnyansky
BlueZ L2CAP ver 2.3 Copyright (C) 2000,2001 Qualcomm Inc
Written 2000,2001 by Maxim Krasnyansky
BlueZ RFCOMM ver 1.1
Copyright (C) 2002 Maxim Krasnyansky
Copyright (C) 2002 Marcel Holtmann
wlan0: no IPv6 routers present

SL5500
PNY 512mb SD
Lexar 128mb SD
Sandisk 128mb CF
PNY 128mb CF
Linksys WCF11 wifi
OZ 3.5.2 [opie]

CoreDump

  • Hero Member
  • *****
  • Posts: 713
    • View Profile
    • http://www.hentges.net
512mb Sd (non)automount Using Hentges Rom
« Reply #3 on: March 03, 2005, 12:58:09 pm »
Quote
thanks for your time..

What is the content of /proc/partitions after a reboot with SD card inserted but not mounted?

Code: [Select]
major     minor     #blocks     name

     3            0         125184     hda
     3            1         125168     hda1

Ah right, there's the problem. Normally /proc/partitions contains all partitions of the SD card if it is inserted. The new auto-mounter parses the file und tries to  mount existing partitions. For whatever reason /proc/partitions is not updated on some models / SD cards.

Looks like i'll need to add a fail-safe auto-mounter for these models / cards.
I'll post a new script later today or tomorrow.

Quote
What is the output of "dmesg" right aftera  reboot?


[...]

[div align=\"right\"][a href=\"index.php?act=findpost&pid=69049\"][{POST_SNAPBACK}][/a][/div]

Again, no entry of the SD card. I wonder what's going on. Maybe it's Just Another Bug of the binary-only Sharp SD driver.
Webmaster of hentges.net & Embedded Linux Developer.

CoreDump

  • Hero Member
  • *****
  • Posts: 713
    • View Profile
    • http://www.hentges.net
512mb Sd (non)automount Using Hentges Rom
« Reply #4 on: March 04, 2005, 06:21:05 am »
Ok, I've attached the new script. Please gunzip and copy it into /etc (so the full path is /etc/sdcontrol).

I would appreciate it if everyone who has problems w/ SD in recent builds (ie: hentges ROMs etc)
would test this new script. A new OZ release is due soon and we really don't want to see this problem in the next official release.


Thanks!
Webmaster of hentges.net & Embedded Linux Developer.

layers

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • http://www.nerdwarfare.com
512mb Sd (non)automount Using Hentges Rom
« Reply #5 on: March 04, 2005, 07:02:12 pm »
Quote
Ok, I've attached the new script. Please gunzip and copy it into /etc (so the full path is /etc/sdcontrol).

I would appreciate it if everyone who has problems w/ SD in recent builds (ie: hentges ROMs etc)
would test this new script. A new OZ release is due soon and we really don't want to see this problem in the next official release.


Thanks!
[div align=\"right\"][a href=\"index.php?act=findpost&pid=69346\"][{POST_SNAPBACK}][/a][/div]

thanks much! i will try it immediately and post results..

edit: do i need to chmod it or anything?

editx2:  well.. in my /mnt folder i now have
card
card1
card2
card3
card4
lol.. but none of them actually has the card mounted...
« Last Edit: March 04, 2005, 07:47:51 pm by layers »

SL5500
PNY 512mb SD
Lexar 128mb SD
Sandisk 128mb CF
PNY 128mb CF
Linksys WCF11 wifi
OZ 3.5.2 [opie]

CoreDump

  • Hero Member
  • *****
  • Posts: 713
    • View Profile
    • http://www.hentges.net
512mb Sd (non)automount Using Hentges Rom
« Reply #6 on: March 05, 2005, 08:32:22 am »
I take it the "mount" command doesn't list mmcdaX mounted at /media/card, right?
Webmaster of hentges.net & Embedded Linux Developer.

layers

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • http://www.nerdwarfare.com
512mb Sd (non)automount Using Hentges Rom
« Reply #7 on: March 05, 2005, 11:36:38 pm »
Quote
I take it the "mount" command doesn't list mmcdaX mounted at /media/card, right?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=69431\"][{POST_SNAPBACK}][/a][/div]
Code: [Select]
/dev/root on / type jffs2 (rw)
proc on /proc type proc (rw)
ramfs on /dev type ramfs (rw)
tmpfs on /var type tmpfs (rw)
devpts on /dev/pts type devpts (rw)

SL5500
PNY 512mb SD
Lexar 128mb SD
Sandisk 128mb CF
PNY 128mb CF
Linksys WCF11 wifi
OZ 3.5.2 [opie]

CoreDump

  • Hero Member
  • *****
  • Posts: 713
    • View Profile
    • http://www.hentges.net
512mb Sd (non)automount Using Hentges Rom
« Reply #8 on: March 06, 2005, 03:08:25 pm »
Here's an updated version which should correct most bugs introduced by the change from /mnt to /media. Please test.
Webmaster of hentges.net & Embedded Linux Developer.

layers

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • http://www.nerdwarfare.com
512mb Sd (non)automount Using Hentges Rom
« Reply #9 on: March 06, 2005, 10:28:57 pm »
Quote
Here's an updated version which should correct most bugs introduced by the change from /mnt to /media. Please test.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=69523\"][{POST_SNAPBACK}][/a][/div]
so... its not an issue with size of the sd card, or manufacturer? rather, its an issue with the mountpoint? i dont follow how that would inhibit the card from being automounted..

SL5500
PNY 512mb SD
Lexar 128mb SD
Sandisk 128mb CF
PNY 128mb CF
Linksys WCF11 wifi
OZ 3.5.2 [opie]

CoreDump

  • Hero Member
  • *****
  • Posts: 713
    • View Profile
    • http://www.hentges.net
512mb Sd (non)automount Using Hentges Rom
« Reply #10 on: March 06, 2005, 10:49:56 pm »
Quote
]
so... its not an issue with size of the sd card, or manufacturer? rather, its an issue with the mountpoint? i dont follow how that would inhibit the card from being automounted..
[div align=\"right\"][a href=\"index.php?act=findpost&pid=69557\"][{POST_SNAPBACK}][/a][/div]

Yes and no. Your problem is that your card doesn't update /proc/partitions like most cards do.
This effectly prevents the new auto-mounter from determining all valid partitions on the card and thus
your card isn't mounted automatically.

This new script offers a fail-safe mode in which it tries to mount /dev/mmcda[1-4] even if /proc partitions is empty. The earlier version I posted suffered some bugs caused by the recent change from /mnt to /media in OZ. They may have prevented the fail-safe mode to work correctly. This latest version should fix all remaining bugs related to /media.

I hope this clears the situation up  

If the card still isn't mounted during a boot, please post all messages from the following commands in this exact order:

/etc/sdcontrol insert (you may want to redirect the output into a textfile)
mount
dmesg | grep -i mmcda
/etc/sdcontrol compeject
mount
Webmaster of hentges.net & Embedded Linux Developer.

layers

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • http://www.nerdwarfare.com
512mb Sd (non)automount Using Hentges Rom
« Reply #11 on: March 06, 2005, 11:14:27 pm »
thanks for taking the time to explain..
since i see you are on this board right now, i will go ahead and check things out, and edit this post in a few minutes with the outcome..

hrmm... well.. the sdcontrol worked.. but not during boot..
Code: [Select]
# /etc/sdcontrol insert

WARNING: Couldn't determine SD mount options from /etc/fstab, using defaults

Beginning SD auto-mount..:


WARNING: Trying failsafe partition mode


-> Valid SD partitions are: [mmcda1 mmcda2 mmcda3 mmcda4]

* * * * * Working on [/dev/mmcda1] * * * * *

-> Using mountpoint [/mnt/card] from fstab
-> Trying VFAT mount [noatime,sync,quiet,umask=000,iocharset=utf8]...
-> Trying ext2 mount [noatime,sync]...
-> EXT2 mount was successfull

* * * * * Working on [/dev/mmcda2] * * * * *

-> Using mountpoint [/media/card1]
-> Trying VFAT mount [noatime,sync,quiet,umask=000,iocharset=utf8]...
-> Trying ext2 mount [noatime,sync]...
-> EXT2 mount was successfull

* * * * * Working on [/dev/mmcda3] * * * * *

-> Using mountpoint [/media/card2]
-> Trying VFAT mount [noatime,sync,quiet,umask=000,iocharset=utf8]...
-> Trying ext2 mount [noatime,sync]...
/dev/mmcda3: Invalid argument
mount: you must specify the filesystem type
-> Trying failsafe mount...
/dev/mmcda3: Invalid argument
mount: you must specify the filesystem type

* * * * * Working on [/dev/mmcda4] * * * * *

-> Using mountpoint [/media/card3]
-> Trying VFAT mount [noatime,sync,quiet,umask=000,iocharset=utf8]...
-> Trying ext2 mount [noatime,sync]...
/dev/mmcda4: Invalid argument
mount: you must specify the filesystem type
-> Trying failsafe mount...
/dev/mmcda4: Invalid argument
mount: you must specify the filesystem type
ln: /home/samba/SD_Card: No such file or directory

mount:
Code: [Select]
# mount
/dev/root on / type jffs2 (rw)
proc on /proc type proc (rw)
ramfs on /dev type ramfs (rw)
tmpfs on /var type tmpfs (rw)
devpts on /dev/pts type devpts (rw)
/dev/mmcda1 on /media/card type ext2 (rw,sync,noatime)
/dev/mmcda2 on /media/card1 type ext2 (rw,sync,noatime)

Dmesg:
Code: [Select]
# dmesg | grep -i mmcda
 mmcda: mmcda1 mmcda2
 mmcda: mmcda1 mmcda2
 mmcda: mmcda1 mmcda2
 mmcda: mmcda1 mmcda2
 mmcda: mmcda1 mmcda2
 mmcda: mmcda1 mmcda2
 mmcda: mmcda1 mmcda2
 mmcda: mmcda1 mmcda2
 mmcda: mmcda1 mmcda2
 mmcda: mmcda1 mmcda2
 mmcda: mmcda1 mmcda2
 mmcda: mmcda1 mmcda2
 mmcda: mmcda1 mmcda2
 mmcda: mmcda1 mmcda2
 mmcda: mmcda1 mmcda2
 mmcda: mmcda1 mmcda2
 mmcda: mmcda1 mmcda2
 mmcda: mmcda1 mmcda2
 mmcda: mmcda1 mmcda2
 mmcda: mmcda1 mmcda2
 mmcda: mmcda1 mmcda2

sdcontrol compeject:
Code: [Select]
# /etc/sdcontrol compeject

WARNING: Couldn't determine SD mount options from /etc/fstab, using defaults

/etc/sdcontrol: 238: fuser: not found
rm: cannot remove `/home/samba/SD_Card': No such file or directory
/etc/sdcontrol: 238: fuser: not found
rm: cannot remove `/home/samba/SD_Card': No such file or directory

mount:
Code: [Select]
# mount
/dev/root on / type jffs2 (rw)
proc on /proc type proc (rw)
ramfs on /dev type ramfs (rw)
tmpfs on /var type tmpfs (rw)
devpts on /dev/pts type devpts (rw)
« Last Edit: March 06, 2005, 11:25:44 pm by layers »

SL5500
PNY 512mb SD
Lexar 128mb SD
Sandisk 128mb CF
PNY 128mb CF
Linksys WCF11 wifi
OZ 3.5.2 [opie]

CoreDump

  • Hero Member
  • *****
  • Posts: 713
    • View Profile
    • http://www.hentges.net
512mb Sd (non)automount Using Hentges Rom
« Reply #12 on: March 08, 2005, 10:02:19 am »
Please try the following:
 
- Reboot your Z
- Check if /media/card is mounted
- /etc/init.d/sd stop
- /etc/init.d/sd start
- Check if the card is now mounted
Webmaster of hentges.net & Embedded Linux Developer.

layers

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • http://www.nerdwarfare.com
512mb Sd (non)automount Using Hentges Rom
« Reply #13 on: March 08, 2005, 09:50:29 pm »
ok well, it is kinda working..
it IS mounting the card at boot, but it is giving alot of output, and its not recognizing the correct partition size..
the partition is 512mb, and this can be seen thru fdisk -l and cfdisk /dev/mmcda
Code: [Select]
~# fdisk -l

Disk /dev/mmcda: 512 MB, 512229376 bytes
9 heads, 8 sectors/track, 13895 cylinders
Units = cylinders of 72 * 512 = 36864 bytes

     Device Boot      Start         End      Blocks   Id  System
/dev/mmcda1               1       13895      500216   83  Linux
Code: [Select]
  cfdisk 2.12

                             Disk Drive: /dev/mmcda
                         Size: 512229376 bytes, 512 MB
               Heads: 9   Sectors per Track: 8   Cylinders: 13895

    Name        Flags      Part Type  FS Type          [Label]        Size (MB)
 ------------------------------------------------------------------------------
    mmcda1                  Primary   Linux ext2                         512.23
but when i type #df , it only tells me that there is 200 something..
Code: [Select]
/dev/mmcda1             236.4M     53.0M    171.2M  24% /media/cardi have attached a copy of the dmesg, so  you can see the output i was talking about..
« Last Edit: March 08, 2005, 09:52:23 pm by layers »

SL5500
PNY 512mb SD
Lexar 128mb SD
Sandisk 128mb CF
PNY 128mb CF
Linksys WCF11 wifi
OZ 3.5.2 [opie]

windom

  • Newbie
  • *
  • Posts: 5
    • View Profile
512mb Sd (non)automount Using Hentges Rom
« Reply #14 on: March 09, 2005, 06:16:13 pm »
I have been having the same problem getting my SD mounted at boot. I have tried the new versions of sdcontrol and I still have a problem. I can get my card mounted by running sdcontrol (with a couple of mods I put in) from the terminal. It seems the problem is that sdmgr isn't calling scontrol. I bet you already came to that conclusion seeing the path this thread has taken.

      windom