System

Regenerate a GRUB device.map file

device.map maps hard disk devices to the device names GRUB recognizes. It is created whenever the operating system is installed. Example error involving this file:

Trying to guess BIOS devices...

The error above occurs while booting Linux because device.map is missing. Repair or recreate device.map as follows:

  1. Back up the old device.map first, for safety, with:
#mv /boot/grub/device.map /boot/grub/device.map.bak
  1. Run GRUB to create device.map with the command below.
#grub --device-map=/boot/grub/device.map
  1. The following messages appear, followed by the GRUB prompt:
GNU GRUB  version 0.95  (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported.  For the first word, TAB
lists possible command completions.  Anywhere else TAB lists the possible
completions of a device/filename.]
grub>
  1. Enter quit to leave GRUB.
EOF.← Back to articles