How to fix grub2-mkconfig and Yast2-Boot Loader from running too long in 12.2

I thought this was necessary to post here due to the fact that there is a bug in /boot/grub2/device.map file.

If any of you have experienced grub2-mkconfig -o /boot/grub2/grub.cfg or Yast2-Boot Loader taking several minutes to complete.

The following steps will resolve your problem:

  1. Open /boot/grub2/device.map with your favorite editor
  2. Navigate to the line and remove (fd0) /dev/fd0
  3. Resave the changes and close the editor
  4. Open konsole or xterm and type: grub2-mkconfig -o /boot/grub2/grub.cfg
  5. Then run Yast2-Boot Loader

The grub2-mkconfig command will run under .07 - 10ms and Yast2-Boot Loader will run several seconds instead of several minutes.

The Bugzilla reference is: https://bugzilla.novell.com/show_bug.cgi?id=774560

This will be fixed in a future release.

I have also posted this as a “howto” in the Unreviewed How To /FaQs section.

I never had that problem. Perhaps that’s because I don’t have a floppy device, so a read of fd0 via a bios call is likely to fail quickly.

In my case, the device.map file also has an entry for the USB from which I installed. I did delete that, though it has never caused problems. As long as people are editing that file, I suggest deleting any USB entry from a USB install, if there is one and if they know how to recognize it. In my case, the usb drive is a sandisk cruzer, and the device.map entry clearly identified that.

The odd thing is that I don’t have a floppy. I have a floppy setting in my BIOS but it’s always disabled.
Perhaps “hwinfo” has detected the hardware controller pins?

However, they are seriously considering getting rid of the device.map file completely.

Whenever I ran grub2-mkconfig, the probe put a block on fd0 /dev/fd0 for 12s. That’s a very long time considering the probe should take milliseconds.

My system has no hardware support for a physical floppy, though it would allow a USB floppy drive. Presumably different BIOSes handle a floppy read differently.

I’m glad that we were finally able to resolve this issue with my motherboard. Maybe it’s time to upgrade the old beast.
Next year will be the year when Haswell is released.

Just a note in case any one else runs up against this same issue – you don’t even have to have a floppy related entry in the device.map file in order to generate the same symptoms; having floppy support enabled in your motherboard’s BIOS can result in the same problem. Disabling that restores normal working behaviour of the Yast Bootloader module (I had never noticed any slow downs via grub2-mkconfig)

There is talk about completely removing the device.map file in future releases of grub2.