Bug 16803 - os-prober needs full path for blkid
Summary: os-prober needs full path for blkid
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 5
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: advisory MGA5-64-OK MGA5-32-OK
Keywords: validated_update
Depends on: 17918
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-22 13:11 CEST by Barry Jackson
Modified: 2016-03-31 22:23 CEST (History)
4 users (show)

See Also:
Source RPM: os-prober
CVE:
Status comment:


Attachments
kcm error (51.19 KB, image/png)
2016-03-26 15:30 CET, James Kerr
Details

Description Barry Jackson 2015-09-22 13:11:47 CEST
Description of problem:
https://bugs.mageia.org/show_bug.cgi?id=15209#c15

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.


Reproducible: 

Steps to Reproduce:
Comment 1 David Walser 2016-03-07 23:49:05 CET
os-prober-1.65-9.1.mga5 has been in updates_testing for this since September 29.

What is the status of this?  Please assign to QA with an advisory or ask the sysadmins to remove it from updates_testing.  Thanks.
Comment 2 Barry Jackson 2016-03-08 16:45:06 CET
Sorry - clean forgot about this, I will provide advisory later today.
Comment 3 Barry Jackson 2016-03-08 23:29:43 CET
#########################
Update Advisory

os-prober-1.65-9.1.mga5 has been submitted to 5/core/updates_testing

########################
Description

This update fixes an error message in kcm-grub2 when it updates the grub2 configuration files.

########################
Packages affected

os-prober-1.65-9.1.mga5.src.rpm
os-prober-1.65-9.1.mga5.x86_64
os-prober-debuginfo-1.65-9.1.mga5.x86_64
os-prober-1.65-9.1.mga5.i586
os-prober-debuginfo-1.65-9.1.mga5.i586

#######################
Testing

1. In a KDE system which needs grub2 bootloader.
2. Install kcm-grub2 (if it is a UEFI system use the package 
   from 5/updates_testing)
3. In systemsettings -> startup & shutdown click left pane GRUB2 Bootloader
4. Enter PW twice (looks like another bug :\ )
5. Edit something e.g. Time delay before autoboot
6. 'Apply' it and when it says Successfully saved..... expand the details.
7. Note the message that contains:
 "line 79: blkid: command not found /usr/bin/os-prober: line 160: blkid:        command not found done "
8. Install the update package and repeat from #3
9  Note that the line79: blkid message should no longer be shown.

Assignee: zen25000 => qa-bugs

Comment 4 Lewis Smith 2016-03-09 21:49:59 CET
About to test M5 x64 real EFI hardware
Thanks Barry for your helpful Comment 3.

Recording installation of kcm-grub2 before trying the os-prober update, while I still have the evidence:-
 # urpmi kcm-grub2
which pulled out - alarming - grub2-efi. It went thus:
    $MIRRORLIST: media/core/release/xorriso-1.3.8-4.mga5.x86_64.rpm
    $MIRRORLIST: media/core/release/kcm-grub2-0.5.8-12.mga5.x86_64.rpm         
    $MIRRORLIST: media/core/updates/grub2-2.02-0.git9752.18.3.mga5.x86_64.rpm  
      1/3: grub2                 #############################################
      2/3: kcm-grub2             #############################################
      3/3: xorriso               #############################################
Remove pkg grub2-efi-2.02-0.git9752.18.3.mga5.x86_64.
      1/1: remove grub2-efi-2.02-0.git9752.18.3.mga5.x86_64

Following the advice in Comment 3.2 "Install kcm-grub2 (if it is a UEFI system use the package from 5/updates_testing)", I updated *just* that from Updates Testing to: kcm-grub2-0.5.8-12.1.mga5
Currently on LXDE desktop, so tried step 3 in MCC-Startup-Set up how the system starts ; and it seized up on the 1st screen - perhaps my special 10m grub2-efi wait. I will re-login with KDE and re-try.

CC: (none) => lewyssmith

Comment 5 Lewis Smith 2016-03-09 22:34:22 CET
Continuing logged in with KDE.

3. Tools->System Tools->System Settings->System Administration->Startup & Shutdown
5. Altered the timer; 'Probe for operating systems' already checked.
6. Apply.
'Saving Grub Settings' dialogue pops up. After a short time, this is overlayed by an error dialogue 'Failed to save Grub settings'
"Details
DBus Backend error: could not contact the helper. Connection error: . Message error: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."
but the former Saving dialogue still plods on for ? 10m.
When it dies naturally, I get NO 'Successfully saved' dialogue to expand the Details thereof.

