blockhandler.sh looks for "removable" under $DEVPATH, but doesn't find it with Busybox 1.21.1
|Status:||Closed||Start date:||03 Feb 2014|
|Category:||04 - Root File System|
|Severity:||01 - Critical|
This means that mmcblk0p2 is not mounted on boot after the upgrade to Busybox 1.21.1.
RM #271: Fixed blockhandler to work with Busybox 1.21.1 and Buildroot 2013.11.
Change the way blkid is used because it's now Busybox's version instead of Buildroot's (which went away).
Add special handling for mmc card when testing for "removable" fails.
#1 Updated by Hammel over 6 years ago
- % Done changed from 0 to 20
I think the reason for this is that in 1.20.x the ACTION was empty so I have a special case handler for mmc mounting. In 1.21.1 the ACTION is add, which goes through a different part of the script. I'll have to move the mmc special handling into the "add" handler.
#2 Updated by Hammel over 6 years ago
- % Done changed from 20 to 30
There doesn't appear to be an easy way to get blkid back from util-linux (which is what would normally build it) in Buildroot. Fortunately, Busybox 1.21.1 has a version that is not yet enabled. I can enable that and rebuild under Buildroot to see what happens.
Also, I may have fixed the problem with with not finding "removable". I need to test it on 2013.11 but that requires first rebuilding Busybox to get blkid so blockhandler.sh doesn't break on that issue.
#5 Updated by Hammel over 6 years ago
- % Done changed from 50 to 70
Added missing blkid to Busybox. This was originally in Buildroot 2013.02 but was pulled from 2013.11. Adding it into Busybox was easy but you have to specifically ask for filesystem type support.
This fixes finding and mounting mmcblk0p1 by mdev. However, it blockhandler.sh no longer mounts sda1 when the usb stick is inserted. So I still need to fix that.
#6 Updated by Hammel over 6 years ago
- Status changed from In Progress to Closed
- % Done changed from 70 to 100
The mechanism used to find the filesystem type from blkid output was incorrect. It was
ID_FS_TYPE=`blkid $RD| cut -f4 -d" " | sed 's/TYPE=//' | sed 's/"//g'`
But that cut was wrong. It works correctly (at least for current PiBox needs) like this
ID_FS_TYPE=`blkid $RD | sed 's/^.*TYPE=//' | sed 's/"//g'
So now blockhandler.sh works with Buildroot 2013.11 and Busybox 1.21.1 and both mmcblk0p1 and /dev/sda1 mount properly via mdev.