broken system after update: stuck at maintenance mode, no keyboard, livecd chroot update-grub fails "can not find GRUB drive check your device.map"

Hello

I have build a nas (dell t20). Last update failed and I stupidly rebooted the machine and it did not boot. It stuck at maintance mode asking password but keyboard is not functioning. I followed the Manjaro Rescue Grub Bootloader. I checked the logs in livecd chroot environment, seen some kernel write errors at /boot partition which is on a usb stick. I changed the usb drive and updated /etc/fstab under manjaro-chroot. Problem still persist, basicall grub-install succeeds but update-grub fails. I do not know why. Grub message is cryptic, there is no device.map under /boot/grup and I cound not find the command to generate it if there is.

I have checked/read almost all post that has device.map in it. I have not seen a straight answer to the problem. Most posts referece the
Reference post but I could not follow it mostly since the livecd grub console commands fail in my environment. (such as search.files /etc/manjaro-release root etc)

/root and other partitions are intact, is there a way to boot into this system again?

lsblk, blkid, fstab, update-grub outputs are below.
My /boot and /boot/efi mount are on two different partitions on a single usb drive. I had to use usb drive since dell t20 does not boot from pci-e nvme drive. /dev/sdf1 and /dev/sdf2 drives are /boot and /boot/efi drives.

update-grup complaines about /dev/sdg1 but it is the liveusb itself. I am sure that I gave the commands in chroot enviroment with correct mount points. I basically used manjaro-chroot

Any help much appreciated.

LSBLK OUTPUT

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0         7:0    0  17.9M  1 loop 
loop1         7:1    0 480.3M  1 loop 
loop2         7:2    0   1.4G  1 loop 
loop3         7:3    0 510.7M  1 loop 
sda           8:0    0   1.8T  0 disk 
`-sda1        8:1    0   1.8T  0 part /storage/parity/disk0
sdb           8:16   0   1.8T  0 disk 
`-sdb1        8:17   0   1.8T  0 part /storage/data/disk1
sdc           8:32   0   1.8T  0 disk 
`-sdc1        8:33   0   1.8T  0 part /storage/data/disk2
sdd           8:48   0 931.5G  0 disk 
`-sdd1        8:49   0 931.5G  0 part /storage/data/disk3
sde           8:64   0   3.7T  0 disk 
`-sde1        8:65   0   3.7T  0 part /storage/usb/disk1
sdf           8:80   1  14.3G  0 disk 
|-sdf1        8:81   1     4G  0 part /boot
`-sdf2        8:82   1  10.3G  0 part /boot/efi
sdg           8:96   1  14.7G  0 disk 
|-sdg1        8:97   1   2.4G  0 part 
`-sdg2        8:98   1     4M  0 part 
nvme0n1     259:0    0 119.2G  0 disk 
`-nvme0n1p1 259:1    0 119.2G  0 part /

BLKID OUTPUT

/dev/nvme0n1p1: UUID="24a31a17-fa14-4115-be92-bbea7e5b7dd1" TYPE="ext4" PARTLABEL="root" PARTUUID="8296e5ab-4265-4f1a-a77e-109651608fa7"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/sdc1: UUID="7712d9b5-930e-4ca2-b8d3-1149dfcaf3e7" TYPE="ext4" PARTUUID="28bddd8e-6cc2-42d9-b35d-f3cb6808f125"
/dev/sda1: UUID="fdab743e-c4a0-44dc-9ba2-d46e83d85197" TYPE="ext4" PARTUUID="a2e905b6-9f83-4b20-a666-9f67fe021b65"
/dev/sdb1: UUID="5a012e1a-47d7-4813-82ac-117d6168ef32" TYPE="ext4" PARTUUID="8e644de5-30f5-4304-8494-fdfc1e40f4d1"
/dev/sdd1: UUID="9b188593-34d9-42b6-9b0b-df16c74897d9" TYPE="ext4" PARTUUID="0ad53c46-f071-436f-b738-6b058732e90f"
/dev/sde1: UUID="60cc4969-e0db-4805-a7dc-bb5cabc86319" TYPE="ext4"
/dev/sdf1: LABEL_FATBOOT="BOOT" LABEL="BOOT" UUID="9331-ECD2" TYPE="vfat" PARTUUID="af5f2285-01"
/dev/sdf2: LABEL_FATBOOT="EFI" LABEL="EFI" UUID="936C-596F" TYPE="vfat" PARTUUID="af5f2285-02"
/dev/sdg1: UUID="2019-10-28-13-18-58-00" LABEL="MJRO1812" TYPE="iso9660"
/dev/sdg2: SEC_TYPE="msdos" LABEL_FATBOOT="MISO_EFI" LABEL="MISO_EFI" UUID="9048-C06D" TYPE="vfat"

FSTAB

# /dev/nvme0n1p1
UUID=24a31a17-fa14-4115-be92-bbea7e5b7dd1	/         	ext4      	rw,relatime	0 0