My box has a unique malady whereby any reference to Grub, or running os-prober directly (which is presumably happening behind the scenes) takes 10 minutes. My guess for this Update test is that the KDE process described is losing patience too quickly, bombing out before os-prober has finished, which would probably yield the 'Successfully saved' dialogue.

FWIW
# os-prober               [runs a full 10 minutes before ...]
/dev/sda10:Korora release 20 (Peach):Fedora:linux
/dev/sda11:Mageia 4 (4):Mageia:linux
/dev/sda13:Mageia 5 (5):Mageia1:linux
/dev/sda14:LMDE MATE Edition (1):LinuxMint:linux
/dev/sda2@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
/dev/sda8:Manjaro Linux (15.12):ManjaroLinux:linux
/dev/sda9:openSUSE 12.3 (x86_64):SUSE:linux

[This installation is on /dev/sda12].
My guess is that I cannot test this update.
David Walser 2016-03-10 21:43:56 CET

Depends on: (none) => 17918

Comment 6 Lewis Smith 2016-03-15 20:32:06 CET
x64 EFI real hardware continued
BEWARE
The pre-update installation above in Comment 4 rendered my system unbootable.
Install update 17918 BEFORE trying this one.
Comment 7 Lewis Smith 2016-03-15 21:37:02 CET
Re-trying x64 EFI real hardware, KDE desktop.

Re Comment 4 & comment 6:
The fact that I had *updated* kcm-grub2 from 0.5.8-12 to 0.5.8-12.1 before starting out was too late: the damage had already been done by the installation of the old version. So if I had actually *installed* directly the new version, loss of the system would not of happened.
Worth noting that this time, with a restored system, I exceptionally specifically enabled in MCC 'Core Updates Testing' as an *installation* medium, then:
 # urpmi kcm-grub2
    rsync://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/5/x86_64/media/core/updates_testing/kcm-grub2-0.5.8-12.1.mga5.x86_64.rpm
gosod kcm-grub2-0.5.8-12.1.mga5.x86_64.rpm o /var/cache/urpmi/rpms                       
Paratoi...                       #######################################################
      1/1: kcm-grub2             #######################################################
worked fine, leaving grub2-efi intact:
 grub2-efi-2.02-0.git9752.18.3.mga5
 grub2-mageia-theme-2.02-0.git9752.18.3.mga5
 kcm-grub2-0.5.8-12.1.mga5

3. Tools->System Tools->System Settings->System Administration->Startup & Shutdown->GRUB2 Bootloader
5. Altered the timer; 'Probe for operating systems' already checked.
6. Apply.
Same consequences as in Comment 5: "Failed to save Grub settings" etc, and I guess (overlapping) 10 minute os-prober.

So, despite all the hassle, I confirm my assertion the my curious box prevents me from testing this update. Over to somebody else.
Comment 8 Lewis Smith 2016-03-16 17:50:41 CET
Testing os-prober functionality on real EFI x64 hardware.

BEFORE the update: os-prober-1.65-9.mga5
 # time os-prober
 /dev/sda10:Korora release 20 (Peach):Fedora:linux
 /dev/sda11:Mageia 4 (4):Mageia:linux
 /dev/sda13:Mageia 5 (5):Mageia1:linux
 /dev/sda14:LMDE MATE Edition (1):LinuxMint:linux
 /dev/sda2@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
 /dev/sda8:Manjaro Linux (15.12):ManjaroLinux:linux
 /dev/sda9:openSUSE 12.3 (x86_64):SUSE:linux

real	10m42.528s

AFTER the update: os-prober-1.65-9.1.mga5
 Results were essentially identical to those previously. This confirms at least that updated os-prober seems to function identically, and that the update causes no ill effect.
However, the essential test Comment 3.6-9 about 'blkid' remains to prove. Sorry cannot give the 'OK'.
Comment 9 James Kerr 2016-03-18 17:21:05 CET
Testing on mga5-64 with EFI

Installed - kcm-grub2-0.5.8-12.1.mga5.x86_64 from testing
Attempted to change the timeout before booting default
Saw the error message "line 79: blkid: command not found....

Installed - os-prober-1.65-9.1.mga5.x86_64 from testing
Changed timeout before booting default
The error message does not appear

Re-booted and the change in the timeout is effective.

