Bug 17000

Summary: bootloader-config removes GRUB device.map file when removing a kernel
Product: Mageia Reporter: David Walser <luigiwalser>
Component: RPM PackagesAssignee: Thierry Vignaud <thierry.vignaud>
Status: RESOLVED DUPLICATE QA Contact:
Severity: critical    
Priority: Normal    
Version: 5   
Target Milestone: ---   
Hardware: i586   
OS: Linux   
Whiteboard:
Source RPM: drakxtools-16.104-1.mga5.src.rpm CVE:
Status comment:

Description David Walser 2015-10-22 21:30:42 CEST
Multiple times on our Mageia 5 workstations at work, I have seen /boot/grub/device.map disappear, renamed to device.map.old (with a slightly older, but empty, device.map.backup also present).  It has happened again, and checking journalctl, I can match up the timestamps on device.map.old with some log messages.  The modification time matches up with these:
bootloader-config[2752]: writing grub config to /boot/grub/menu.lst
[RPM][1991]: install kernel-server-4.1.8-1.mga5-1-1.mga5.i586: success

That doesn't appear to the problem, as the contents of the file are still good.

The ctime and access time (ctime is changed when a file is renamed) match with:
bootloader-config[2318]: writing grub config to /boot/grub/menu.lst
[RPM][2305]: erase kernel-server-3.19.8-3.mga5-1-1.mga5.i586: success

So, that appears to be when it misbehaves.

With device.map gone, future kernel installs don't fully work and you can't run drakboot --boot.

Reproducible: 

Steps to Reproduce:
Comment 1 Thierry Vignaud 2016-07-16 09:17:05 CEST
Can you test the patches in bug #16918 please? Thanks
At least a tester!

*** This bug has been marked as a duplicate of bug 16918 ***

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

Comment 2 David Walser 2016-07-17 18:44:36 CEST
While I had seen this happen multiple times, I haven't seen it in a while, and I have removed some kernels.  I don't have a way to reliably reproduce it, so I can't test for it.  The description of the patches sounds legitimate though, so feel free to commit them.