Bug 18115 - grub2 os-prober detects other Mageia installations with release of installed system
Summary: grub2 os-prober detects other Mageia installations with release of installed ...
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: has_procedure mga5-64-ok MGA5-32-OK a...
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2016-04-03 14:24 CEST by Florian Hubold
Modified: 2016-04-21 16:53 CEST (History)
3 users (show)

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


Attachments

Description Florian Hubold 2016-04-03 14:24:11 CEST
Description of problem:

grub2 always displayed my mga6 dev1 install wrong as "Mageia 5". After a short discussion with Barry, found the issue - /lib/os-probes/mounted/90linux-distro will always use the value for release version of the currently running system for any Mageia installation it finds.

This should fix it:

[doktor5000@Mageia5]â[14:21:55]â[~] diff -u /lib/os-probes/mounted/90linux-distro~ /lib/os-probes/mounted/90linux-distro
--- /lib/os-probes/mounted/90linux-distro~      2015-09-29 13:15:20.000000000 +0200
+++ /lib/os-probes/mounted/90linux-distro       2016-04-03 14:11:33.256633605 +0200
@@ -27,7 +27,7 @@
        # mandrake-release, so check their files first.
        elif [ -e "$dir/etc/mageia-release" ]; then
                short="Mageia"
-               long=$(. /etc/os-release; echo $PRETTY_NAME)
+               long=$(. "$dir/etc/os-release"; echo $PRETTY_NAME)
        elif [ -e "$dir/etc/altlinux-release" ]; then
                short="ALTLinux"
                long="$(cat "$dir/etc/altlinux-release")"
Comment 1 Barry Jackson 2016-04-03 20:58:28 CEST
Please test os-prober-1.65-9.2.mga5 in 5/updates_testing,
as follows:
Install updated package
Run update-grub
Re-boot and check the menu entries.

Source RPM: grub2 => os-prober

Comment 2 Barry Jackson 2016-04-04 01:19:24 CEST
Fixed in Cauldron/Mga6
Comment 3 Florian Hubold 2016-04-05 00:25:49 CEST
(In reply to Barry Jackson from comment #1)
> Please test os-prober-1.65-9.2.mga5 in 5/updates_testing,

You should probably assign this to QA to get this pushed ;)
update-grub looks fine, will test the actual entries in bootmenu when I reboot.

Status: NEW => ASSIGNED
CC: (none) => doktor5000

Comment 4 Barry Jackson 2016-04-05 23:28:30 CEST
##########################
Update Advisory

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

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

This update fixes an issue where multiple installs of Mageia were all shown in the grub2 menu as being of the same release as the system which created the grub2 menu.

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

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

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

Florian has already confirmed that this fixes the problem, however to test:

1. Use a machine with both Mga5 and Mga6-dev1 installed that uses grub2 as bootloader.
2. In the Mga5 system run update-grub and note the console output and the menu options offered on reboot.
3. If the Mga6 system is correctly detected then it will only be possible to test for regressions. (I did not see this bug on an UEFI system but Florian did on a PC-BIOS machine). If the Mga6 system is shown as Mga5 then you can fully test this update.
4. Update to the new package fron 5/updates_testing and again run update-grub.
5. Note the terminal output.
6. Check that Mageia 6 entry is correctly displayed in the grub2 menu.
Barry Jackson 2016-04-05 23:29:43 CEST

Assignee: zen25000 => qa-bugs

Comment 5 Lewis Smith 2016-04-08 21:44:36 CEST
Was going to try M5 x64 real EFI hardware, but...
I have 3 Mageia installations:
- sda11 MGA4
- sda12 MGA5 (my normal system, that at the top of its Grub boot menu)
- sda13 MGA5 (the German Special)
The normal system's Grub2 boot menu starts with Mageia, then Advanced for same; lower down it correctly show the other two Mageias *correctly numbered, 4 or 5*, with their partitions, plus Advanced for each.

Since the bug is more about the Grub2 menu than os-prober, and mine does not show the fault described, I cannot properly test this update.
Barry's Comment 4 Step 3 notes the same thing, so I might just test for 'no regressions'.

FWIW with pre-update os-prober-1.65-9.1.mga5, its output is:
 /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
[It never shows the running OS, here Mageia 5 on sda12]

CC: (none) => lewyssmith

Comment 6 Lewis Smith 2016-04-08 22:24:34 CEST
Testing 'no regression' only x64 real EFI hardware

BEFORE the update: see Comment 5, Mageia versions correctly shown anyway.

Updated to: os-prober-1.65-9.2.mga5

# update-grub
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-3.19.8-desktop-3.mga5
Found initrd image: /boot/initrd-3.19.8-desktop-3.mga5.img
Found Korora release 20 (Peach) on /dev/sda10
Found Mageia 4 (4) on /dev/sda11
Found Mageia 5 (5) on /dev/sda13
Found LMDE MATE Edition (1) on /dev/sda14
Found Windows Boot Manager on /dev/sda2@/EFI/Microsoft/Boot/bootmgfw.efi
Found Manjaro Linux (15.12) on /dev/sda8
Found openSUSE 12.3 (x86_64) on /dev/sda9
done
[took the usual 10 minutes for me]

Rebooted. The Grub2 menu was as before, with the other Mageia 4 & 5 shown with their correct versions (and  partitions). No reversion.
But this really needs OKing by someone who sees the stated menu problem. If not, Florian's own good result should suffice: 32 or 64 bit?
Comment 7 James Kerr 2016-04-09 11:08:35 CEST
I am unable to reproduce this bug on a legacy PC BIOS system.

I have 32 bit and 64 bit installs of mga3, mga4 and mga5 on this system and all are properly identified in the menu as, for example "Mageia 3 on /dev/sda1"

After installing os-prober-1.65-9.2.mga5 and executing update-grub, nothing has changed.

So I can confirm only that there are no regressions.
claire robinson 2016-04-19 10:14:53 CEST

Whiteboard: (none) => has_procedure mga5-64-ok

Comment 8 Lewis Smith 2016-04-19 21:06:52 CEST
In the light of Comment 4:
> Florian has already confirmed that this fixes the problem
and Comment 7, I am OKing this for 32-bit & validating it.

Update validated.
SRPM: os-prober-1.65-9.2.mga5.src.rpm
Advisory text in Comment 4. Remains to be uploaded.

Keywords: (none) => validated_update
Whiteboard: has_procedure mga5-64-ok => has_procedure mga5-64-ok MGA5-32-OK
CC: (none) => sysadmin-bugs

Comment 9 Lewis Smith 2016-04-19 21:24:14 CEST
Advisory uploaded.

Whiteboard: has_procedure mga5-64-ok MGA5-32-OK => has_procedure mga5-64-ok MGA5-32-OK advisory

Comment 10 Mageia Robot 2016-04-21 16:53:02 CEST
An update for this issue has been pushed to the Mageia Updates repository.

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

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


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