OK for mga5-64

Whiteboard: (none) => MGA5-64-OK

Comment 10 James Kerr 2016-03-21 12:59:07 CET
Testing on mga5-32

Installed kcm-grub2
Attempted to change the timeout before booting default
Saw the message "line 79: blkid: command not found....

Installed os-prober-1.65-9.1 from testing
Changed the timeout before booting default from 10s to 20s
The previous error message does not appear
Instead the following error message appears:

"Failed to save GRUB settings.
DBus Backend error: could not contact the helper. 
Connection error: . Message error: Did not receive a reply. 
Possible causes include: the remote application 
did not send a reply, the message bus security policy blocked the reply, the 
reply timeout expired, or the network connection was broken."

However the change in timeout is effective and /etc/default/grub has:
GRUB_TIMEOUT=20

So the bug is fixed, but the new error message is misleading

Perhaps someone else should test to eliminate the possibility that the problem originates with my system.

I'm using kernel-server-4.4.6-1.mga5-1-1.mga5.i586

I did try with the versions of kcm-grub2 and grub2 from testing with the same results.

Changing back to a 10s timeout is also effective, but I see the same error message.

I'll leave it to a QA team leader to decide if this is OK or not.
Comment 11 James Kerr 2016-03-21 14:01:57 CET
Testing on mga5-64 BIOS using kernel-desktop-4.4.6

I get identical results to those reported in comment#10

I've removed the OK for mga5-64 pending a decision by a QA team leader as to the acceptability of this update.

The tests reported in comment#10 and this comment were made on the same hardware:

Mobo: ECS model: GeForce7050M-M v: 1.0
CPU:  Quad core AMD Phenom 9500 (-MCP-)

Whiteboard: MGA5-64-OK => (none)

Comment 12 James Kerr 2016-03-22 10:12:31 CET
As I reported in bug#17994, somehow I lost the bootloader entries for all but one of the 6 OS installations on this box.

This was almost certainly due to my error, but until I can sort out what went wrong and re-test, my testing reported in comment#10 and comment#11 should be ignored.
Comment 13 Barry Jackson 2016-03-22 13:52:45 CET
Did kcm-grub2 change GRUB_DISABLE_OS_PROBER=false in /etc/default/grub to 'true' by any chance?
Comment 14 James Kerr 2016-03-22 16:43:52 CET
Yes - at least something did! Can I just change it back by editing the file and then re-run drakboot to restore the other entries in the bootloader?
Comment 15 James Kerr 2016-03-22 16:59:30 CET
Something also changed GRUB_DISABLE_RECOVERY=false to true.
Comment 16 Barry Jackson 2016-03-22 17:40:38 CET
Just edit it back and run update-grub2 or update-grub (one is a symlink of the other).
Comment 17 Barry Jackson 2016-03-22 17:44:08 CET
I would ignore these odd things as I think kcm-grub2 is pretty much dead upstream.
As long as this main nasty is fixed so people don't break boot totally then I think it's enough.
It does not seem as though it will be ported to kf5, so it will die with Mga5 and be removed from Mga6.
Comment 18 Barry Jackson 2016-03-22 17:51:04 CET
That last comment was really aimed at the other kcm-grub2 bug of course not this one.
Comment 19 James Kerr 2016-03-22 18:24:36 CET
Thanks. Everything is now back to normal.

I've removed kcm-grub2. IMHO drakboot is all that is needed.
Comment 20 James Kerr 2016-03-24 16:11:00 CET
I have twice repeated my tests of this update as well as those for kcm-grub2 and grub2 and have been unable to reproduce the change in the line GRUB_DISABLE_OS_PROBER=false to true. Perhaps I had at some point inadvertently unchecked the option to "Probe for operating systems" in kcm-grub2.

The testing results that I reported in comment#9, comment#10 and comment#11 therefore stand.

A decision needs to be made as to whether or not this update is acceptable despite the new error message in kcm-grub2.
Comment 21 claire robinson 2016-03-24 16:19:50 CET
Barry what's your opinion on the dbus error in comment 10 please? Suspect it's not related but I've no way to check this myself atm.
Comment 22 Barry Jackson 2016-03-24 17:13:47 CET
I really have no idea - maybe that error would have been there before the update had it not been for the previous error?
I will try to reproduce in my Mga5 installation.
Comment 23 James Kerr 2016-03-24 17:33:43 CET
In case it helps:

The error message only appears on one of my systems - that used for comment#10 and comment#11. That system is multi-boot.

The system reported on in comment#9 has only mga5-64 and there is no error message with the new packages.
Comment 24 Barry Jackson 2016-03-24 17:56:46 CET
I just tested again in my Mga5 install with a clean user that I used for testing this originally and the 'details' output from kcm-grub2 shows no errors:

Generating grub configuration file ... Found theme: /boot/grub2/themes/maggy/theme.txt Found linux image: /boot/vmlinuz-desktop Found initrd image: /boot/initrd-desktop.img Found linux image: /boot/vmlinuz-4.1.15-desktop-2.mga5 Found initrd image: /boot/initrd-4.1.15-desktop-2.mga5.img Found linux image: /boot/vmlinuz-4.1.15-desktop-1.mga5 Found initrd image: /boot/initrd-4.1.15-desktop-1.mga5.img Found linux image: /boot/vmlinuz-4.1.13-desktop-2.mga5 Found initrd image: /boot/initrd-4.1.13-desktop-2.mga5.img Found linux image: /boot/vmlinuz-4.1.12-desktop-1.mga5 Found initrd image: /boot/initrd-4.1.12-desktop-1.mga5.img Found linux image: /boot/vmlinuz-4.1.8-desktop-1.mga5 Found initrd image: /boot/initrd-4.1.8-desktop-1.mga5.img Found linux image: /boot/vmlinuz-3.19.8-desktop-3.mga5 Found initrd image: /boot/initrd-3.19.8-desktop-3.mga5.img Found Mageia 6 (6) on /dev/sda5 Found Mageia 6 (6) on /dev/sda7 done


Maybe this only affects i586 - I don't have a 32 bit installation for testing.

I did a test build of the last updated build of kcm-grub2 (if I still have it) maybe you could test with that Jim? I will need to log out to find it.
Comment 25 Barry Jackson 2016-03-24 18:15:30 CET
OK please test by enabling this repo for i586:

http://mtf.no-ip.co.uk/pub/linux/barjac/distrib/5/i586/media/extra/release/

and install kcm-grub2

It is kcm-grub2-0.6.4-1.mga5.i586.rpm

To test x86_64 the repo is:

http://mtf.no-ip.co.uk/pub/linux/barjac/distrib/5/x86_64/media/extra/release/

If this works better then it would make sense to update to this version.

Don't forget to disable/remove those repos afterwards!
Comment 26 James Kerr 2016-03-26 15:26:06 CET
Testing on mga5-64

rpm -q grub2 os-prober kcm-grub2
grub2-2.02-0.git9752.18.4.mga5
os-prober-1.65-9.1.mga5
kcm-grub2-0.6.4-1.mga5

The timeout change is made, but I get the same error message. I'll attach a screenshot.

I tested both with the kernel 4.4.6 update candidate and with the latest official kernel 4.1.15-2
Comment 27 James Kerr 2016-03-26 15:30:36 CET
Created attachment 7596 [details]
kcm error

Screenshot of the error message referred to in comment#26
Comment 28 James Kerr 2016-03-26 16:40:42 CET
Testing on mga5-32 

$ uname -r
4.4.6-server-1.mga5

$ rpm -q grub2 os-prober kcm-grub2
grub2-2.02-0.git9752.18.4.mga5
os-prober-1.65-9.1.mga5
kcm-grub2-0.6.4-1.mga5

The results are identical to those reported in comment#26 for mga5-64
Comment 29 William Kenney 2016-03-26 19:41:26 CET
In VirtualBox, M5, KDE, 32-bit

Package(s) under test:
os-prober kcm-grub2

default install of os-prober

[root@localhost wilcal]# urpmi os-prober
Package os-prober-1.65-9.mga5.i586 is already installed
[root@localhost wilcal]# urpmi kcm-grub2
Package kcm-grub2-0.5.8-12.1.mga5.i586 is already installed

systemsettings -> startup & shutdown -> GRUB2 Bootloader
Change boot delay to 20s
Apply
Details contain:
"line 79: blkid: command not found /usr/bin/os-prober: line 160: blkid: command not found done"
system reboots ok.

install os-prober from updates_testing

[root@localhost wilcal]# urpmi os-prober
Package os-prober-1.65-9.1.mga5.i586 is already installed
[root@localhost wilcal]# urpmi kcm-grub2
Package kcm-grub2-0.5.8-12.1.mga5.i586 is already installed

