[arch-general] "os-prober" failed to work with "blkid" (util-linux 2.24-2)

2014-01-09 Thread Ken CC
Hi,

It is because the new blkid can now recognize the extened partion,
but os-prober relies on the return value "2" (exit_not_found) of blkid
to skip processing the extended partition.


# fdisk -l
...
DeviceBoot Start   EndBlocks  Id System
/dev/sda1 *   63 252847034 126423486   7 HPFS/NTFS/exFAT
/dev/sda2  252847035 625137344 186145155   5 Extended
/dev/sda5  252847098 253425374289138+ 83 Linux
/dev/sda6  385254828 482913899  48829536  83 Linux
...


blkid 2.24-2
---
# blkid /dev/sda2
/dev/sda2: PTTYPE="dos" PARTUUID="28b48ca1-02"
# echo $?
0

# blkid -o value -s TYPE /dev/sda2  # no output
# echo $?
0


blkid 2.20.0
---
# blkid /dev/sda2  # no output
# echo $?
2
# blkid -o value -s TYPE /dev/sda2  # no output
# echo $?
2


Affected os-prober code:
---
File: /usr/lib/os-probes/50mounted-tests
-
8   types="$(fs_type "$partition")" || types=NOT-DETECTED
9   if [ "$types" = NOT-DETECTED ]; then
10  debug "$1 type not recognised; skipping"
11  exit 0


With old blkid,
os-prober will just skip here when handling /dev/sda2,
but with the current version of blkid,
os-prober will go on and try to mount /dev/sda2 with
FS types found in the system, which causes lots of errors,
even kernel calltrace when trying xfs, on my machine.



I think there are three ways to sovlve this:

1. change the way that os-prober detects devices.
2. make blkid return an error code when 
# blkid -o value -s TYPE /dev/sdaX
returns no proper result.
3. use the old version of blkid (util-linux).

What do you guys think?


-ken


Re: [arch-general] Thank you

2014-01-09 Thread Gesh hseG
Many thanks to the Arch Linux community for creating what is,
in my opinion at least, the most beautiful, simple and usable distribution
in existence. Having had to deal with Debian over the past week,
I've continually hungered for the sweet simplicity Arch offers.
Thank you for keeping the system clean, for easing the lives of systems
administrators everywhere by keeping out of their way, and for teaching
newbies how Linux works by leaving its guts visible.

May you retroactively have had a happy solstice,
Gesh