os-prober bug resulting in possible FS corruption

Bug #1579609 reported by Yung Shen on 2016-05-09
58
This bug affects 8 people
Affects Status Importance Assigned to Milestone
os-prober (Ubuntu)
Medium
Eric Desrochers
Xenial
Critical
Eric Desrochers

Bug Description

[Impact]

This bug generate some warnings in system log and in some cases it also might cause FS corruption as seen with a user using MySQL for his Openstack env.

[Test Case]

As of today, there is 3 reported way to reproduce the problem so far :

#1

Reboot system
$ sudo update-grub
then check the log again:
$ journalctl -p err -b -k --no-pager

#2
Placing a VM under IO load (basically just ran dd if=/dev/vda of=/dev/null) and then ran update-grub on the hypervisor host.

#3
Simply run: os-prober, on an hypervisor some VM with LVM storage backend.

[Regression Potential]

none expected
A test package has been tested by several users experiencing the issue, and positives feedbacks has been provided in all cases.

[Other Info]

Workaround:
- Disable os-prober
- Uninstall os-prober

Debian bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=788062
(Merged 648208 788062 806273 810121)

Debian Patch:
https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=806273;filename=v2-0001-use-grub-mount-as-the-sole-source-of-partition-pr.patch;msg=30

[Original Description]

According to this it should be fixed https://bugs.launchpad.net/ubuntu/+source/os-prober/+bug/1374759/comments/32

But on my system I intended to install on /dev/sdb1 and noticed these warning message in my system log.

Steps to reproduce:

1. reboot system
2. $ sudo update-grub
then check the log again:
$ journalctl -p err -b -k --no-pager

-- Logs begin at Sun 2016-05-08 10:47:49 CST, end at Mon 2016-05-09 11:42:04 CST. --
May 08 10:47:50 X230 kernel: [drm:intel_set_pch_fifo_underrun_reporting [i915]] *ERROR* uncleared pch fifo underrun on pch transcoder A
May 08 10:47:50 X230 kernel: [drm:intel_pch_fifo_underrun_irq_handler [i915]] *ERROR* PCH transcoder A FIFO underrun
May 08 10:55:34 X230 kernel: EXT4-fs (sdb1): VFS: Can't find ext4 filesystem
May 08 10:55:34 X230 kernel: EXT4-fs (sdb1): VFS: Can't find ext4 filesystem
May 08 10:55:34 X230 kernel: EXT4-fs (sdb1): VFS: Can't find ext4 filesystem
May 08 10:55:34 X230 kernel: FAT-fs (sdb1): invalid media value (0x7d)
May 08 10:55:34 X230 kernel: squashfs: SQUASHFS error: Can't find a SQUASHFS superblock on sdb1
May 08 10:55:34 X230 kernel: FAT-fs (sdb1): invalid media value (0x7d)
May 08 10:55:34 X230 kernel: qnx4: no qnx4 filesystem (no root dir).
May 08 10:55:34 X230 kernel: ufs: You didn't specify the type of your ufs filesystem

                             mount -t ufs -o ufstype=sun|sunx86|44bsd|ufs2|5xbsd|old|hp|nextstep|nextstep-cd|openstep ...

                             >>>WARNING<<< Wrong ufstype may corrupt your filesystem, default is ufstype=old
May 08 10:55:34 X230 kernel: ufs: ufs_fill_super(): bad magic number
May 08 10:55:34 X230 kernel: EXT4-fs (sdb4): VFS: Can't find ext4 filesystem
May 08 10:55:34 X230 kernel: EXT4-fs (sdb4): VFS: Can't find ext4 filesystem
May 08 10:55:34 X230 kernel: EXT4-fs (sdb4): VFS: Can't find ext4 filesystem
May 08 10:55:34 X230 kernel: FAT-fs (sdb4): bogus number of reserved sectors
May 08 10:55:34 X230 kernel: squashfs: SQUASHFS error: Can't find a SQUASHFS superblock on sdb4
May 08 10:55:34 X230 kernel: FAT-fs (sdb4): bogus number of reserved sectors
May 08 10:55:34 X230 kernel: qnx4: no qnx4 filesystem (no root dir).
May 08 10:55:34 X230 kernel: ufs: You didn't specify the type of your ufs filesystem

                             mount -t ufs -o ufstype=sun|sunx86|44bsd|ufs2|5xbsd|old|hp|nextstep|nextstep-cd|openstep ...

                             >>>WARNING<<< Wrong ufstype may corrupt your filesystem, default is ufstype=old