# /dev/sdf1
UUID=9331-ECD2      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro	0 0

# /dev/sdf2
UUID=936C-596F      	/boot/efi 	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro	0 0

# /dev/sda1
UUID=fdab743e-c4a0-44dc-9ba2-d46e83d85197	/storage/parity/disk0	ext4      	rw,relatime	0 0

# /dev/sdb1
UUID=5a012e1a-47d7-4813-82ac-117d6168ef32	/storage/data/disk1	ext4      	rw,relatime	0 0

# /dev/sdc1
UUID=7712d9b5-930e-4ca2-b8d3-1149dfcaf3e7	/storage/data/disk2	ext4      	rw,relatime	0 0

# /dev/sdd1
UUID=9b188593-34d9-42b6-9b0b-df16c74897d9	/storage/data/disk3	ext4      	rw,relatime	0 0

# /dev/sde1 
UUID=60cc4969-e0db-4805-a7dc-bb5cabc86319      /storage/usb/disk1       ext4            nofail,rw,relatime     0 0

PARTED -L OUTPUT

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  2000GB  2000GB  ext4


Model: ATA ST2000DM008-2FR1 (scsi)
Disk /dev/sdb: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  2000GB  2000GB  ext4


Model: ATA ST2000DM001-9YN1 (scsi)
Disk /dev/sdc: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  2000GB  2000GB  ext4


Model: ATA WDC WD1003FZEX-0 (scsi)
Disk /dev/sdd: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  1000GB  1000GB  ext4


Model: Samsung D3 Station (scsi)
Disk /dev/sde: 4001GB
Sector size (logical/physical): 4096B/4096B
Partition Table: msdos
Disk Flags: 

Number  Start  End     Size    Type     File system  Flags
 1      262kB  4001GB  4001GB  primary  ext4


Model: SanDisk Cruzer Blade (scsi)
Disk /dev/sdf: 15.4GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  4296MB  4295MB  primary  fat32
 2      4296MB  15.4GB  11.1GB  primary  fat32


Model: ADATA SX6000LNP (nvme)
Disk /dev/nvme0n1: 128GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size   File system  Name  Flags
 1      1049kB  128GB  128GB  ext4         root


Model: SanDisk Cruzer Blade (scsi)
Disk /dev/sdg: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 2      2609MB  2613MB  4194kB  primary               esp

update-grub output

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.19-x86_64
Found initrd image: /boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs-4.19-x86_64.img
Found initrd fallback image: /boot/initramfs-4.19-x86_64-fallback.img
grub-probe: error: cannot find a GRUB drive for /dev/sdg1.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sdg1.  Check your device.map.
Found memtest86+ image: /boot/memtest86+/memtest.bin
done

are you using raid disks ?

Hello, stephane...Thank you for the response.
No I am using snapraid with one parity drive. All disks therefore are accessible/intact by themselves.

After trying hours trying different things, the system booted. I used grub-mkconfig to generate the config file from scratch. It added necessary menu options which were missing after the file generated by grub-install. I do not know for sure, but I guess update-grup modifies this file. Anyhow the system boots now but update-grup still fails, which means my system is still broken and kernel updates can not be received unless manually fixed. I still need to identify the solution.

Then you are fine!

What you conclude does not make sense. Since you have posted in #newbies corner, I assume you may have misinterpreted the terminal output messages.
If you are sure something is wrong, please, explain better and provide info.

These are contradictory.
update-grub <==> grub-mkconfig

This is not a system error. It's a message. Not fatal. It's about Live USB drive and is common.

Thank you for the response.

In a working system, not liveusb system where usbstick is not available, I still receive the error if I use update-grub command.

As you mentioned, I removed the grub.cfg and used update-grup instead of grup-mkconfig, it also generated a grup.cfg file, with which I could successfully boot.

I dowgraded and upgraded kernel even though update-grub is still giving that error, updates are being done.

I downgraded grub, installed grub vanilla, they all gave me this error as well. I guess I will live this for a while. I hope, I will not encounter a side affect.

Yes I am a newbie in manjaro even though I have been using it for almost three years. I am linux user about 16 years, but I hardly ever deal with hardware and boot process unless I have to.

This seems not possible. We need proof.
Remove your Live USB (confirm!!!:laughing:) and reboot. Then post these:

lsblk -f
sudo os-prober
sudo parted -l
2 Likes

You know, that emoji is right to the point. Somehow I had left the liveusb, sticked in the machine after successful boot. I am quilty as charged. The error is gone. My nas is working, error is gone, but I do not know what caused problem, malfunctioning usb perhaps.

Anyhow, thank you for the solution, insight. I have spend about 12-15 hours in total and exhausted (0300 am now) that unnecessary error message distracted me from the solution and made me look elsewhere.

To summarize:

  1. install grub (using commands from the manjaro wiki or forum reference provided in the post)
  2. with efibootmgr activate efi boot (selection right partition is crucial)
  3. cross fingers and boot.

Thank you again.

1 Like

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

Forum kindly sponsored by