Help - Search - Members - Calendar
Full Version: Sd Card Mount Problem + Workaround
OESF Forums > Distros, Development, and Model Specific Forums > Everything Development > OpenZaurus/Opie/Qtopia
ironstorm
I just did a build of OZ the other night:
Linux collie 2.4.18-rmk7-pxa3-embedix #1 Tue, 14 Jun 2005 03:05:30 +0000 armv4l unknown

And when I do a cat /proc/partitions I get:
QUOTE
major minor  #blocks  name

  60    0    999424 mmcda
  60    1    999392 mmcda1
  60    0    999424 mmcda
  60    1    999392 mmcda1
  60    0    999424 mmcda
.....

Into infinity... this is a kernel bug...

I'm not a kernel developer so I hacked a fix into the /etc/sdcontrol script instead....

At line 104 of /etc/sdcontrol edit as follows:
CODE
       # Read available partitions from /proc/partitions.
       PROC_PARTITIONS=`cat /proc/partitions | head -$(expr $(cat /proc/partitions | head -10 | grep -n " 0 " | head -2 | tail -1 |  cut -d: -f1) - 1)`
       # OK_PARTS="`cat /proc/partitions |awk '{print $4}'| grep mmcd`"
       OK_PARTS="`echo $PROC_PARTITIONS |awk '{print $4}'| grep mmcd`"

       echo $PROC_PARTITIONS |awk '{print $4}'| grep mmcd > "$LOGFILE-part"


Cheers,

-G
Hrw
Do you know that posting bugfixes to forum does not gwarant that it will be in next OZ releases? We have bugtracker for distro bugs.
ironstorm
QUOTE(Hrw @ Jun 16 2005, 12:14 AM)
Do you know that posting bugfixes to forum does not gwarant that it will be in next OZ releases? We have bugtracker for distro bugs.
*


Yes, however this bugfix should not be in the next OZ release... It's not the right level to be addressing the problem as there are other areas of the distro that may depend on the kernel's behaviour being non-buggy.
CoreDump
Work-around applied with modifications:

CODE
    OK_PARTS=` head -20 /proc/partitions |grep mmcda | sort| uniq | awk '{print $4}'`
 
    echo $OK_PARTS > "$LOGFILE-part"


Thanks!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.