May 08 10:55:34 X230 kernel: ufs: ufs_fill_super(): bad magic number
May 08 10:55:52 X230 kernel: EXT4-fs (sdb1): VFS: Can't find ext4 filesystem
May 08 10:55:52 X230 kernel: EXT4-fs (sdb1): VFS: Can't find ext4 filesystem
May 08 10:55:52 X230 kernel: EXT4-fs (sdb1): VFS: Can't find ext4 filesystem
May 08 10:55:52 X230 kernel: FAT-fs (sdb1): invalid media value (0x7d)
May 08 10:55:52 X230 kernel: squashfs: SQUASHFS error: Can't find a SQUASHFS superblock on sdb1
May 08 10:55:52 X230 kernel: FAT-fs (sdb1): invalid media value (0x7d)
May 08 10:55:52 X230 kernel: qnx4: no qnx4 filesystem (no root dir).
May 08 10:55:52 X230 kernel: ufs: You didn't specify the type of your ufs filesystem

                             mount -t ufs -o ufstype=sun|sunx86|44bsd|ufs2|5xbsd|old|hp|nextstep|nextstep-cd|openstep ...

                             >>>WARNING<<< Wrong ufstype may corrupt your filesystem, default is ufstype=old
May 08 10:55:52 X230 kernel: ufs: ufs_fill_super(): bad magic number
May 08 10:55:52 X230 kernel: EXT4-fs (sdb4): VFS: Can't find ext4 filesystem
May 08 10:55:52 X230 kernel: EXT4-fs (sdb4): VFS: Can't find ext4 filesystem
May 08 10:55:52 X230 kernel: EXT4-fs (sdb4): VFS: Can't find ext4 filesystem
May 08 10:55:52 X230 kernel: FAT-fs (sdb4): bogus number of reserved sectors
May 08 10:55:52 X230 kernel: squashfs: SQUASHFS error: Can't find a SQUASHFS superblock on sdb4
May 08 10:55:52 X230 kernel: FAT-fs (sdb4): bogus number of reserved sectors
May 08 10:55:52 X230 kernel: qnx4: no qnx4 filesystem (no root dir).
May 08 10:55:52 X230 kernel: ufs: You didn't specify the type of your ufs filesystem

                             mount -t ufs -o ufstype=sun|sunx86|44bsd|ufs2|5xbsd|old|hp|nextstep|nextstep-cd|openstep ...

                             >>>WARNING<<< Wrong ufstype may corrupt your filesystem, default is ufstype=old
May 08 10:55:52 X230 kernel: ufs: ufs_fill_super(): bad magic number
May 08 10:55:59 X230 kernel: EXT4-fs (sdb1): VFS: Can't find ext4 filesystem
May 08 10:55:59 X230 kernel: EXT4-fs (sdb1): VFS: Can't find ext4 filesystem
May 08 10:55:59 X230 kernel: EXT4-fs (sdb1): VFS: Can't find ext4 filesystem
May 08 10:55:59 X230 kernel: FAT-fs (sdb1): invalid media value (0x7d)
May 08 10:55:59 X230 kernel: squashfs: SQUASHFS error: Can't find a SQUASHFS superblock on sdb1
May 08 10:55:59 X230 kernel: FAT-fs (sdb1): invalid media value (0x7d)
May 08 10:55:59 X230 kernel: qnx4: no qnx4 filesystem (no root dir).
May 08 10:55:59 X230 kernel: ufs: You didn't specify the type of your ufs filesystem

                             mount -t ufs -o ufstype=sun|sunx86|44bsd|ufs2|5xbsd|old|hp|nextstep|nextstep-cd|openstep ...

                             >>>WARNING<<< Wrong ufstype may corrupt your filesystem, default is ufstype=old
