Page 1 of 1

[SOLVED] Duplicate entries in grub after upgrade

PostPosted: Mar 6th, '21, 08:32
by MagicD3VIL
Greetings,
for some reason after the upgrade, I have duplicate entries in my grub menu which currently sits at:
  • Mageia
  • Mageia
  • Mageia 7
  • Windows 10
  • Windows 8
  • Windows 8
  • Windows 10
  • Windows 8
  • Windows 7

This is the output of when I run "sudo update-grub2"
Code: Select all
Generating grub configuration file ...
Found theme: /boot/grub2/themes/maggy/theme.txt
Found linux image: /boot/vmlinuz-5.10.19-desktop-1.mga8
Found initrd image: /boot/initrd-5.10.19-desktop-1.mga8.img
Found linux image: /boot/vmlinuz-desktop
Found initrd image: /boot/initrd-desktop.img
Found linux image: /boot/vmlinuz-5.10.19-desktop-1.mga8
Found initrd image: /boot/initrd-5.10.19-desktop-1.mga8.img
Found linux image: /boot/vmlinuz-desktop
Found initrd image: /boot/initrd-desktop.img
Found linux image: /boot/vmlinuz-5.10.19-desktop-1.mga8
Found initrd image: /boot/initrd-5.10.19-desktop-1.mga8.img
Found linux image: /boot/vmlinuz-desktop
Found initrd image: /boot/initrd-desktop.img
Mar 06 07:16:17 | DM multipath kernel driver not loaded
Found Windows 10 on /dev/sda1
Found Windows 8 on /dev/sdb1
Found Windows 8 on /dev/sdb2
Mar 06 07:16:23 | DM multipath kernel driver not loaded
Found Windows 10 on /dev/sda1
Found Windows 8 on /dev/sdb1
Found Windows 8 on /dev/sdb2
Mar 06 07:16:28 | DM multipath kernel driver not loaded
Found Windows 10 on /dev/sda1
Found Windows 8 on /dev/sdb1
Found Windows 8 on /dev/sdb2
done


I'm also attaching the grub config (it's the same one that I've used before upgrading to mga8), no idea why it's an issue after the upgrade xD Maybe because of a newer version of grub? Also why it's not registering the Mageia entry as Mageia 8 but still as Mageia 7? :?

Cheers

Re: Duplicate entries in grub after upgrade

PostPosted: Mar 11th, '21, 13:42
by MagicD3VIL
Greetings,
it seems that the upgrade left some duplicate scripts in the "/etc/grub.d/" folder so I removed those scripts and then reinstalled them via "urpmi --replacepkgs grub2-common". Duplicate scripts made grub to make duplicate entries so removing them and reinstalling fixed the issue.

The source that helped me to fix this

Marking as solved.

Re: [SOLVED] Duplicate entries in grub after upgrade

PostPosted: Mar 11th, '21, 15:04
by morgano
Nice you found and could fix the culprit, well done!

Now, how cold this fault happen?
How did you upgrade?
Is there a log?

Re: [SOLVED] Duplicate entries in grub after upgrade

PostPosted: Mar 11th, '21, 15:12
by MagicD3VIL
I upgraded via URPMI, it seems that it did not clean the old configs and just added new (duplicate) ones with a higher number.

By the way, before I reinstalled the grub2-common the way as I mentioned in my previous post, I tried removing the configs and copying the ones from the "/etc/grub.d/backup/etc_grub_d/" but after running "update-grub" it reported errors in those configs so I just removed the configs again and reinstalled the grub2-common.