Update-grub error: check your device.map

Hey,

I have a dual-boot system with Manjaro and Windows. I did a clean reinstall of the “October” Windows update which obviously screwed with grub.

I chrooted into manjaro from a live usb, reinstalled grub and ran update-grub (I followed these instructions: https://wiki.manjaro.org/index.php/Restore_the_GRUB_Bootloader )
My problem is: every time I run update-grub, I get the following error:

[manjaro grub]# update-grub 
Generating grub configuration file ...
Found background: /usr/share/grub/background.png
grub-probe: error: cannot find a GRUB drive for /dev/sdb1.  Check your device.map.
done

For reference, sdb is the USB stick.
I tried manually adding device.map to /boot/grub/ containing (hd1) /dev/sdb but that didn’t help. Adding to that, update-grub takes about 10 minutes to get to the error message, before that it’s stuck at “Found background: /usr/share/grub/background.png” (this is only a secondary problem tho).

Any help is much appreciated!

lsblk output:

[manjaro@manjaro ~]$ lsblk -f
NAME   FSTYPE   LABEL             UUID                                 FSAVAIL FSUSE% MOUNTPOINT
loop0  squashfs                                                              0   100% /run/miso/sfs/livefs
loop1  squashfs                                                              0   100% /run/miso/sfs/mhwdfs
loop2  squashfs                                                              0   100% /run/miso/sfs/desktopfs
loop3  squashfs                                                              0   100% /run/miso/sfs/rootfs
sda                                                                                   
├─sda1 ntfs     Wiederherstellung AE06874C0687148D                                    
├─sda2 vfat                       0087-D939                              63.5M    34% /mnt/boot
├─sda3                                                                                
├─sda4 ntfs                       FEA4497DA4493983                                    
├─sda5 swap                       654efa9d-b9f5-4309-bdba-f981768709fa                
├─sda6 ext4                       bb4b4fc9-ee4f-464f-a4e4-e35b1420572d      4G    78% /mnt
└─sda7 ext4                       dca34fbc-92da-4c8b-96b0-bdbdd124711d   21.3G    57% /mnt/home
sdb    iso9660  MJRO1802          2019-01-03-18-10-47-00                              
├─sdb1 iso9660  MJRO1802          2019-01-03-18-10-47-00                     0   100% /run/miso/bootmnt
└─sdb2 vfat     MISO_EFI          8FC1-FD6D  

grub.cfg:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="${saved_entry}"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

set menu_color_normal=light-gray/black
set menu_color_highlight=green/black

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod ext2
set root='hd0,gpt6'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt6' --hint-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6  bb4b4fc9-ee4f-464f-a4e4-e35b1420572d
else
  search --no-floppy --fs-uuid --set=root bb4b4fc9-ee4f-464f-a4e4-e35b1420572d
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
insmod part_gpt
insmod ext2
set root='hd0,gpt6'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt6' --hint-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6  bb4b4fc9-ee4f-464f-a4e4-e35b1420572d
else
  search --no-floppy --fs-uuid --set=root bb4b4fc9-ee4f-464f-a4e4-e35b1420572d
fi
insmod png
background_image -m stretch /usr/share/grub/background.png
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/01_menu_auto_hide ###
if [ "${boot_success}" = "1" -o "${boot_indeterminate}" = "1" ]; then
  set last_boot_ok=1
else
  set last_boot_ok=0
fi

# Reset boot_indeterminate after a successful boot
if [ "${boot_success}" = "1" ] ; then
  set boot_indeterminate=0
# Avoid boot_indeterminate causing the menu to be hidden more then once
elif [ "${boot_indeterminate}" = "1" ]; then
  set boot_indeterminate=2
fi
set boot_success=0
save_env boot_success boot_indeterminate

if [ x$feature_timeout_style = xy ] ; then
  if [ "${menu_show_once}" ]; then
    unset menu_show_once
    save_env menu_show_once
    set timeout_style=menu
    set timeout=60
  elif [ "${menu_auto_hide}" -a "${last_boot_ok}" = "1" ]; then
    set orig_timeout_style=${timeout_style}
    set orig_timeout=${timeout}
    if [ "${fastboot}" = "1" ]; then
      # timeout_style=menu + timeout=0 avoids the countdown code keypress check
      set timeout_style=menu
      set timeout=0
    else
      set timeout_style=hidden
      set timeout=1
    fi
  fi
fi
### END /etc/grub.d/01_menu_auto_hide ###

### BEGIN /etc/grub.d/10_linux ###

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

### BEGIN /etc/grub.d/60_memtest86+ ###
### END /etc/grub.d/60_memtest86+ ###
1 Like

You have a separate boot partition in fat format?
And this system is in bios-legacy/msdos?

If unsure, from a livecd, provide output from terminal

sudo parted -l
sudo blkid

Go to /dev/sda6 (your manjaro partition) in file mananger and get contents of /etc/fstab

1 Like

I’m on mobile right now, I have the boot partition because I had windows installed and used the existing boot partition. It’s definitely in UEFI mode.

Regarding the boot partition, lsblk says vfat, gparted says fat32, I don’t know if there is a difference between the two.

Back home now, I reconnected my other HDDs so sda is now sdb, here is my fstab:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=0087-D939                            /boot/efi      vfat    defaults,noatime 0 2
UUID=654efa9d-b9f5-4309-bdba-f981768709fa swap           swap    defaults,noatime,discard 0 2
UUID=bb4b4fc9-ee4f-464f-a4e4-e35b1420572d /              ext4    defaults,noatime,discard 0 1
UUID=dca34fbc-92da-4c8b-96b0-bdbdd124711d /home          ext4    defaults,noatime,discard 0 2
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0

parted -l:

Model: ATA WDC WD20EARS-00M (scsi)
Disk /dev/sda: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  2000GB  2000GB  primary  ntfs         boot


Model: ATA Samsung SSD 840 (scsi)
Disk /dev/sdb: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system     Name                          Flags
 1      1049kB  524MB  523MB   ntfs            Basic data partition          hidden, diag
 2      524MB   629MB  105MB   fat32           EFI system partition          boot, esp
 3      629MB   646MB  16.8MB                  Microsoft reserved partition  msftres
 4      646MB   157GB  157GB   ntfs            Basic data partition          msftdata
 5      157GB   161GB  4194MB  linux-swap(v1)
 6      161GB   188GB  26.2GB  ext4
 7      188GB   250GB  62.4GB  ext4


Model: ATA WDC WD30EZRX-22D (scsi)
Disk /dev/sdc: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                  Flags
 1      1049kB  135MB   134MB   ntfs                               msftdata
 2      135MB   3001GB  3000GB  ntfs         Basic data partition  msftdata


Model: ATA ST3000DM001-1CH1 (scsi)
Disk /dev/sdd: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  3001GB  3001GB  ntfs               msftdata


Model:  Patriot Memory (scsi)
Disk /dev/sde: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 2      2143MB  2148MB  4194kB  primary               esp

blkid:

/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/sda1: LABEL="Volume" UUID="F02EEB152EEAD39E" TYPE="ntfs" PTTYPE="atari" PARTUUID="ffe4cb82-01"
/dev/sdb1: LABEL="Wiederherstellung" UUID="AE06874C0687148D" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="0880c7bc-923a-4059-a378-d87e062d02e1"
/dev/sdb2: UUID="0087-D939" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="3b158948-3ff5-4676-8cfc-674ec6f8c3ca"
/dev/sdc1: UUID="57C5983D15ADE347" TYPE="ntfs" PARTUUID="d472c149-74c4-4156-a6d2-e467cb2a9b0f"
/dev/sdc2: LABEL="Volume" UUID="6C4044144043E384" TYPE="ntfs" PTTYPE="atari" PARTLABEL="Basic data partition" PARTUUID="241d1f17-8104-4acf-8312-88e04b49af6a"
/dev/sdd1: LABEL="Seagate" UUID="1B65656766FB8D3B" TYPE="ntfs" PTTYPE="atari" PARTUUID="947b1647-8433-4b76-a301-0c91e02897f0"
/dev/sdb3: PARTLABEL="Microsoft reserved partition" PARTUUID="f010c87d-263f-4fe6-9146-7b44020a88d6"
/dev/sdb4: UUID="FEA4497DA4493983" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="cfe38322-5f16-417e-a1c3-b6b356b364f2"
/dev/sdb5: UUID="654efa9d-b9f5-4309-bdba-f981768709fa" TYPE="swap" PARTUUID="bf7a3dee-0c6e-4ab3-94c5-218610f69b85"
/dev/sdb6: UUID="bb4b4fc9-ee4f-464f-a4e4-e35b1420572d" TYPE="ext4" PARTUUID="0bc53f71-2a3d-453a-aadf-1774d3b56268"
/dev/sdb7: UUID="dca34fbc-92da-4c8b-96b0-bdbdd124711d" TYPE="ext4" PARTUUID="7979cb57-048b-419e-84db-df7f33b1f8b1"
/dev/sde1: UUID="2019-01-03-18-10-47-00" LABEL="MJRO1802" TYPE="iso9660"
/dev/sde2: SEC_TYPE="msdos" LABEL_FATBOOT="MISO_EFI" LABEL="MISO_EFI" UUID="8FC1-FD6D" TYPE="vfat"

for good measure, gparted screenshot:

I’m beginning to think it’s a problem with my USB stick (unfortunately I don’t have another one to test right now), with all disks connected the error message still says sde1:

[manjaro /]# update-grub 
Generating grub configuration file ...
Found background: /usr/share/grub/background.png
Found linux image: /boot/vmlinuz-4.14-x86_64
Found initrd image: /boot/initramfs-4.14-x86_64.img
Found initrd fallback image: /boot/initramfs-4.14-x86_64-fallback.img
grub-probe: error: cannot find a GRUB drive for /dev/sde1.  Check your device.map.
done

windows 10 has blocked or reserved partition /boot/efi

Can you try this method and see if you can boot into Manjaro installed partition?

You most likely will have to use the [More Complicated Setup] section to boot as your grub.cfg is messed up by the chroot (Restore the grub bootloader) method you attempted earlier. {if you did not attempt this, the [Simple First Start] will do}

Also you also had a boot flag in sda which is a msdos disk in your uefi system. What is this sda disk which is in ntfs format?

If you can boot up Manjaro, do all the commands there including the 2 (additional uefi commands) in that link.

Oh… you mounted sdb2 ($esp) as /mnt/boot.
It should be /mnt/boot/efi. I think that’s where your problem lies when you chroot.
But that’s done. Let’s do it the link way without chroot this time.

Good luck.

ps: reminder - start your install media in uefi mode.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.