May 08 10:55:59 X230 kernel: ufs: ufs_fill_super(): bad magic number
May 08 10:55:59 X230 kernel: EXT4-fs (sdb4): VFS: Can't find ext4 filesystem
May 08 10:55:59 X230 kernel: EXT4-fs (sdb4): VFS: Can't find ext4 filesystem
May 08 10:55:59 X230 kernel: EXT4-fs (sdb4): VFS: Can't find ext4 filesystem
May 08 10:55:59 X230 kernel: FAT-fs (sdb4): bogus number of reserved sectors
May 08 10:55:59 X230 kernel: squashfs: SQUASHFS error: Can't find a SQUASHFS superblock on sdb4
May 08 10:55:59 X230 kernel: FAT-fs (sdb4): bogus number of reserved sectors
May 08 10:55:59 X230 kernel: qnx4: no qnx4 filesystem (no root dir).
May 08 10:55:59 X230 kernel: ufs: You didn't specify the type of your ufs filesystem

                             mount -t ufs -o ufstype=sun|sunx86|44bsd|ufs2|5xbsd|old|hp|nextstep|nextstep-cd|openstep ...

                             >>>WARNING<<< Wrong ufstype may corrupt your filesystem, default is ufstype=old
May 08 10:55:59 X230 kernel: ufs: ufs_fill_super(): bad magic number
May 08 21:16:00 X230 kernel: ACPI: \_SB_.PCI0.LPC_.EC__.BAT1: Unable to dock!

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: os-prober 1.70ubuntu3
ProcVersionSignature: Ubuntu 4.4.0-21.37-generic 4.4.6
Uname: Linux 4.4.0-21-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
CurrentDesktop: Unity
Date: Mon May 9 11:42:57 2016
Dependencies:
 gcc-6-base 6.0.1-0ubuntu1
 libc6 2.23-0ubuntu3
 libgcc1 1:6.0.1-0ubuntu1
InstallationDate: Installed on 2016-05-03 (5 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
SourcePackage: os-prober
UpgradeStatus: No upgrade log present (probably fresh install)

Yung Shen (kaxing) wrote :
description: updated
description: updated
Yung Shen (kaxing) on 2016-05-09
description: updated
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in os-prober (Ubuntu):
status: New → Confirmed
tags: added: yakkety
Changed in os-prober (Ubuntu):
importance: Undecided → High
importance: High → Critical
Eric Desrochers (slashd) wrote :

According to debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=788062

A few bugs has been merged together as follow :
Merged 648208 788062 806273 810121 Request was from Emmanuel Kasper <email address hidden> to <email address hidden>. (Fri, 18 Nov 2016 14:18:04 GMT) Full text and rfc822 format available.

And a patch has been submit mid-november 2016:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=806273#30

Eric

Changed in os-prober (Ubuntu):
assignee: nobody → Eric Desrochers (slashd)
Eric Desrochers (slashd) on 2016-12-01
Changed in os-prober (Ubuntu):
status: Confirmed → In Progress
Eric Desrochers (slashd) wrote :

Workaround
==========

Option #1:
# apt-get purge os-prober

Option #2 :
echo 'GRUB_DISABLE_OS_PROBER=true' >> /etc/default/grub

Eric Desrochers (slashd) wrote :

I'm looking for someone experiencing the issue to test this "TEST" package :

[os-prober - 1.70ubuntu3+hf20161201lp1579609]

# sudo add-apt-repository ppa:slashd/lp1579609
# sudo apt-get update
# sudo apt-get install os-prober -y

Eric Desrochers (slashd) on 2016-12-02
summary: - [Xenial] >>>WARNING<<< Wrong ufstype may corrupt your filesystem,
- default is ufstype=old
+ os-prober bug resulting in possible FS corruption
Bryn Hughes (linux-nashira) wrote :

This bug can be particularly brutal on systems with a large amount of storage. I am running a storage server with 24 drives in ZFS pools. Every single one of those drives generates many messages; there's 19 lines per drive so in my case, 456 lines of filesystem errors in my dmesg every time os-prober is triggered. This is really excessive!

[718229.072210] EXT4-fs (sdy9): VFS: Can't find ext4 filesystem
[718229.079832] EXT4-fs (sdy9): VFS: Can't find ext4 filesystem
[718229.087112] EXT4-fs (sdy9): VFS: Can't find ext4 filesystem
[718229.094677] squashfs: SQUASHFS error: Can't find a SQUASHFS superblock on sdy9
[718229.102045] FAT-fs (sdy9): bogus number of reserved sectors
[718229.105299] FAT-fs (sdy9): Can't find a valid FAT filesystem
[718229.119139] XFS (sdy9): Invalid superblock magic number
[718229.125407] FAT-fs (sdy9): bogus number of reserved sectors
[718229.127797] FAT-fs (sdy9): Can't find a valid FAT filesystem
[718229.136511] VFS: Can't find a Minix filesystem V1 | V2 | V3 on device sdy9.
[718229.138940] hfsplus: unable to find HFS+ superblock
[718229.142165] qnx4: no qnx4 filesystem (no root dir).
[718229.148684] ufs: You didn't specify the type of your ufs filesystem

                mount -t ufs -o ufstype=sun|sunx86|44bsd|ufs2|5xbsd|old|hp|nextstep|nextstep-cd|openstep ...

                >>>WARNING<<< Wrong ufstype may corrupt your filesystem, default is ufstype=old
[718229.164301] ufs: ufs_fill_super(): bad magic number
[718229.172406] hfs: can't find a HFS filesystem on dev sdy9

Bryn Hughes (linux-nashira) wrote :

Worth mentioning in my particular case (#7 above), the /dev/sd[a-z]9 partition has its type set to "Solaris reserved 1" so it should not even be probed really. Appears os-prober isn't actually looking at the partition type flags, or at least isn't blacklisting flags that shouldn't be probed.

# fdisk -l /dev/sdy
Disk /dev/sdy: 2.7 TiB, 3000592982016 bytes, 5860533168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 03FE731F-E79A-A243-B9B3-AD9F480A5494

Device Start End Sectors Size Type
/dev/sdy1 2048 5860515839 5860513792 2.7T Solaris /usr & Apple ZFS
/dev/sdy9 5860515840 5860532223 16384 8M Solaris reserved 1

Eric Desrochers (slashd) wrote :

Hi Bryn Hughes (linux-nashira),

Would you be amenable to test the os-prober "test package" I built ?

Instruction can be found in comment #6
https://bugs.launchpad.net/ubuntu/+source/os-prober/+bug/1579609/comments/6

Thanks

Eric Desrochers (slashd) on 2016-12-05
Changed in os-prober (Ubuntu Xenial):
assignee: nobody → Eric Desrochers (slashd)
importance: Undecided → Critical
status: New → In Progress
Yung Shen (kaxing) wrote :

@slashd

I verified the package in comment #6
https://bugs.launchpad.net/ubuntu/+source/os-prober/+bug/1579609/comments/6

There is no more error message showing up.

Eric Desrochers (slashd) wrote :

It also been brought to my attention the following feedbacks:

"I installed the update on one of our lab hypervisors and it seems to do the trick; I get these entries below in the hypervisor syslog but no I/O errors on the guest."

os-prober: debug: running /usr/lib/os-probes/mounted/05efi on mounted
05efi: debug: Not on UEFI platform
os-prober: debug: running /usr/lib/os-probes/mounted/10freedos on mounted
10freedos: debug: [DISK] is not a
os-prober: debug: running /usr/lib/os-probes/mounted/10qnx on mounted
10qnx: debug: [DISK] is not a
os-prober: debug: running /usr/lib/os-probes/mounted/20macosx on mounted
macosx-prober: debug: [DISK] is not an
os-prober: debug: running /usr/lib/os-probes/mounted/20microsoft on mounted
20microsoft: debug: [DISK] is not a
os-prober: debug: running /usr/lib/os-probes/mounted/30utility on mounted
30utility: debug: [DISK] is not a
os-prober: debug: running /usr/lib/os-probes/mounted/40lsb on mounted
os-prober: debug: running /usr/lib/os-probes/mounted/70hurd on mounted
os-prober: debug: running /usr/lib/os-probes/mounted/80minix on mounted
os-prober: debug: running /usr/lib/os-probes/mounted/83haiku on mounted
83haiku: debug: [DISK] is not a
os-prober: debug: running /usr/lib/os-probes/mounted/90linux-distro on mounted
os-prober: debug: running /usr/lib/os-probes/mounted/90solaris on mounted
os-prober: debug: running /usr/lib/os-probes/50mounted-tests on [DISK]
os-prober: debug: running /usr/lib/os-probes/50mounted-tests on [DISK]
os-prober: debug: [DISK]: DOS extended partition;
os-prober: debug: running /usr/lib/os-probes/50mounted-tests on [DISK]
os-prober: debug: running /usr/lib/os-probes/50mounted-tests on [DISK]
os-prober: debug: running /usr/lib/os-probes/50mounted-tests on [DISK]
os-prober: debug: running /usr/lib/os-probes/50mounted-tests on [DISK]
os-prober: debug: running /usr/lib/os-probes/50mounted-tests on [DISK]
os-prober: debug: running /usr/lib/os-probes/50mounted-tests on [DISK]
os-prober: debug: running /usr/lib/os-probes/50mounted-tests on [DISK]
os-prober: debug: running /usr/lib/os-probes/50mounted-tests on [DISK]
os-prober: debug: running /usr/lib/os-probes/50mounted-tests on [DISK]
os-prober: debug: running /usr/lib/os-probes/50mounted-tests on [DISK]
os-prober: debug: running /usr/lib/os-probes/50mounted-tests on [DISK]

Eric Desrochers (slashd) on 2016-12-06
description: updated
description: updated
Eric Desrochers (slashd) on 2016-12-06
description: updated
Eric Desrochers (slashd) on 2016-12-06
Changed in os-prober (Ubuntu):
importance: Critical → Medium
Eric Desrochers (slashd) wrote :

Debdiff for Xenial

tags: added: sts sts-sponsor sts-sru
Eric Desrochers (slashd) wrote :

Debdiff for Zesty (devel release)

Eric Desrochers (slashd) wrote :

The patch has been modified as per IRC communication with cyphermox

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package os-prober - 1.70ubuntu4

---------------
os-prober (1.70ubuntu4) zesty; urgency=medium

  * Fixing FS probes in os-probes/common/50mounted-tests (LP: #1579609).

 -- Eric Desrochers <email address hidden> Tue, 06 Dec 2016 10:02:36 -0500

Changed in os-prober (Ubuntu):
status: In Progress → Fix Released

Hello Yung, or anyone else affected,

Accepted os-prober into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/os-prober/1.70ubuntu3.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in os-prober (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed
Eric Desrochers (slashd) wrote :

@cyphermox,

As per our IRC communication, here the V2 version of the Xenial debdiff:

Eric Desrochers (slashd) wrote :

V3 revision including the missing Depends: grub-common and version increment to 3.2

Marking verification-failed: os-prober ...3.1 is missing a Depends on grub-common due to it now really requiring grub-probe and grub-mount (there are no longer other paths to probing for filesystems).

tags: added: verification-failed
removed: verification-needed
Eric Desrochers (slashd) wrote :

Important note for SRU :

As per my IRC message in #ubuntu-bugs and #ubuntu-devel on Freenode.

Version 3.2 should be applied on top of 3.1 in -proposed.

3.1 should not be tag "verification-done" nor promote to -updates without 3.2 patch, since it is missing the "grub-common" dependency.

Eric

Brian Murray (brian-murray) wrote :

Hello Yung, or anyone else affected,

Accepted os-prober into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/os-prober/1.70ubuntu3.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: removed: verification-failed
tags: added: verification-needed
Eric Desrochers (slashd) wrote :

Yung Shen,

Do you had the chance to test the package found in -proposed [1.70ubuntu3.2] ?
This is the last step before the package to land in -update (stable)

Regards,
Eric

Eric Desrochers (slashd) on 2017-01-17
tags: added: verification-done
removed: verification-needed
Robie Basak (racb) wrote :

@Eric,

Please detail how and what you tested before marking verification-done.

tags: added: verification-needed
removed: verification-done
Eric Desrochers (slashd) on 2017-01-18
tags: added: verification-done
removed: verification-needed
Eric Desrochers (slashd) wrote :

I want to test the package more, I think I found something that could have need improvement, that I didn't notice before.

$ update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-60-generic
Found initrd image: /boot/initrd.img-4.4.0-60-generic
Found linux image: /boot/vmlinuz-4.4.0-59-generic
Found initrd image: /boot/initrd.img-4.4.0-59-generic
Found linux image: /boot/vmlinuz-4.4.0-57-generic
Found initrd image: /boot/initrd.img-4.4.0-57-generic
Found linux image: /boot/vmlinuz-4.4.0-53-generic
Found initrd image: /boot/initrd.img-4.4.0-53-generic
Found linux image: /boot/vmlinuz-4.4.0-51-generic
Found initrd image: /boot/initrd.img-4.4.0-51-generic
Found linux image: /boot/vmlinuz-4.4.0-21-generic
Found initrd image: /boot/initrd.img-4.4.0-21-generic
==> Failed to probe for filesystem type
done

tags: added: verification-needed
removed: verification-done
Eric Desrochers (slashd) wrote :

The "Failed to probe for filesystem type" in my case is related to one of my "Linux LVM" partition and AFAIK LVM is not directly mountable.

I tweaked "os-prober" to give me the partition that cannot be probe :

# os-prober
/dev/nvme0n1p5 - Failed to probe for filesystem type

# fdisk
/dev/nvme0n1p5 1001472 1000214527 999213056 476.5G 8e Linux LVM

Find fs_type :
#. /usr/share/os-prober/common.sh
#fs_type /dev/nvme0n1p5
LVM2_member

After a discussion with cyphermox, we decided to set this to "verificaiton-failed" and modify the src code to catch this thing that we didn't notice before.

tags: added: verification-failed
removed: verification-needed

os-prober should at least mention which partition failed to probe, so that one can immediately see whether it's an issue; but should also probably explicitly skip LVM2_member (as the underlying LVs would get probed too separately, possibly before the partition is reached (assuming this is probed in alphabetical order)).

Also, it looks to me like the Windows Boot/System partition (0C01 Microsoft reserved) I left around on a second disk on my system is detected as "", which should probably be have been "NOT-DETECTED". This is easily fixable at the same time as LVM2_member, and should help fixing issues where partitions may be probed when they really should be ignored.

Eric Desrochers (slashd) wrote :

As per my irc conversation with cyphermox, I submit a new patch to skip LVM2_member and "" (not detected) partition from probing to clean os-prober output, and in the same time "update-grub" output.

Eric Desrochers (slashd) wrote :

Zesty

Brian Murray (brian-murray) wrote :

This fix, the one from comment #30, doesn't seem to have landed in Xenial.

Changed in os-prober (Ubuntu Xenial):
status: Fix Committed → Incomplete
Changed in os-prober (Ubuntu):
status: Fix Released → Triaged
Brian Murray (brian-murray) wrote :

I actually meant Zesty, not Xenial.

This doesn't apply to Xenial; I instead merged from Debian which includes a different fix, but one that isn't so applicable for a SRU. We discussed the proposed changes with Colin, who maintains os-prober in Debian, and he was okay with the proposed changes for a SRU.

Changed in os-prober (Ubuntu):
status: Triaged → Fix Released
Brian Murray (brian-murray) wrote :

Hello Yung, or anyone else affected,

Accepted os-prober into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/os-prober/1.70ubuntu3.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in os-prober (Ubuntu Xenial):
status: Incomplete → Fix Committed
tags: removed: verification-failed
tags: added: verification-needed
Eric Desrochers (slashd) wrote :

I have tested package "1.70ubuntu3.3" and it works as expected for my part byt skipping LVM2_member.

# fs_type /dev/vda1
ext2
# fs_type /dev/vda2
NOT-DETECTED
# fs_type /dev/vda5
LVM2_member

* os-prober, do not return error
* update-grub and update-grub2 doesn't report partitions detection errors anymore.

# update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-31-generic
Found initrd image: /boot/initrd.img-4.4.0-31-generic
done

# update-grub2
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-31-generic
Found initrd image: /boot/initrd.img-4.4.0-31-generic
done

Before changing the LP bug to "verification-done", I would like to see other affected folks providing feedbacks on this call for testing the proposed package.

- Eric

Eric Desrochers (slashd) wrote :

Today I helped a users with the exact same problem :

os-prober: debug: running /usr/lib/os-probes/10zvol-test on /dev/sda1
os-prober: debug: running /usr/lib/os-probes/50mounted-tests on /dev/sda1
kernel: [3178302.911951] EXT4-fs (sda1): VFS: Can't find ext4 filesystem
kernel: [3178302.913401] EXT4-fs (sda1): VFS: Can't find ext4 filesystem
kernel: [3178302.915005] EXT4-fs (sda1): VFS: Can't find ext4 filesystem
kernel: [3178302.916449] squashfs: SQUASHFS error: Can't find a SQUASHFS superblock on sda1
kernel: [3178302.917854] FAT-fs (sda1): bogus number of reserved sectors
kernel: [3178302.917857] FAT-fs (sda1): Can't find a valid FAT filesystem
kernel: [3178302.924998] XFS (sda1): Invalid superblock magic number
kernel: [3178302.927397] FAT-fs (sda1): bogus number of reserved sectors
kernel: [3178302.927399] FAT-fs (sda1): Can't find a valid FAT filesystem
kernel: [3178302.930445] VFS: Can't find a Minix filesystem V1 | V2 | V3 on device sda1.
kernel: [3178302.931694] hfsplus: unable to find HFS+ superblock
kernel: [3178302.932769] qnx4: no qnx4 filesystem (no root dir).
kernel: [3178302.933677] ufs: You didn't specify the type of your ufs filesystem
kernel: [3178302.933677]
kernel: [3178302.933677] mount -t ufs -o ufstype=sun|sunx86|44bsd|ufs2|5xbsd|old|hp|nextstep|nextstep-cd|openstep ...
kernel: [3178302.933677]
kernel: [3178302.933677] >>>WARNING<<< Wrong ufstype may corrupt your filesystem, default is ufstype=old
kernel: [3178302.933997] ufs: ufs_fill_super(): bad magic number
kernel: [3178302.935226] hfs: can't find a HFS filesystem on dev sda1

$ dpkg -l | grep 'os-prober'
ii os-prober 1.70ubuntu3 amd64 utility to detect other OSes on a set of drives

$ . /usr/share/os-prober/common.sh
$ fs_type /dev/sda1

fs_type doesn't return with an error code.

The user installed os-prober (1.70ubuntu3.3) found in xenial-proposed, and problem is now solved :

os-prober: debug: running /usr/lib/os-probes/10zvol-test on /dev/sda1
os-prober: debug: running /usr/lib/os-probes/50mounted-tests on /dev/sda1

- Eric

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package os-prober - 1.70ubuntu3.3

---------------
os-prober (1.70ubuntu3.3) xenial; urgency=medium

  * More fixes to not mangle partitions that can't be safely detected via
    mounting: (LP: #1579609)
    - os-probes/common/50mounted-tests: Add statement to skip probing when a
      partition is detected as LVM2_member.
    - Synchronize os-probes/common/50mounted-tests and
      linux-boot-probes/common/50mounted-tests so they behave the same with
      regards too LVM members and extended partitions.
    - Fix fs_types() to not return with an error code, in all cases it should
      return a value of NOT-DETECTED if the partition type could not be
      detected; this includes MSDOS extended partitions.

os-prober (1.70ubuntu3.2) xenial; urgency=critical

  * debian/control: add missing Depends on grub-common (which ships grub-mount
    and grub-probe) now that this is the only path to probing for filesystems.

os-prober (1.70ubuntu3.1) xenial; urgency=critical

  * os-probes/common/50mounted-tests: don't mount filesystems with mount for
    probing as that can cause corruption in some cases. (LP: #1579609)

 -- Eric Desrochers <email address hidden> Wed, 18 Jan 2017 13:01:07 -0500

Changed in os-prober (Ubuntu Xenial):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for os-prober has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Dan Streetman (ddstreet) on 2019-03-20
tags: removed: sts-sponsor
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.