systemsettings -> startup & shutdown -> GRUB2 Bootloader
Change boot delay to 15s
Apply
Details does not contain:
"line 79: blkid: command not found /usr/bin/os-prober: line 160: blkid: command not found done"
system reboots ok.

CC: (none) => wilcal.int

Comment 30 William Kenney 2016-03-26 20:01:55 CET
In VirtualBox, M5, KDE, 64-bit

Package(s) under test:
os-prober kcm-grub2

default install of os-prober

[root@localhost wilcal]# urpmi os-prober
Package os-prober-1.65-9.mga5.x86_64 is already installed
[root@localhost wilcal]# urpmi kcm-grub2
Package kcm-grub2-0.5.8-12.1.mga5.x86_64 is already installed

systemsettings -> startup & shutdown -> GRUB2 Bootloader
Change boot delay to 20s
Apply
Details contain:
"line 79: blkid: command not found /usr/bin/os-prober: line 160: blkid: command not found done"
system reboots ok.

install os-prober from updates_testing

[root@localhost wilcal]# urpmi os-prober
Package os-prober-1.65-9.1.mga5.x86_64 is already installed
[root@localhost wilcal]# urpmi kcm-grub2
Package kcm-grub2-0.5.8-12.1.mga5.x86_64 is already installed

systemsettings -> startup & shutdown -> GRUB2 Bootloader
Change boot delay to 15s
Apply
Details does not contain:
"line 79: blkid: command not found /usr/bin/os-prober: line 160: blkid: command not found done"
system reboots ok.
Comment 31 William Kenney 2016-03-26 20:02:38 CET
Looks good to me David.
What you say?
Comment 32 James Kerr 2016-03-26 20:36:11 CET
Have you tested on a multi-boot system? The failure message that I saw only occurs on multi-boot systems.
Comment 33 William Kenney 2016-03-26 21:32:24 CET
(In reply to James Kerr from comment #32)

> Have you tested on a multi-boot system? The failure message that I saw only
> occurs on multi-boot systems.

No, only in a Vbox Client but the error occurred there.
Comment 34 James Kerr 2016-03-26 23:03:45 CET
I'm referring to the new failure message that I reported in comment#10.
Comment 35 William Kenney 2016-03-26 23:09:42 CET
(In reply to James Kerr from comment #34)

> I'm referring to the new failure message that I reported in comment#10.

No, I didn't see that. I don't have a multi OS install sorry.
You may find that not many people will be able to duplicate this bug.
Comment 36 Lewis Smith 2016-03-27 20:54:31 CEST
I was going to 'advisory' this, but prefer that it is clarified first.

It looks from Bill's testing Comment 29 Comment 30 that this might justify both 32 & 64 bit OKs - except that it was VBox, and real hardware is better for this one.

James' problem in Comment 10 is identical to what I had earlier reported in Comment 5. His result at least worked OK; but we are swapping one error msg for  (sometimes) another which certainly implies that it did *not* work:
 https://bugs.mageia.org/attachment.cgi?id=7596

It looks as if Barry's Comment 25 updates just
 kcm-grub2-0.5.8-12.1.mga5 to
 kcm-grub2-0.6.4-1.mga5
which is not part of this os-prober update. If this disconcerting error stems from kcm-grub2, I think we should at least let this os-prober update out. And return if necessary to kcm-grub2.
Could we add to the update a warning about the potential error msg but say to ingore it?

Can Barry comment?
Comment 37 Lewis Smith 2016-03-27 21:21:49 CEST
Retro-testing x64 EFI real hardware, re Comment 7

Thanks to James' Comment 10, which prompted me to look where he said:
"However the change in timeout is effective and /etc/default/grub has:
GRUB_TIMEOUT=[9]"
it seems that despite my previous gloom, my Grub update 10 -> 9 secs *was* implemented. Which parallels exactly James' results.
And makes me more confident that we should push this update with a suitable warning ("You may get this error, but should ignore it") in it. If we can do that.
Dave Hodgins 2016-03-31 19:31:29 CEST

Keywords: (none) => validated_update
Whiteboard: (none) => advisory MGA5-64-OK MGA5-32-OK
CC: (none) => davidwhodgins, sysadmin-bugs

Comment 38 Mageia Robot 2016-03-31 22:23:14 CEST
An update for this issue has been pushed to the Mageia Updates repository.

http://advisories.mageia.org/MGAA-2016-0056.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.