TIP: Resolving grub-probe warning message on libata transition
I have been using my hard drive since last 2 years for various trial and error purpose (don’t we all love that!). I keep shifting my hard drive to different types of machines belonging to different architectures. One fine day I suddenly started noticing the following message (in red) whenever I use to upgrade/install/un-install a kernel:
Running depmod.
Running postinst hook script update-grub.
Searching for GRUB installation directory ... found: /boot/grub
warning: grub-probe can't find drive for /dev/sda1.
Please check /boot/grub/device.map, you might have to regenerate it with grub-mkdevicemap.
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.30-1-test1
Found kernel: /boot/vmlinuz-2.6.30-1-atom-test2
Found kernel: /boot/vmlinuz-2.6.30-1-686
Updating /boot/grub/menu.lst ... done
Basically any program that initiates a GRUB hook, causes the to generate above message.
The Solution
All you need to do to fix the above message is to issue the following command:
grub-mkdevicemap
which basically re-generates the /boot/grub/device.map file for you.
Earlier the contents of this file were:
debian:~# less /boot/grub/device.map
(hd0) /dev/hda
(hd1) /dev/hdb
(hd2) /dev/hdc
After the fix the contents were:
debian:~# less /boot/grub/device.map
(hd0) /dev/sda
Basically my system did a transition from hdX->sdX and the GRUB device map file became invalid. Also on my earlier system I had 3 IDE hard drives but on my new system I just had one IDE hard drive which uses the newer LIBATA driver in the kernel. More on this “libata” stuff in my future posts.
That’s it!


Email Subscription









August 18th, 2009 at 7:20 am
Thank you so much I have been to at least 10 sites looking for this?
Where do you guys get this info from?
Do not say man grub!!
Reply to this comment
Admin Reply:
September 23rd, 2009 at 10:59 pm
No not from “man grub”. Little bit of experience and some guessing work helps..:)
Reply to this comment
January 1st, 2010 at 9:48 am
Thanks much! I’ve searched countless forums, some of them more than once.. This helps. Happy New Year!
Reply to this comment