Bug#735169: os-prober cannot work with the latest upstream blkid (util-linux-2.24)
Package: os-prober
Version: 1.63
Severity: wishlist
Tags: upstream
Dear Maintainer,
The new blkid in util-linux-2.24 is able to recognize the extend
partition, but os-prober relies on the return value "2" (exit_not_found)
of blkid to skip processing the extend partition.
Then, with the new version of util-linux, os-prober will try
to mount the extend partition with FS types found in the system,
which is dangerous.
e.g.,
# fdisk -l
....
Device Boot Start End Blocks Id System
/dev/sda1 * 63 252847034 126423486 7 HPFS/NTFS/exFAT
/dev/sda2 252847035 625137344 186145155 5 Extended
/dev/sda5 252847098 253425374 289138+ 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 the old blkid (util-linux-2.20),
os-prober will just skip here when handling /dev/sda2,
but with the new 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.
This is not a problem now because util-linux-2.20 is currently
used, but when someday util-linux-2.24 is introduced in,
this would be a serious problem.
-- System Information:
Debian Release: jessie/sid
APT prefers testing-updates
APT policy: (500, 'testing-updates'), (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 3.12-1-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages os-prober depends on:
ii libc6 2.17-97
os-prober recommends no packages.
os-prober suggests no packages.
-- no debconf information
Reply to: