Debian Bug report logs - #784709
os-prober prevent the upgrade to jessie

version graph

Package: os-prober; Maintainer for os-prober is Debian Install System Team <debian-boot@lists.debian.org>; Source for os-prober is src:os-prober (PTS, buildd, popcon).

Reported by: Jerome Kieffer <jerome.kieffer@esrf.fr>

Date: Thu, 7 May 2015 22:09:02 UTC

Severity: critical

Tags: moreinfo, patch

Merged with 804175

Found in versions os-prober/1.70, os-prober/1.65

Fixed in version os-prober/1.72

Done: Colin Watson <cjwatson@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#784709; Package os-prober. (Thu, 07 May 2015 22:09:07 GMT) (full text, mbox, link).


Acknowledgement sent to Jerome Kieffer <jerome.kieffer@esrf.fr>:
New Bug report received and forwarded. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Thu, 07 May 2015 22:09:07 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Jerome Kieffer <jerome.kieffer@esrf.fr>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: os-prober prevent the upgrade to jessie
Date: Fri, 08 May 2015 00:06:12 +0200
Package: os-prober
Version: 1.65
Severity: critical
Tags: newcomer
Justification: breaks the whole system

Dear Maintainer,

During the upgrade (apt-get dist-upgrade) of a computer from debian7 (Wheezy)
to Debian8 (Jessie) the system still runs the kernel 3.2 from Wheezy; but the
os-prober version used by update-grub is already the one from Jessie... and
hang.
According to:
https://lists.debian.org/debian-boot/2013/05/msg00077.html
(and related bugs at maegia), the new os-prober (from Jessie) is unable to scan
a hard-drive containing Extended partitions (like sdb4 hereafter) and locks
forever (at least 90mn), locking the debian system in the middle of a dist-
upgrade.

Disque /dev/sdb : 1,8 TiB, 2000398934016 octets, 3907029168 secteurs
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
Type d'étiquette de disque : dos
Identifiant de disque : 0x9a2578f7

Device     Boot      Start        End    Sectors  Size Id Type
/dev/sdb1               63   33575849   33575787   16G 82 Linux swap / Solaris
/dev/sdb2         33575850  243304424  209728575  100G 83 Linux
/dev/sdb3        243304425  453032999  209728575  100G 83 Linux
/dev/sdb4        453033000 3907024064 3453991065  1,6T  5 Extended
/dev/sdb5        453033063  557905319  104872257   50G 83 Linux
/dev/sdb6        557905383  662777639  104872257   50G 83 Linux
/dev/sdb7        662777703  767649959  104872257   50G 83 Linux
/dev/sdb8        767650023  872522279  104872257   50G 83 Linux
/dev/sdb9        872522343 1082250854  209728512  100G 83 Linux
/dev/sdb10      1082250918 3907024064 2824773147  1,3T 83 Linux

The system was fully occupied by a "mount" process trying to mount /dev/sdb4.
This process was uninteruptable (kill -9 being ineffective) and forced to
reboot exactly at the stage grub was updating.

The only solution found was to boot an external device with a rescue system and
a recent kernel (3.16) to finish the dist-upgrade. One solution may have been
to upgrade first the kernel via wheezy-backports packages before upgrading to
Jessie.

Best regards,

Jerome Kieffer



-- System Information:
Debian Release: 8.0
  APT prefers stable
  APT policy: (800, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=fr_FR.UTF8, LC_CTYPE=fr_FR.UTF8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)

Versions of packages os-prober depends on:
ii  libc6  2.19-18

os-prober recommends no packages.

os-prober suggests no packages.

-- no debconf information



Removed tag(s) newcomer. Request was from "Adam D. Barratt" <adam@adam-barratt.org.uk> to control@bugs.debian.org. (Thu, 07 May 2015 22:18:04 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#784709; Package os-prober. (Wed, 20 May 2015 00:39:17 GMT) (full text, mbox, link).


Acknowledgement sent to rzr@gna.org:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Wed, 20 May 2015 00:39:17 GMT) (full text, mbox, link).


Message #12 received at 784709@bugs.debian.org (full text, mbox, reply):

From: Philippe Coval <rzr@gna.org>
To: 784709@bugs.debian.org
Subject: solution
Date: Wed, 20 May 2015 02:35:52 +0200
[Message part 1 (text/plain, inline)]
I managed to prevent this trouble by adding an extra test is os-prober


Please check the attached patch or

https://github.com/rzr/os-prober/tree/sandbox/rzr/for-upstream

Or check my 1st post of :

https://bugs.debian.org/768902


-- 
http://rzr.free.fr gpg:0x467094BC mailto:rzr@gna.org xmpp:rzr@jabber.org
                                                                       .


[0001-Fix-by-forcing-fs-type-to-not-detected-if-not-named.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#784709; Package os-prober. (Wed, 20 May 2015 01:57:05 GMT) (full text, mbox, link).


Acknowledgement sent to Paul Wise <pabs@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Wed, 20 May 2015 01:57:05 GMT) (full text, mbox, link).


Message #17 received at 784709@bugs.debian.org (full text, mbox, reply):

From: Paul Wise <pabs@debian.org>
To: 784709@bugs.debian.org
Cc: Philippe Coval <rzr@gna.org>
Subject: Re: solution
Date: Wed, 20 May 2015 09:50:42 +0800
[Message part 1 (text/plain, inline)]
On Wed, 20 May 2015 02:35:52 +0200 Philippe Coval wrote:

> I managed to prevent this trouble by adding an extra test is os-prober

We discussed this on #debian-boot:

<rzr> hi , would anyone like to help fixing a critical bug ? https://bugs.debian.org/784709
<rzr> I want to push a patch upstream 
<pabs> I think a better option might be to change return 0 to return 1 in fs_type?
<pabs> and or possibly add support for blkid
<pabs> oh, it is already there
<pabs> rzr: do you have an extended partition handy?
<rzr> yea pabs 
<rzr> but I upgraded kernel since
<pabs> what is the output of this? blkid -o value -s TYPE /dev/sdX ; echo $?
<rzr> 2
<pabs> hmmm, so that should trigger the types=NOT-DETECTED part already?
<rzr> suspicious
<rzr> I was thinking the same
<rzr> well It's a bit late let's get feedback from bug reporter 
<rzr> pabs, thx anyway I'll stay around
<pabs> indeed, could you send a mail CCing the submitter and asking them for this? blkid -o value -s TYPE /dev/sdb4 ; echo $?
<rzr> older kernel return 0
<rzr> double checking current one
<pabs> you mean older blkid?
<rzr> no kernel 3.5.0-030500rc5-generic
<rzr> from u
<rzr> :)
<pabs> but blkid is the thing that returns the value 2?
<rzr> but stay calm i run debian 
<rzr> oh wait
<rzr> it return 0 in all cases
<rzr> I had mistyped sd4 for sda4
<rzr> so I could return err in that fs_type fuct if nullstring
<pabs> blkid returns 0 or fs_type returns 0?
<rzr> blkid
<pabs> does it return the right thing for the other partitions?
<rzr> yea
<pabs> hmm
<rzr> http://paste.debian.net/180700/ (copied below)
<rzr> may the bug be in blkid then ?
<pabs> not sure where it is TBH
<pabs> which version of util-linux
<rzr> Version: 2.25.2-6
<rzr> 1 version behind upstream
<rzr> well i have to go
<rzr> I'll email if no feedback in a couple of days
<pabs> rzr: what about sudo file -s /dev/sda4 ?
<rzr>  /dev/sda4: DOS/MBR boot sector; partition 1 : ID=0x83, start-CHS (0x3ff,47,57), end-CHS (0x3ff,254,63), startsector 2, 47565448 sectors; partition 2 : ID=0x5, start-CHS (0x3ff,0,1), end-CHS (0x3ff,254,63), startsector 47565450, 32772600 sectors
--- rzr is now known as rZr
<rZr> see ya
<pabs> later

for i in $(seq 1 5 ) ; do echo "" ; blkid -o value -s TYPE /dev/sda$i ;
echo "$i=$?" ; done

vfat
1=0

vfat
2=0

swap
3=0

4=0

ext3
5=0

-- 
bye,
pabs

https://wiki.debian.org/PaulWise

[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#784709; Package os-prober. (Wed, 20 May 2015 02:00:08 GMT) (full text, mbox, link).


Acknowledgement sent to Paul Wise <pabs@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Wed, 20 May 2015 02:00:08 GMT) (full text, mbox, link).


Message #22 received at 784709@bugs.debian.org (full text, mbox, reply):

From: Paul Wise <pabs@debian.org>
To: 784709@bugs.debian.org
Cc: Jerome Kieffer <jerome.kieffer@esrf.fr>
Subject: Re: os-prober prevent the upgrade to jessie
Date: Wed, 20 May 2015 09:55:01 +0800
[Message part 1 (text/plain, inline)]
Control: tags -1 + moreinfo

On Fri, 08 May 2015 00:06:12 +0200 Jerome Kieffer wrote:

> During the upgrade (apt-get dist-upgrade) of a computer from debian7 (Wheezy)
> to Debian8 (Jessie) the system still runs the kernel 3.2 from Wheezy; but the
> os-prober version used by update-grub is already the one from Jessie... and
> hang.

Thanks for the report, could you please reboot into the old kernel and
then provide the output of these commands in order?

sudo blkid -o value -s TYPE /dev/sdb4
echo $?
sudo file -s /dev/sdb4
echo $?

-- 
bye,
pabs

https://wiki.debian.org/PaulWise

[signature.asc (application/pgp-signature, inline)]

Added tag(s) moreinfo. Request was from Paul Wise <pabs@debian.org> to 784709-submit@bugs.debian.org. (Wed, 20 May 2015 02:00:08 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#784709; Package os-prober. (Wed, 20 May 2015 13:18:12 GMT) (full text, mbox, link).


Acknowledgement sent to Jérôme Kieffer <jerome.kieffer@terre-adelie.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Wed, 20 May 2015 13:18:12 GMT) (full text, mbox, link).


Message #29 received at 784709@bugs.debian.org (full text, mbox, reply):

From: Jérôme Kieffer <jerome.kieffer@terre-adelie.org>
To: 784709@bugs.debian.org
Subject: issue with os-prober
Date: Wed, 20 May 2015 14:59:04 +0200
[Message part 1 (text/plain, inline)]
Hi Paul,

Thanks for your interest.
Here is the answer for the 3.16 kernel:

jerome@patagonia:~$ sudo blkid -o value -s TYPE /dev/sdb4
jerome@patagonia:~$ echo $?
0
jerome@patagonia:~$ sudo file -s /dev/sdb4
/dev/sdb4: DOS/MBR boot sector; partition 1 : ID=0x83, start-CHS (0x3ff,254,63), end-CHS (0x3ff,254,63), startsector 63, 104872257 sectors; partition 2 : ID=0x5, start-CHS (0x3ff,254,63), end-CHS (0x3ff,254,63), startsector 104872320, 104872320 sectors, extended partition table
jerome@patagonia:~$ echo $?
0

The output is the same on 3.2, as you can see on attached images.

Cheers,

Jerome
[14h32m41-NIKON_D5100--scaled.jpg (image/jpeg, attachment)]
[14h36m10-NIKON_D5100--scaled.jpg (image/jpeg, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#784709; Package os-prober. (Thu, 21 May 2015 04:21:08 GMT) (full text, mbox, link).


Acknowledgement sent to Paul Wise <pabs@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Thu, 21 May 2015 04:21:08 GMT) (full text, mbox, link).


Message #34 received at 784709@bugs.debian.org (full text, mbox, reply):

From: Paul Wise <pabs@debian.org>
To: 784709@bugs.debian.org, Jérôme Kieffer <jerome.kieffer@terre-adelie.org>
Subject: Re: issue with os-prober
Date: Thu, 21 May 2015 12:14:15 +0800
[Message part 1 (text/plain, inline)]
On Wed, 20 May 2015 14:59:04 +0200 Jérôme Kieffer wrote:

> jerome@patagonia:~$ sudo blkid -o value -s TYPE /dev/sdb4
> jerome@patagonia:~$ echo $?
> 0

That is strange, what about just this?

sudo blkid /dev/sdb4 ; echo $?

-- 
bye,
pabs

https://wiki.debian.org/PaulWise

[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#784709; Package os-prober. (Thu, 21 May 2015 08:30:05 GMT) (full text, mbox, link).


Acknowledgement sent to 784709@bugs.debian.org, util-linux@vger.kernel.org:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Thu, 21 May 2015 08:30:05 GMT) (full text, mbox, link).


Message #39 received at 784709@bugs.debian.org (full text, mbox, reply):

From: Paul Wise <pabs@debian.org>
To: 784709@bugs.debian.org, util-linux@vger.kernel.org
Subject: when would blkid success but not filesystem type?
Date: Thu, 21 May 2015 16:24:38 +0800
[Message part 1 (text/plain, inline)]
In https://bugs.debian.org/784709 Jérôme Kieffer wrote:

> Here is the answer for the 3.16 kernel:
> 
> jerome@patagonia:~$ sudo blkid -o value -s TYPE /dev/sdb4
> jerome@patagonia:~$ echo $?
> 0
...
> 
> The output is the same on 3.2, as you can see on attached images.

Anyone know when blkid would return success but not the filesystem type?
This is util-linux 2.25.2-6 with Linux 3.16/3.2 and an extended partition.

-- 
bye,
pabs

https://wiki.debian.org/PaulWise

[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#784709; Package os-prober. (Thu, 21 May 2015 11:09:04 GMT) (full text, mbox, link).


Acknowledgement sent to Karel Zak <kzak@redhat.com>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Thu, 21 May 2015 11:09:04 GMT) (full text, mbox, link).


Message #44 received at 784709@bugs.debian.org (full text, mbox, reply):

From: Karel Zak <kzak@redhat.com>
To: 784709@bugs.debian.org, util-linux@vger.kernel.org
Subject: Re: when would blkid success but not filesystem type?
Date: Thu, 21 May 2015 13:07:35 +0200
On Thu, May 21, 2015 at 04:24:38PM +0800, Paul Wise wrote:
> In https://bugs.debian.org/784709 Jérôme Kieffer wrote:
> 
> > Here is the answer for the 3.16 kernel:
> > 
> > jerome@patagonia:~$ sudo blkid -o value -s TYPE /dev/sdb4
> > jerome@patagonia:~$ echo $?
> > 0
> ...
> > 
> > The output is the same on 3.2, as you can see on attached images.
> 
> Anyone know when blkid would return success but not the filesystem type?

 The option '-s' does not affect return code, this option controls 
 output filter only. I have improved the description in the man page 
 to make it more obvious.

 blkid returns success always when it's possible to gather any
 information about the device. The important detail is that the recent
 versions provide also PARTUUID=, so we have information about all
 (including empty) partitions!

 For example (very very old version from e2fsprogs):

    # blkid /dev/sdc1; echo $?
    2

 but the current util-linux upstream:

    #blkid /dev/sdc1; echo $?
    /dev/sdc1: PARTUUID="4b6f59ea-01"
    0


 And yes, we have PARTUUID also for MBR partitions, the method used to
 generate the UUID is the same like kernel uses for root= command
 line option.

 Note that my recommendation is to use lsblk, for example:

    # lsblk --noheading --output FSTYPE /dev/sda1
    vfat

 it reads info from udev db (libblkid is only fallback here), and it
 provides better way how to control output.


  Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#784709; Package os-prober. (Mon, 25 May 2015 20:12:04 GMT) (full text, mbox, link).


Acknowledgement sent to Jérôme Kieffer <jerome.kieffer@terre-adelie.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Mon, 25 May 2015 20:12:04 GMT) (full text, mbox, link).


Message #49 received at 784709@bugs.debian.org (full text, mbox, reply):

From: Jérôme Kieffer <jerome.kieffer@terre-adelie.org>
To: Paul Wise <pabs@debian.org>, 784709@bugs.debian.org
Subject: Re: issue with os-prober
Date: Mon, 25 May 2015 22:09:46 +0200
On Thu, 21 May 2015 12:14:15 +0800
Paul Wise <pabs@debian.org> wrote:

> On Wed, 20 May 2015 14:59:04 +0200 Jérôme Kieffer wrote:
> 
> > jerome@patagonia:~$ sudo blkid -o value -s TYPE /dev/sdb4
> > jerome@patagonia:~$ echo $?
> > 0
> 
> That is strange, what about just this?
> 
> sudo blkid /dev/sdb4 ; echo $?

Dear Paul,

# uname -a
Linux patagonia 3.2.0-3-amd64 #1 SMP Mon Jul 23 02:45:17 UTC 2012 x86_64 GNU/Linux

# fdisk -l /dev/sdb
Disque /dev/sdb : 1,8 TiB, 2000398934016 octets, 3907029168 secteurs
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
Type d'étiquette de disque : dos
Identifiant de disque : 0x9a2578f7

Device     Boot      Start        End    Sectors  Size Id Type
/dev/sdb1               63   33575849   33575787   16G 82 Linux swap / Solaris
/dev/sdb2         33575850  243304424  209728575  100G 83 Linux
/dev/sdb3        243304425  453032999  209728575  100G 83 Linux
/dev/sdb4        453033000 3907024064 3453991065  1,6T  5 Extended
/dev/sdb5        453033063  557905319  104872257   50G 83 Linux
/dev/sdb6        557905383  662777639  104872257   50G 83 Linux
/dev/sdb7        662777703  767649959  104872257   50G 83 Linux
/dev/sdb8        767650023  872522279  104872257   50G 83 Linux
/dev/sdb9        872522343 1082250854  209728512  100G 83 Linux
/dev/sdb10      1082250918 3907024064 2824773147  1,3T 83 Linux

# blkid /dev/sdb?
/dev/sdb1: LABEL="Swap2T" UUID="b3de0b2e-9092-4d08-af8d-09fefe8e9735" TYPE="swap" PARTUUID="9a2578f7-01"
/dev/sdb2: LABEL="Win" UUID="78d417f1-a097-4cf3-9218-32a621f78c68" TYPE="ext4" PARTUUID="9a2578f7-02"
/dev/sdb3: LABEL="Root" UUID="9b3d9c65-6ba2-425f-bc5a-729cb6098165" TYPE="ext4" PARTUUID="9a2578f7-03"
/dev/sdb4: PTTYPE="dos" PARTUUID="9a2578f7-04"
/dev/sdb5: LABEL="UsrLocal" UUID="dee401ac-fa36-44a5-9463-2571f8f52a84" TYPE="ext4" PARTUUID="9a2578f7-05"
/dev/sdb6: LABEL="Var" UUID="e49c7936-3e39-4644-b025-e943172cd218" TYPE="ext4" PARTUUID="9a2578f7-06"
/dev/sdb7: LABEL="Backup" UUID="251f4ed5-6114-4f19-b9c7-060eb82ececb" TYPE="ext4" PARTUUID="9a2578f7-07"
/dev/sdb8: LABEL="Opt" UUID="8c0395c2-c9da-4ffc-a1a1-08851774182e" TYPE="ext4" PARTUUID="9a2578f7-08"
/dev/sdb9: LABEL="Big" UUID="deab5b7f-fb85-4f0d-95ed-84d37180162d" TYPE="ext4" PARTUUID="9a2578f7-09"

The extended partition looks different from the other, but the result of blkid under 3.2 is the same as 3.16.

Cheers,



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#784709; Package os-prober. (Tue, 26 May 2015 04:48:13 GMT) (full text, mbox, link).


Acknowledgement sent to Paul Wise <pabs@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Tue, 26 May 2015 04:48:13 GMT) (full text, mbox, link).


Message #54 received at 784709@bugs.debian.org (full text, mbox, reply):

From: Paul Wise <pabs@debian.org>
To: 784709@bugs.debian.org, util-linux <util-linux@vger.kernel.org>
Subject: Re: when would blkid success but not filesystem type?
Date: Tue, 26 May 2015 12:43:21 +0800
[Message part 1 (text/plain, inline)]
On Tue, 2015-05-26 at 12:21 +0800, Paul Wise wrote:
> On Thu, 21 May 2015 13:07:35 +0200 Karel Zak wrote:
> 
> > The option '-s' does not affect return code ...  we have information
> > about all (including empty) partitions!
> 
> Ok, I see. Sounds like the proposed patch is appropriate then.
> 
> https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=12;filename=0001-Fix-by-forcing-fs-type-to-not-detected-if-not-named.patch;att=1;bug=784709

Actually the code in question already contains a code path for when
blkid returns success but an empty string. Needs more investigation.

-- 
bye,
pabs

https://wiki.debian.org/PaulWise

[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#784709; Package os-prober. (Tue, 26 May 2015 04:51:04 GMT) (full text, mbox, link).


Acknowledgement sent to Paul Wise <pabs@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Tue, 26 May 2015 04:51:04 GMT) (full text, mbox, link).


Message #59 received at 784709@bugs.debian.org (full text, mbox, reply):

From: Paul Wise <pabs@debian.org>
To: Jérôme Kieffer <jerome.kieffer@terre-adelie.org>
Cc: 784709@bugs.debian.org
Subject: Re: issue with os-prober
Date: Tue, 26 May 2015 12:24:46 +0800
[Message part 1 (text/plain, inline)]
On Mon, 2015-05-25 at 22:09 +0200, Jérôme Kieffer wrote:

> # uname -a
...
> # fdisk -l /dev/sdb
...
> # blkid /dev/sdb?
...
> /dev/sdb4: PTTYPE="dos" PARTUUID="9a2578f7-04"
...
> The extended partition looks different from the other, but the result
> of blkid under 3.2 is the same as 3.16.

Yep, as explained by upstream, this bug in os-prober is due to a new
feature in blkid from newer util-linux versions where it can now get
info from partition tables as well as filesystems, so it succeeds
getting information from the partition but the returned information does
not contain the filesystem type so it returns an empty string.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=784709#44

-- 
bye,
pabs

https://wiki.debian.org/PaulWise

[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#784709; Package os-prober. (Tue, 26 May 2015 04:51:08 GMT) (full text, mbox, link).


Acknowledgement sent to 784709@bugs.debian.org, util-linux <util-linux@vger.kernel.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Tue, 26 May 2015 04:51:08 GMT) (full text, mbox, link).


Message #64 received at 784709@bugs.debian.org (full text, mbox, reply):

From: Paul Wise <pabs@debian.org>
To: 784709@bugs.debian.org, util-linux <util-linux@vger.kernel.org>
Subject: Re: when would blkid success but not filesystem type?
Date: Tue, 26 May 2015 12:21:36 +0800
[Message part 1 (text/plain, inline)]
On Thu, 21 May 2015 13:07:35 +0200 Karel Zak wrote:

> The option '-s' does not affect return code ...  we have information
> about all (including empty) partitions!

Ok, I see. Sounds like the proposed patch is appropriate then.

https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=12;filename=0001-Fix-by-forcing-fs-type-to-not-detected-if-not-named.patch;att=1;bug=784709

>  Note that my recommendation is to use lsblk, for example:

That has the same issue:

$ sudo lsblk --noheading --output FSTYPE /dev/sda2 ; echo $?

0

I think for our purposes we would need --nodeps too.

-- 
bye,
pabs

https://wiki.debian.org/PaulWise

[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#784709; Package os-prober. (Tue, 26 May 2015 09:42:10 GMT) (full text, mbox, link).


Acknowledgement sent to Karel Zak <kzak@redhat.com>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Tue, 26 May 2015 09:42:10 GMT) (full text, mbox, link).


Message #69 received at 784709@bugs.debian.org (full text, mbox, reply):

From: Karel Zak <kzak@redhat.com>
To: 784709@bugs.debian.org, util-linux <util-linux@vger.kernel.org>
Subject: Re: when would blkid success but not filesystem type?
Date: Tue, 26 May 2015 11:40:40 +0200
On Tue, May 26, 2015 at 12:21:36PM +0800, Paul Wise wrote:
> On Thu, 21 May 2015 13:07:35 +0200 Karel Zak wrote:
> 
> > The option '-s' does not affect return code ...  we have information
> > about all (including empty) partitions!
> 
> Ok, I see. Sounds like the proposed patch is appropriate then.
> 
> https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=12;filename=0001-Fix-by-forcing-fs-type-to-not-detected-if-not-named.patch;att=1;bug=784709
> 
> >  Note that my recommendation is to use lsblk, for example:
> 
> That has the same issue:
> 
> $ sudo lsblk --noheading --output FSTYPE /dev/sda2 ; echo $?
> 
> 0

 Why do you want rely on return code? It is not error when 
 FS type is undefined/unknown. All you need is to check result.

  FSTYPE=$(lsblk --nodeps --noheading --output FSTYPE /dev/sda2)
  [ -n "$FSTYPE" ] && echo $FSTYPE

> I think for our purposes we would need --nodeps too.

 Yes.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#784709; Package os-prober. (Sun, 07 Jun 2015 13:54:03 GMT) (full text, mbox, link).


Acknowledgement sent to Philippe Coval <rzr@gna.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Sun, 07 Jun 2015 13:54:03 GMT) (full text, mbox, link).


Message #74 received at 784709@bugs.debian.org (full text, mbox, reply):

From: Philippe Coval <rzr@gna.org>
To: 784709@bugs.debian.org
Cc: Philippe Coval <rzr@gna.org>
Subject: [PATCH] use lsblk to attemp to guess partition's fs type
Date: Sun, 7 Jun 2015 15:51:33 +0200
If not found it will fallback to use other tools.

Note that fs_type function is not expected to return error code
different than zero even if it failed to detect type.

If filesystem is undermined then "NOT-DETECTED" will be echoed.

This change will prevent mount to hang on extended part (#768902)

Signed-off-by: Philippe Coval <rzr@gna.org>
Bug-Debian: 768902
---
 common.sh                                | 23 ++++++++++++++++++-----
 linux-boot-probes/common/50mounted-tests |  2 +-
 os-probes/common/50mounted-tests         |  1 +
 3 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/common.sh b/common.sh
index 30e245e..f89c07d 100644
--- a/common.sh
+++ b/common.sh
@@ -106,14 +106,27 @@ item_in_dir () {
 # We can't always tell the filesystem type up front, but if we have the
 # information then we should use it. Note that we can't use block-attr here
 # as it's only available in udebs.
+# If not detected after different attempts then "NOT-DETECTED" will be printed
+# because function is not supposed to exit error codes.
 fs_type () {
+	local fstype=""
 	if (export PATH="/lib/udev:$PATH"; type vol_id) >/dev/null 2>&1; then
-		PATH="/lib/udev:$PATH" vol_id --type "$1" 2>/dev/null
-	elif type blkid >/dev/null 2>&1; then
-		blkid -o value -s TYPE "$1" 2>/dev/null
-	else
-		return 0
+		PATH="/lib/udev:$PATH" \
+			fstype=$(vol_id --type "$1" 2>/dev/null \
+			|| echo "")
+		[ "$fstype" = "" ] || { echo "$fstype" ; return 0; }
+	fi
+	if type lsblk >/dev/null 2>&1 ; then
+		fstype=$(lsblk --nodeps --noheading --output fstype -- "$1" || echo "")
+		[ "$fstype" = "" ] || { echo "$fstype" ; return 0; }
+	fi
+	if type blkid >/dev/null 2>&1; then
+		fstype=$(blkid -o value -s TYPE "$1" 2>/dev/null \
+		|| echo "")
+		[ "$fstype" = "" ] || { echo "$fstype" ; return 0; }
 	fi
+	echo "NOT-DETECTED"
+	return 0
 }
 
 parse_proc_mounts () {
diff --git a/linux-boot-probes/common/50mounted-tests b/linux-boot-probes/common/50mounted-tests
index 41e26e6..ee1e9f2 100755
--- a/linux-boot-probes/common/50mounted-tests
+++ b/linux-boot-probes/common/50mounted-tests
@@ -5,7 +5,7 @@ set -e
 
 partition="$1"
 
-types="$(fs_type "$partition")" || types=NOT-DETECTED
+types="$(fs_type "$partition")"
 if [ "$types" = NOT-DETECTED ]; then
 	debug "$1 type not recognised; skipping"
 	exit 0
diff --git a/os-probes/common/50mounted-tests b/os-probes/common/50mounted-tests
index 561163b..67744bd 100755
--- a/os-probes/common/50mounted-tests
+++ b/os-probes/common/50mounted-tests
@@ -6,6 +6,7 @@ partition="$1"
 . /usr/share/os-prober/common.sh
 
 types="$(fs_type "$partition")" || types=NOT-DETECTED
+[ "" != "$types" ] || types=NOT-DETECTED
 if [ "$types" = NOT-DETECTED ]; then
 	debug "$1 type not recognised; skipping"
 	exit 0
-- 
2.1.4




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#784709; Package os-prober. (Sun, 07 Jun 2015 16:15:03 GMT) (full text, mbox, link).


Acknowledgement sent to Ben Hutchings <ben@decadent.org.uk>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Sun, 07 Jun 2015 16:15:03 GMT) (full text, mbox, link).


Message #79 received at 784709@bugs.debian.org (full text, mbox, reply):

From: Ben Hutchings <ben@decadent.org.uk>
To: Philippe Coval <rzr@gna.org>, 784709@bugs.debian.org
Subject: Re: Bug#784709: [PATCH] use lsblk to attemp to guess partition's fs type
Date: Sun, 07 Jun 2015 17:11:09 +0100
[Message part 1 (text/plain, inline)]
On Sun, 2015-06-07 at 15:51 +0200, Philippe Coval wrote:
> If not found it will fallback to use other tools.
> 
> Note that fs_type function is not expected to return error code
> different than zero even if it failed to detect type.
> 
> If filesystem is undermined then "NOT-DETECTED" will be echoed.
> 
> This change will prevent mount to hang on extended part (#768902)
[...]

Please fix blkid instead of working around it.

Ben.

-- 
Ben Hutchings
73.46% of all statistics are made up.

[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#784709; Package os-prober. (Sun, 07 Jun 2015 21:33:06 GMT) (full text, mbox, link).


Acknowledgement sent to rzr@gna.org:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Sun, 07 Jun 2015 21:33:06 GMT) (full text, mbox, link).


Message #84 received at 784709@bugs.debian.org (full text, mbox, reply):

From: Philippe Coval <rzr@gna.org>
To: 784709@bugs.debian.org
Subject: Looking for mentors to merge this extra test
Date: Sun, 07 Jun 2015 23:30:30 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> Please fix blkid instead of working around it.

Actually I am unsure if or how blkid is broken ...
unless you suggest how should it behave differently ?
Anyway bug can be opened upstream , and linked here
Then, I'll see how can I help then.

Meanwhile, here is a simpler approach to prevent mounting extd part

https://github.com/rzr/os-prober/commit/40c3cb95e#


Remember that bug is classed critical and will break users' upgrades.

- -- 
http://rzr.free.fr gpg:0x467094BC mailto:rzr@gna.org xmpp:rzr@jabber.org
                                                                       .


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAlV0t/YACgkQlNXo+kZwlLyzDQCeNEspk9s2W8DC4c/fa/NlUEVc
s9kAnR9EcdGTLfD11Vk6zZUqlHwW1mGC
=OrsU
-----END PGP SIGNATURE-----



Added tag(s) patch. Request was from Philippe Coval <rzr@gna.org> to control@bugs.debian.org. (Sat, 24 Oct 2015 09:45:04 GMT) (full text, mbox, link).


Added tag(s) pending. Request was from Colin Watson <cjwatson@debian.org> to control@bugs.debian.org. (Fri, 20 Jan 2017 12:33:06 GMT) (full text, mbox, link).


Marked as found in versions os-prober/1.70. Request was from Colin Watson <cjwatson@debian.org> to control@bugs.debian.org. (Fri, 20 Jan 2017 12:33:08 GMT) (full text, mbox, link).


Merged 784709 804175 Request was from Colin Watson <cjwatson@debian.org> to control@bugs.debian.org. (Fri, 20 Jan 2017 12:33:10 GMT) (full text, mbox, link).


Reply sent to Colin Watson <cjwatson@debian.org>:
You have taken responsibility. (Fri, 20 Jan 2017 13:06:29 GMT) (full text, mbox, link).


Notification sent to Jerome Kieffer <jerome.kieffer@esrf.fr>:
Bug acknowledged by developer. (Fri, 20 Jan 2017 13:06:29 GMT) (full text, mbox, link).


Message #97 received at 784709-close@bugs.debian.org (full text, mbox, reply):

From: Colin Watson <cjwatson@debian.org>
To: 784709-close@bugs.debian.org
Subject: Bug#784709: fixed in os-prober 1.72
Date: Fri, 20 Jan 2017 13:04:29 +0000
Source: os-prober
Source-Version: 1.72

We believe that the bug you reported is fixed in the latest version of
os-prober, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 784709@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Colin Watson <cjwatson@debian.org> (supplier of updated os-prober package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Fri, 20 Jan 2017 12:44:34 +0000
Source: os-prober
Binary: os-prober-udeb os-prober
Architecture: source
Version: 1.72
Distribution: unstable
Urgency: medium
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Colin Watson <cjwatson@debian.org>
Description:
 os-prober  - utility to detect other OSes on a set of drives
 os-prober-udeb - utility to detect other OSes on a set of drives (udeb)
Closes: 648208 674561 698598 698733 701814 776275 784709 787418 794409 801631 803155
Changes:
 os-prober (1.72) unstable; urgency=medium
 .
   * Improve logging of mounting and setting partitions to ro/rw (thanks, Ivo
     De Decker).
   * Use a read-only device-mapper entry if possible rather than setting the
     underlying device to read-only (thanks, Ivo De Decker; closes: #701814).
     Note that this introduces a dependency on dmsetup on Linux
     architectures.
   * Remove the "blockdev --setro" code path entirely, since the read-only
     device-mapper arrangement supersedes it and should be safer (closes:
     #648208).
   * Make os-prober-udeb depend on grub-mount-udeb on all Linux and kFreeBSD
     architectures, now that it's available on them all (thanks, James
     Cowgill; closes: #776275).
   * Make os-prober depend on grub-common on Linux and kFreeBSD, in order
     that grub-mount is consistently available.
   * Fix detection of /usr/ partition as a GNU/Linux root partition when
     /lib* directories are moved to /usr/ completely (thanks, Hedayat
     Vatankhah; closes: #698733).
   * Make the yaboot parser more tolerant about the syntax of "append"
     options (thanks, Hedayat Vatankhah; closes: #674561).
   * Disable debugging if OS_PROBER_DISABLE_DEBUG is set (thanks, Hedayat
     Vatankhah; closes: #698598).
   * Replace basename/dirname with shell string processing (thanks, Hedayat
     Vatankhah; part of #694668).
   * Call dmraid only once (thanks, Jeff Mahoney).
   * Fix typos in README (thanks, Nyav; closes: #803155).
   * Add os-release support (based loosely on a patch by Török Edwin; closes:
     #794409).
   * Add Devuan detection (thanks, David Hare; closes: #801631).
   * Work harder to avoid trying to mount extended partitions (thanks,
     Philippe Coval; closes: #784709).
   * Drop " (loader)" suffixes on Microsoft operating systems (thanks, Chris
     Lamb; closes: #787418).
Checksums-Sha1:
 8438248e4fbc40749b85e37c16cf433db51b3cff 1816 os-prober_1.72.dsc
 c7b3b51719328b7cf0258561f4ee9c08f9a21d79 26452 os-prober_1.72.tar.xz
Checksums-Sha256:
 f79975ddbd06ed371c3f27a781d423b2d88af6cc04896946f8df03fa42915f70 1816 os-prober_1.72.dsc
 13ed24f78e83f0c49e11635891458f067e6c8348be210adda46629dd3b7b627a 26452 os-prober_1.72.tar.xz
Files:
 90ced5506beca6dc949347ab30f6e174 1816 debian-installer optional os-prober_1.72.dsc
 16ce39ea58a684f102dd7aff1779cbf5 26452 debian-installer optional os-prober_1.72.tar.xz

-----BEGIN PGP SIGNATURE-----
Comment: Colin Watson <cjwatson@debian.org> -- Debian developer

iQIzBAEBCAAdFiEErApP8SYRtvzPAcEROTWH2X2GUAsFAliCBlMACgkQOTWH2X2G
UAuXBw/+J+SAw+8es7Ca2xByEwor4P28IqkoU5uiBZ2zYo4xs727tAo6CVX0yw7Z
ctRSJhOpKF1/FtiIUNq+6E6ZKKRzqEder4S7fRI92e7FXbW0yn5unUz84EvVrcI1
5V/rhEe3y8IrXEgVWMJoY+Vg5/sQWRMHap7HamC0Zj+9zlGmjZkc01gJRr0hTvw/
ApCUhZncVSlqXb7zgjU74HVX3+YHzJaOsZY4XyhVjmEnWlY8U0pNffCnzuxJDTuY
gMDqC9AQmKyA3bhmzgi5DSh+5r6j2nwvYV9a3+xgJZvu0mv6Ng+UNd3p+uS+7BFU
8KdPy3Cnd0Xv/DkMKYdU5sOoFzsDwXF0sxJtlBpJyMFt9ZAnpRz7oxIS7D76HzYI
msUVsvnBLaldkdTKpn9BlhxGVCH1iIlwN6w3aCW/fBNjuA9VBJyEdzzhCuaAfXZC
fYwryq2gXgeowwdvH6rQcu04C7AHWiXulsl9yV1be8OlbRk8yc+CF08Ma7ABAweI
ToYXEupEfdWEkKyQPaGtgoowUquX6cmYKeKBn5E6N2AVgU+yT10JbWeg6VLzlkKe
p3UD6+iFKjfdKCjM9iy9aoyGjDGCy35lqb824R+nAZsGsJmkEMgRFgTMqYtgCOkU
Jtp0pdbat3CXTQn50nbICF77jOzcFM4p2sO3yVOI0sFOa0mitMY=
=lgmu
-----END PGP SIGNATURE-----




Reply sent to Colin Watson <cjwatson@debian.org>:
You have taken responsibility. (Fri, 20 Jan 2017 13:06:30 GMT) (full text, mbox, link).


Notification sent to Wael Sadek <wael.sadek@gmail.com>:
Bug acknowledged by developer. (Fri, 20 Jan 2017 13:06:30 GMT) (full text, mbox, link).


Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 18 Jun 2017 07:25:48 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jun 4 07:07:14 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.