Grub probe error cannot find a grub drive for

this is my disk configure: # hlsblk -F NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS loop0 squashfs 4.0 ...

Are you trying to install GRUB with grub-install /dev/sda1?

Since GRUB practically requires access to MBR and the unused space between the MBR and the first partition when installing for BIOS-style boot process, try grub-install /dev/sda. If it still displays the same error message, just write your own /boot/grub/device.map file. In your case, its contents could be just

(hd0)    /dev/sda

(Ideally, you would use an appropriate /dev/disk/by-id/... pathname in place of /dev/sda, but that’s not mandatory.)

grub-install /dev/sda1 would attempt to embed GRUB’s boot block into PBR of partition sda1 instead of the MBR. Since most filesystems won’t have a fixed space for bootloader, GRUB’s boot block would have to point at /boot/grub/i386-pc/core.img by physical disk location, which used to be a very seriously discouraged installation mode. Modern versions of GRUB might no longer support installing GRUB that way at all.

The problem is, the boot block code needs to be so small it won’t understand filesystems, so it reads the GRUB image using raw disk block numbers determined at GRUB installation time. For this to work, the GRUB core image needs to be placed somewhere where its physical location on disk is guaranteed to stay the same. From the OS viewpoint, /boot/grub/i386-pc/core.img is a regular file, so a defragmentation tool or a smart filesystem driver might occasionally move it to a different physical location on-disk: that would cause a total boot failure.

When GRUB is installed to the actual Master Boot Record of a MBR-partitioned disk, the empty space between the MBR and the beginning of the first partition (almost 1 MB) is used for the GRUB core image. Since this place is outside any partitions, no filesystem driver or defragmenting tool is going to touch it. This is enough space to embed the GRUB core image, a filesystem driver and any other GRUB modules needed to access /boot as a real filesystem. After loading these, GRUB will then be able to load additional modules (including normal.mod) and its configuration file as regular files, by pathname.


Incidentally, if you wanted to boot the i386-pc version of GRUB from a GPT-partitioned disk, you would need a «biosboot» partition that is sized 1 MB and contains no filesystem: it is used to hold the GRUB core image, as the MBR-style space before the first partition will now be occupied by GPT partition table structures instead.

The empty space between the MBR and the beginning of the first partition is a historical remnant: back when disks still used C/H/S addressing, there was a convention to place the beginning of a partition always to the first sector of a track. Since MBR was the very first block of the disk (C/H/S address 0/0/1), that meant the earliest possible start of first partition would be C/H/S 0/1/1, and the rest of track #0 (= cylinder #0, head #0) would be left unused.

Roughly in the Windows XP era, as C/H/S addressing was no longer meaningful and data alignment on RAID arrays, enterprise storage systems and SSDs was becoming an important performance issue, the start-of-first-partition convention was changed: now the recommended place to start the first partition of the disk was at exactly 1 MiB from the beginning of the disk, or at the LBA block number #2048 (assuming classic 512-byte disk blocks).

cat /proc/mounts > /etc/mtab ?

aol ★★★★★

(07.06.12 13:53:19 MSK)

  • Ссылка

Руками пропиши.

r2d2

(07.06.12 13:57:17 MSK)

  • Ссылка

Ответ на:

комментарий
от AlexCones 07.06.12 13:53:51 MSK

Ответ на:

комментарий
от N1ghtmare 07.06.12 13:59:27 MSK

If you have a separate /boot partition and plan to install grub2, be sure to mount only the root partition before chroot'ing, and not the boot partition as well. Mount /boot later, once inside chroot. If you mount the /boot partition before chrooting, grub-mkconfig will not detect /boot as a separate partition and will assume /boot and root are on the same partition. 

?

  • Показать ответ
  • Ссылка

Ответ на:

комментарий
от ymuv 07.06.12 13:58:51 MSK

Да пробовал я, он при загрузке опять на device.map ругается и ни в какую

  • Ссылка

Ответ на:

комментарий
от AlexCones 07.06.12 14:01:07 MSK

Монтирую бут тоже из-под чрута, все равно говорит, проверьте device.map. Его в /boot/grub2 нету, grub2-install не создает его, в mtab бут есть

  • Показать ответы
  • Ссылка

Ответ на:

комментарий
от N1ghtmare 07.06.12 14:04:05 MSK

Ответ на:

комментарий
от AlexCones 07.06.12 14:06:25 MSK

Ответ на:

комментарий
от N1ghtmare 07.06.12 14:08:29 MSK

Ответ на:

комментарий
от AlexCones 07.06.12 14:09:47 MSK

Ответ на:

комментарий
от N1ghtmare 07.06.12 14:08:29 MSK

Ответ на:

комментарий
от ananas 07.06.12 14:18:20 MSK

Ответ на:

комментарий
от N1ghtmare 07.06.12 14:20:09 MSK

Ответ на:

комментарий
от ananas 07.06.12 14:24:26 MSK

ubuntu / # grub-mkdevicemap
bash: grub-mkdevicemap: команда не найдена
ubuntu / # grub2-mkdevicemap
bash: grub2-mkdevicemap: команда не найдена
ubuntu / # 
  • Показать ответы
  • Ссылка

Ответ на:

комментарий
от N1ghtmare 07.06.12 14:25:28 MSK

Ответ на:

комментарий
от N1ghtmare 07.06.12 14:25:28 MSK

Ответ на:

комментарий
от ananas 07.06.12 14:34:41 MSK

Ответ на:

комментарий
от N1ghtmare 07.06.12 14:43:09 MSK

каким образом chroot делал? в смысле /dev и /proc как монтировал? да и /sys тоже не помешал бы

ananas ★★★★★

(07.06.12 14:50:05 MSK)

  • Показать ответ
  • Ссылка

Ответ на:

комментарий
от N1ghtmare 07.06.12 14:31:26 MSK

$ cat /boot/grub/device.map
(hd0) /dev/sda

А что у тебя в этом файле?

imul ★★★★★

(07.06.12 14:55:55 MSK)

  • Ссылка

Ответ на:

комментарий
от N1ghtmare 07.06.12 14:04:05 MSK

проверьте device.map. Его в /boot/grub2 нету, grub2-install не создает его

Создай руками, там содержимое тривиально.

imul ★★★★★

(07.06.12 14:57:46 MSK)

  • Ссылка

Ответ на:

комментарий
от ananas 07.06.12 14:50:05 MSK

mount -o bind /dev /mnt/dev
mount -t proc none /mnt/proc

откатил граб, граб-инсталл создал device.map, но mkconfig конфиг все равно не генерирует. с конфигом в ручную не грузится, говорит мол no such device, перепроверил 10 раз, написано правильно

  • Показать ответ
  • Ссылка

Ответ на:

комментарий
от N1ghtmare 07.06.12 15:13:51 MSK

Ответ на:

комментарий
от AlexCones 07.06.12 14:06:25 MSK

И чего вас всех потянуло на grub2 под gentoo? Есть же родной незамасканный grub.

Старый граб нифига не умеет. Ни EFI, ни GPT, ни LVM, ни btrfs и т.д.

  • Ссылка

Ответ на:

комментарий
от ananas 07.06.12 15:14:48 MSK

Смонтировал /sys, сделал на всякий revdep-rebuild, он мне пересобрал udisks и после этого граб сделал конфиг. ОС загрузилась

  • Показать ответ
  • Ссылка

У меня тоже была такая же (или похожая) проблема, но я не помню, как решал. ЕМНИП, граб ещё и не мог определить тип файловой системы FAT, которая в /boot/efi. Если используете бету граба 2.00, то лучше откатить на что-то постарее, хотя бы на 2.00_beta0, потому что со всеми бетами у меня были проблемы (там ещё и опечатка в grub-install есть, связанная с EFI).

  • Ссылка

Ответ на:

комментарий
от N1ghtmare 07.06.12 15:22:22 MSK

а всё дело в хэндбуке, который не учит монтировать /sys

yurikoles ★★★

(07.06.12 19:50:16 MSK)

  • Ссылка

Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.

System information

Type Version/Name
Distribution Name Debian
Distribution Version 10/Buster
Linux Kernel Linux debian 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u2 (2019-11-11) x86_64 GNU/Linux
Architecture amd64
ZFS Version 0.8.2-3~bpo10+1
SPL Version 0.8.2-3~bpo10+1

Describe the problem you’re observing

Failed to verify that the ZFS boot filesystem is recognized

root:/root# grub-probe /boot
grub-probe: error: cannot find a GRUB drive for /dev/nvme0n1p3.  Check your device.map.

Describe how to reproduce the problem

Following instructions up to here:
https://github.com/zfsonlinux/zfs/wiki/Debian-Buster-Root-on-ZFS#step-5-grub-installation

Installing with LUKS disk encryption. Unencrypted zfs pool.

Without legacy BIOS. I.E. did NOT follow 4.8a Install GRUB for legacy (BIOS) booting
and DID follow 4.8b Install GRUB for UEFI booting

ZFS modules are being signed by a key that I generated as described here: https://ubuntu.com/blog/how-to-sign-things-for-secure-boot

I have a single SSD and a live install active.

Include any warning/errors/backtraces from the system logs

$ root:/root# grub-probe -vvv /boot
grub-probe: info: cannot open `/boot/grub/device.map': No such file or directory.
grub-probe: info: /dev/nvme0n1p3 is not present.
grub-probe: info: Looking for /dev/nvme0n1p3.
grub-probe: info: /dev/nvme0n1 is a parent of /dev/nvme0n1p3.
grub-probe: info: /dev/nvme0n1p3 starts from 1153024.
grub-probe: info: opening the device hostdisk//dev/nvme0n1.
grub-core/kern/disk.c:196: Opening `hostdisk//dev/nvme0n1'...
grub-probe: info: drive = 0.
grub-probe: info: the size of hostdisk//dev/nvme0n1 is 1000215216.
grub-core/kern/disk.c:196: Opening `hostdisk//dev/nvme0n1'...
grub-probe: info: drive = 0.
grub-probe: info: the size of hostdisk//dev/nvme0n1 is 1000215216.
grub-core/disk/diskfilter.c:137: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub-core/osdep/hostdisk.c:416: opening the device `/dev/nvme0n1' in open_device()
grub-core/osdep/hostdisk.c:395: reusing open device `/dev/nvme0n1'
grub-core/osdep/hostdisk.c:395: reusing open device `/dev/nvme0n1'
grub-probe: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub-core/osdep/hostdisk.c:395: reusing open device `/dev/nvme0n1'
grub-probe: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub-core/osdep/hostdisk.c:395: reusing open device `/dev/nvme0n1'
grub-probe: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub-core/partmap/gpt.c:90: Read a valid GPT header
grub-core/partmap/gpt.c:114: GPT entry 1: start=2048, length=1048576
grub-core/partmap/gpt.c:114: GPT entry 2: start=1050624, length=2097152
grub-core/partmap/gpt.c:114: GPT entry 3: start=3147776, length=997067407
grub-probe: info: no LDM signature found.
grub-probe: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: no LVM signature found.
grub-core/partmap/gpt.c:90: Read a valid GPT header
grub-core/partmap/gpt.c:114: GPT entry 1: start=2048, length=1048576
grub-core/disk/diskfilter.c:137: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub-core/osdep/hostdisk.c:416: opening the device `/dev/nvme0n1p1' in open_device()
grub-core/osdep/hostdisk.c:395: reusing open device `/dev/nvme0n1p1'
grub-probe: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub-core/osdep/hostdisk.c:395: reusing open device `/dev/nvme0n1p1'
grub-probe: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub-core/partmap/msdos.c:188: partition 0: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 1: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 2: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 3: flag 0x0, type 0x0, start 0x0, len 0x0
grub-probe: info: no LDM signature found.
grub-probe: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: no LVM signature found.
grub-core/partmap/msdos.c:188: partition 0: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 1: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 2: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 3: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/dfly.c:72: bad magic (found 0x41615252; wanted 0xc4464c59)
grub-core/partmap/msdos.c:188: partition 0: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 1: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 2: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 3: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 0: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 1: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 2: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 3: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/apple.c:123: bad magic (found 0xeb58; wanted 0x4552)
grub-core/partmap/gpt.c:114: GPT entry 2: start=1050624, length=2097152
grub-core/disk/diskfilter.c:137: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub-core/osdep/hostdisk.c:416: opening the device `/dev/nvme0n1p2' in open_device()
grub-core/osdep/hostdisk.c:416: opening the device `/dev/nvme0n1' in open_device()
grub-core/osdep/hostdisk.c:416: opening the device `/dev/nvme0n1p2' in open_device()
grub-probe: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub-core/osdep/hostdisk.c:395: reusing open device `/dev/nvme0n1p2'
grub-core/osdep/hostdisk.c:416: opening the device `/dev/nvme0n1' in open_device()
grub-probe: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub-core/partmap/msdos.c:188: partition 0: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 1: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 2: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 3: flag 0x0, type 0x0, start 0x0, len 0x0
grub-probe: info: no LDM signature found.
grub-probe: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: no LVM signature found.
grub-core/partmap/msdos.c:188: partition 0: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 1: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 2: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 3: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/dfly.c:72: bad magic (found 0x41615252; wanted 0xc4464c59)
grub-core/partmap/msdos.c:188: partition 0: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 1: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 2: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 3: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 0: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 1: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 2: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 3: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/apple.c:123: bad magic (found 0xeb58; wanted 0x4552)
grub-core/partmap/gpt.c:114: GPT entry 3: start=3147776, length=997067407
grub-core/disk/diskfilter.c:137: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub-core/osdep/hostdisk.c:395: reusing open device `/dev/nvme0n1'
grub-core/osdep/hostdisk.c:395: reusing open device `/dev/nvme0n1'
grub-probe: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub-probe: info: no LDM signature found.
grub-probe: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: no LVM signature found.
grub-core/partmap/dfly.c:72: bad magic (found 0x0; wanted 0xc4464c59)
grub-core/partmap/apple.c:123: bad magic (found 0x0; wanted 0x4552)
grub-core/partmap/dfly.c:72: bad magic (found 0x20494645; wanted 0xc4464c59)
grub-core/partmap/apple.c:123: bad magic (found 0x0; wanted 0x4552)
grub-core/kern/disk.c:295: Closing `hostdisk//dev/nvme0n1'.
grub-core/partmap/gpt.c:90: Read a valid GPT header
grub-core/partmap/gpt.c:114: GPT entry 1: start=2048, length=1048576
grub-probe: info: Partition 1 starts from 2048.
grub-core/partmap/msdos.c:188: partition 0: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 1: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 2: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 3: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/dfly.c:72: bad magic (found 0x41615252; wanted 0xc4464c59)
grub-core/partmap/msdos.c:188: partition 0: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 1: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 2: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 3: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 0: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 1: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 2: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 3: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/apple.c:123: bad magic (found 0xeb58; wanted 0x4552)
grub-core/partmap/gpt.c:114: GPT entry 2: start=1050624, length=2097152
grub-probe: info: Partition 2 starts from 1050624.
grub-core/partmap/msdos.c:188: partition 0: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 1: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 2: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 3: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/dfly.c:72: bad magic (found 0x41615252; wanted 0xc4464c59)
grub-core/partmap/msdos.c:188: partition 0: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 1: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 2: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 3: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 0: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 1: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 2: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/msdos.c:188: partition 3: flag 0x0, type 0x0, start 0x0, len 0x0
grub-core/partmap/apple.c:123: bad magic (found 0xeb58; wanted 0x4552)
grub-core/partmap/gpt.c:114: GPT entry 3: start=3147776, length=997067407
grub-probe: info: Partition 3 starts from 3147776.
grub-core/partmap/dfly.c:72: bad magic (found 0x0; wanted 0xc4464c59)
grub-core/partmap/apple.c:123: bad magic (found 0x0; wanted 0x4552)
grub-core/partmap/dfly.c:72: bad magic (found 0x20494645; wanted 0xc4464c59)
grub-core/partmap/apple.c:123: bad magic (found 0x0; wanted 0x4552)
grub-core/kern/disk.c:295: Closing `hostdisk//dev/nvme0n1'.
grub-probe: info: cannot find the partition of `/dev/nvme0n1p3'.
grub-probe: info: /dev/nvme0n1p3 is present.
grub-probe: info: Looking for /dev/nvme0n1p3.
grub-probe: info: /dev/nvme0n1 is a parent of /dev/nvme0n1p3.
grub-probe: info: /dev/nvme0n1p3 is present.
grub-probe: info: Looking for /dev/nvme0n1p3.
grub-probe: info: /dev/nvme0n1 is a parent of /dev/nvme0n1p3.
grub-probe: error: cannot find a GRUB drive for /dev/nvme0n1p3.  Check your device.map.
root:/root# zpool get all | grep feature
bpool  feature@async_destroy          enabled                        local
bpool  feature@empty_bpobj            active                         local
bpool  feature@lz4_compress           active                         local
bpool  feature@multi_vdev_crash_dump  disabled                       local
bpool  feature@spacemap_histogram     active                         local
bpool  feature@enabled_txg            active                         local
bpool  feature@hole_birth             active                         local
bpool  feature@extensible_dataset     active                         local
bpool  feature@embedded_data          active                         local
bpool  feature@bookmarks              enabled                        local
bpool  feature@filesystem_limits      enabled                        local
bpool  feature@large_blocks           enabled                        local
bpool  feature@large_dnode            disabled                       local
bpool  feature@sha512                 disabled                       local
bpool  feature@skein                  disabled                       local
bpool  feature@edonr                  disabled                       local
bpool  feature@userobj_accounting     active                         local
bpool  feature@encryption             disabled                       local
bpool  feature@project_quota          active                         local
bpool  feature@device_removal         disabled                       local
bpool  feature@obsolete_counts        disabled                       local
bpool  feature@zpool_checkpoint       enabled                        local
bpool  feature@spacemap_v2            active                         local
bpool  feature@allocation_classes     enabled                        local
bpool  feature@resilver_defer         enabled                        local
bpool  feature@bookmark_v2            disabled                       local
rpool  feature@async_destroy          enabled                        local
rpool  feature@empty_bpobj            active                         local
rpool  feature@lz4_compress           active                         local
rpool  feature@multi_vdev_crash_dump  enabled                        local
rpool  feature@spacemap_histogram     active                         local
rpool  feature@enabled_txg            active                         local
rpool  feature@hole_birth             active                         local
rpool  feature@extensible_dataset     active                         local
rpool  feature@embedded_data          active                         local
rpool  feature@bookmarks              enabled                        local
rpool  feature@filesystem_limits      enabled                        local
rpool  feature@large_blocks           enabled                        local
rpool  feature@large_dnode            active                         local
rpool  feature@sha512                 enabled                        local
rpool  feature@skein                  enabled                        local
rpool  feature@edonr                  enabled                        local
rpool  feature@userobj_accounting     active                         local
rpool  feature@encryption             enabled                        local
rpool  feature@project_quota          active                         local
rpool  feature@device_removal         enabled                        local
rpool  feature@obsolete_counts        enabled                        local
rpool  feature@zpool_checkpoint       enabled                        local
rpool  feature@spacemap_v2            active                         local
rpool  feature@allocation_classes     enabled                        local
rpool  feature@resilver_defer         enabled                        local
rpool  feature@bookmark_v2            enabled                        local
$ root:/root# apt apt list --installed | grep -i grub
grub-common/stable,stable,now 2.02+dfsg1-20 amd64 [installed,automatic]
grub-efi-amd64-bin/stable,stable,now 2.02+dfsg1-20 amd64 [installed,automatic]
grub-efi-amd64-signed/stable,stable,now 1+2.02+dfsg1+20 amd64 [installed,automatic]
grub-efi-amd64/stable,stable,now 2.02+dfsg1-20 amd64 [installed]
grub2-common/stable,stable,now 2.02+dfsg1-20 amd64 [installed,automatic]
View previous topic :: View next topic  
Author Message
Dyspy
n00b
n00b

Joined: 23 Oct 2019
Posts: 7

PostPosted: Wed Oct 23, 2019 5:14 pm    Post subject: [Solved] Grub2 os-prober cannot find grub drive Reply with quote

I’ve been trying to install Gentoo on my desktop that already has Windows 10. The install went fine but running mkconfig keeps giving me the same error: grub-probe: ERROR: Cannot find a GRUB drive for /dev/sdc1. /dev/sdc1 is the usb I flashed the installation cd on so not sure why it’s looking there. Running os-prober by itself returns the exact same error.

/dev/sda is a 2TB HDD, currently only used by Windows but gonna partition this once this finally works

/dev/sdb1 Windows Recovery Partition NTFS

/dev/sdb2 EPS: contains Boot, gentoo, Microsoft and grub

/dev/sdb3 Windows C:/ NTFS

/dev/sdb4 bios_grub partition

/dev/sdb5 swap partition

/dev/sdb6 gentoo root ext4

etc/fstab

Code:
/dev/sdb2     /boot/efi      vfat         defaults,noatime     0,2

/dev/sdb5     none           swap        sw                         0,0

/dev/sdb6     /                 ext4        noatime                  0,1



Legacy mode is turned off on the motherboard, secure boot is turned off, I’ve checked to make sure the EFI partition is formatted for GPT. I’ve looked through the handbook and the separate page specifically for grub2 installation multiple times as well as scouring every forum post on the internet that mentioned this error or anything related to grub not finding the images and I’ve come up with nothing. Any help would be amazing, thanks

[Moderator edit: added [code] tags to preserve output layout. -Hu]

edit: Thank you, Mr moderator. Looks way prettier

Last edited by Dyspy on Thu Nov 14, 2019 6:12 pm; edited 2 times in total

Back to top

View user's profile Send private message

Arvo
n00b
n00b

Joined: 30 Sep 2019
Posts: 9

PostPosted: Wed Oct 23, 2019 6:03 pm    Post subject: Reply with quote

That’s really unfortunate. Hopefully we can resolve this issue! Have you run these commands in the host environment to provide the required files (example shows Gentoo mounted on /mnt/gentoo like in the Handbook):

Code:

root #mkdir -p /mnt/gentoo/run/udev

root #mount -o bind /run/udev /mnt/gentoo/run/udev

root #mount —make-rslave /mnt/gentoo/run/udev

Have you also mounted the Windows partitions already?

Last edited by Arvo on Wed Oct 23, 2019 6:10 pm; edited 1 time in total

Back to top

View user's profile Send private message

Dyspy
n00b
n00b

Joined: 23 Oct 2019
Posts: 7

PostPosted: Wed Oct 23, 2019 6:09 pm    Post subject: Reply with quote

I had mounted and bound udev yes, didn’t work
Back to top

View user's profile Send private message

Arvo
n00b
n00b

Joined: 30 Sep 2019
Posts: 9

PostPosted: Wed Oct 23, 2019 6:42 pm    Post subject: Reply with quote

Does the error persist if you remove the usb drive which contains the installation cd?
Back to top

View user's profile Send private message

Jaglover
Watchman
Watchman

Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Wed Oct 23, 2019 7:55 pm    Post subject: Reply with quote

I have to say I do not multiboot, I do not have Windows and I do not use Grub. Meaning I’m not sure what exactly Windows does in your ESP partition and whether it can coexist with other bootloaders.

Anyhow, if Grub install fails you can always set it up by hand. Copy its EFI executable next to Windows bootloader, this is the place where your motherboard firmware is looking for it and it may automagically appear in your EFI boot menu. If it does not — use efibootmgr to add it by hand. Then write a simple grub.cfg which loads your kernel and that’s it.
_________________
My Gentoo installation notes.

Please learn how to denote units correctly!
Back to top

View user's profile Send private message

Dyspy
n00b
n00b

Joined: 23 Oct 2019
Posts: 7

PostPosted: Thu Oct 24, 2019 8:39 am    Post subject: Reply with quote

Jaglover wrote:
I have to say I do not multiboot, I do not have Windows and I do not use Grub. Meaning I’m not sure what exactly Windows does in your ESP partition and whether it can coexist with other bootloaders.

Anyhow, if Grub install fails you can always set it up by hand. Copy its EFI executable next to Windows bootloader, this is the place where your motherboard firmware is looking for it and it may automagically appear in your EFI boot menu. If it does not — use efibootmgr to add it by hand. Then write a simple grub.cfg which loads your kernel and that’s it.

So I am very certain it’s not a problem as I have seen a lot of people on the internet with EFI multiboot setups and it doesn’t appear to be a problem. Copying the EFI executable is unnecessary as grub does actually install and run fine and is already accessible from the EFI boot menu, it just can’t find either Linux or Windows. As for using efibootmgr, I already set it up using efibootmgr and it works, however this is pretty cumbersome to use and I wasn’t really looking for a workaround, I was looking on how to fix grub2, specifically the os-prober script. I appreciate the help anyways, though, thank you and I may end up writing a custom grub.cfg file with the menu entry.

Edit: Just to make clear, I was not trying to install grub2 and setup efibootmgr at the same time, I am aware that can cause conflicts. I uninstalled grub2 and got the efibootmgr setup running, however, I would like to get just grub working.

Last edited by Dyspy on Thu Oct 24, 2019 9:02 am; edited 1 time in total

Back to top

View user's profile Send private message

Dyspy
n00b
n00b

Joined: 23 Oct 2019
Posts: 7

PostPosted: Thu Oct 24, 2019 8:42 am    Post subject: Reply with quote

Arvo wrote:
Does the error persist if you remove the usb drive which contains the installation cd?

It does, unfortunately :(

Back to top

View user's profile Send private message

Marlo
Veteran
Veteran

Joined: 26 Jul 2003
Posts: 1591

PostPosted: Thu Oct 24, 2019 6:39 pm    Post subject: Reply with quote

Dyspy!

Never use the command in your configuration

Code:
grub-setup ‘<DEVICE>’



It will overwrite the MBR and can destroy your system!

Stop! —> Read carefully and check them before you doing anything.

Also read this: https://www.gnu.org/software/grub/manual/grub/grub.html#Installing-GRUB-using-grub_002dinstall

Scroll down to: «On EFI systems for fixed disk install you have to mount EFI System Partition…..» and read word by word: twice!

————

After the chroot the mtab has to be renewed.

Code:
cp /proc/mounts  /etc/mtab

In your configuration, boot is a directory of root, without a separate partition. -> /boot.

In the directory of /boot a subdirectory «/boot/efi» has to be created.

Code:
mkdir /boot/efi

Connect /dev/sdb2 to /boot/efi

Code:
mount -a

or

mount /dev/sdb2 /boot/efi

Grub wants to install with the command:

Code:

grub-install —efi-directory=/boot/efi

and then:

Code:
grub-mkconfig -o /boot/grub/grub.cfg

If you are unsure. Do not do anything.

greetings

Ma
_________________
——————————————————————

http://radio.garden/

Back to top

View user's profile Send private message

Dyspy
n00b
n00b

Joined: 23 Oct 2019
Posts: 7

PostPosted: Fri Nov 08, 2019 1:23 pm    Post subject: Reply with quote

Marlo wrote:
Dyspy!

Never use the command in your configuration

Code:
grub-setup ‘<DEVICE>’



It will overwrite the MBR and can destroy your system!

I never actually said I ran grub-setup, only grub-install and grub-mkconfig. I’m not sure why you’re worried about this. Also, as I mentioned, the device is formatted with GPT Partitioning Scheme. The only MBR I could think of that would be present on the device would be the protective MBR on the GUID partitioning table though it’s pretty protected and is also redundant and exists for backwards compatibility.

Marlo wrote:

After the chroot the mtab has to be renewed.

Code:
cp /proc/mounts  /etc/mtab

In your configuration, boot is a directory of root, without a separate partition. -> /boot.

In the directory of /boot a subdirectory «/boot/efi» has to be created.

Code:
mkdir /boot/efi

Connect /dev/sdb2 to /boot/efi

Code:
mount -a

or

mount /dev/sdb2 /boot/efi

Grub wants to install with the command:

Code:

grub-install —efi-directory=/boot/efi

and then:

Code:
grub-mkconfig -o /boot/grub/grub.cfg

If you are unsure. Do not do anything.

greetings

Ma

I checked that /etc/mtab hadn’t been modified just in case and it hadn’t.

Otherwise, everything else was exactly what I did for the initial install. I repeated the process again and, while running grub-mkconfig, I get the same device.map error.

Unfortunately, the error still exists

Back to top

View user's profile Send private message

Jaglover
Watchman
Watchman

Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Fri Nov 08, 2019 6:18 pm    Post subject: Reply with quote

Quote:
Edit: Just to make clear, I was not trying to install grub2 and setup efibootmgr at the same time, I am aware that can cause conflicts. I uninstalled grub2 and got the efibootmgr setup running, however, I would like to get just grub working.



I see some confusion here, efibootmgr is a tool to set up EFI Boot Manager in motherboard firmware. In case you want to use Grub2 in EFI mode efibootmgr must be available as dependency, Grub2 install scripts use it to configure EFI Boot Manager (the boot manager built into firmware). OTOH, you can use efibootmgr from a removable media to set up your EFI boot, and once you are done there is no need for it any more.

I personally love simplicity, thus I boot my Gentoo directly from firmware without using any middlemen. I used efibootmgr to add another entry into firmware EFI Boot Manager for my backup kernel and that’s it. Now my box boots straight into Gentoo, unless I hit F11 during boot to access EFI Boot Manager menu, then I have choices to boot new or old kernel.

You could boot your Windows and Gentoo the same way, without using any additional bootloders.
_________________
My Gentoo installation notes.

Please learn how to denote units correctly!

Back to top

View user's profile Send private message

DONAHUE
Watchman
Watchman

Joined: 09 Dec 2006
Posts: 7644
Location: Goose Creek SC

PostPosted: Fri Nov 08, 2019 7:33 pm    Post subject: Reply with quote

Dyspy wrote:
Copying the EFI executable is unnecessary as grub does actually install and run fine and is already accessible from the EFI boot menu, it just can’t find either Linux or Windows.

Does this mean that you can boot and run the installed gentoo system (no chroot or install media {usb} involved)?

If so, suggest you boot the installed gentoo system, run

Code:
emerge wgetpaste os-prober efivar

, mount or remount the EFI Systems Partition (ESP) read/write. Then use wgetpaste to collect and publish results of grub reruns, filesystem structure, disk structure as in:

Code:
fdisk -l | wgetpaste

mount | wgetpaste

os-prober | wgetpaste

grep -i CONFIG_EFI_VARS /usr/src/linux/.config

grub-install —efi-directory=/boot/efi —target=x86_64-efi

grub-mkconfig -o /boot/grub

tree /boot | wgetpaste

cat /boot/grub/grub.cfg | wgetpaste

I’ve been dual/multibooting since 2012. Running the commands above my terminal shows:

Code:
> fdisk -l | wgetpaste

< Your paste can be seen here: http://dpaste.com/3DRX2GX

> mount | wgetpaste

< Your paste can be seen here: http://dpaste.com/0V4CYX6

> os-prober | wgetpaste

<  WARNING: Failed to connect to lvmetad. Falling back to device scanning.

< Your paste can be seen here: http://dpaste.com/3NDH97J

> grep -i CONFIG_EFI_VARS /usr/src/linux/.config

< CONFIG_EFI_VARS=m

> grub-install —efi-directory=/boot/efi —target=x86_64-efi

< Installing for x86_64-efi platform.

< Installation finished. No error reported.

> grub-mkconfig -o /boot/grub

< Generating grub configuration file …

< Found linux image: /boot/vmlinuz-5.4.0-rc6

< Found linux image: /boot/vmlinuz-5.4.0-rc4

< Found linux image: /boot/vmlinuz-5.3.8-gentoo

< Found linux image: /boot/vmlinuz-5.3.7-gentoo

<  WARNING: Failed to connect to lvmetad. Falling back to device scanning.

< Found Windows Boot Manager on /dev/nvme0n1p2@/EFI/Microsoft/Boot/bootmgfw.efi

< done

> tree /boot | wgetpaste

< Pasting > 25 kB often tend to fail with dpaste. Use —verbose or —debug to see the

< error output from wget if it fails. Alternatively use another pastebin service.

< Your paste can be seen here: http://dpaste.com/0F450KJ

> cat /boot/grub/grub.cfg | wgetpaste

< Your paste can be seen here: http://dpaste.com/0DCPQET

If problem does not clear suggest you copy and post your terminal equivalent.
_________________
Defund the FCC.

Last edited by DONAHUE on Thu Nov 14, 2019 7:30 pm; edited 1 time in total

Back to top

View user's profile Send private message

Dyspy
n00b
n00b

Joined: 23 Oct 2019
Posts: 7

PostPosted: Thu Nov 14, 2019 6:11 pm    Post subject: Reply with quote

I deleted all the kernel images and system maps on the uefi partition and reinstalled them. I’d done this a few times before while trying to fix it and, for some reason, this one worked. Strangely enough, os-prober found windows as well this time despite not finding it before. Loads into Gentoo fine now. I’ll mark as solved
Back to top

View user's profile Send private message

DONAHUE
Watchman
Watchman

Joined: 09 Dec 2006
Posts: 7644
Location: Goose Creek SC

PostPosted: Thu Nov 14, 2019 7:39 pm    Post subject: Reply with quote

Best guesses: adding —target=x86_64-efi or mounting the ESP read write or sequence of commands was the magic. Grub sometimes says an error occurred so politely that it seems to report success.
_________________
Defund the FCC.
Back to top

View user's profile Send private message

Display posts from previous:   

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

This has been Solved.
So I Installed LinuxMint 14 Mate and everything installed fine. I couldn’t get one of NTFS drives to mount so I used «ntfsfix» to get it mounted. And all was well again, until I tried to upgrade:

Code: Select all

likwid@likwidPC ~ $ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages have been kept back:
  linux-headers-generic linux-image-generic
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up memtest86+ (4.20-1.1ubuntu2.1) ...
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.5.0-17-generic
Found initrd image: /boot/initrd.img-3.5.0-17-generic
Found memtest86+ image: /boot/memtest86+.bin
umount: /var/lib/os-prober/mount: not mounted
rmdir: failed to remove `/var/lib/os-prober/mount': Device or resource busy
grub-probe: error: cannot find a GRUB drive for /dev/sdc1.  Check your device.map.
done

And it just hangs there in the terminal, which also causes Synaptic Package Manager to hang whenever it installs anything .I looked for /boot/grub/device.map, but couldn’t find it so I ran «sudo grub-mkdevicemap» to create one.

I can back to the point A and install whatever I can with «sudo apt-get install -f» but the problems is everytime I want to install some thing I get the same thing and it gets annoying really quick.

/boot/grub/device.map

Code: Select all

(hd0)	/dev/disk/by-id/ata-WDC_WD1001FALS-00J7B0_WD-WMATV0990338
(hd1)	/dev/disk/by-id/ata-OCZ-VERTEX_98U8U63E7613BI05NGZZ
(hd2)	/dev/disk/by-id/ata-WDC_WD5000AADS-00S9B0_WD-WCAV9C228191

Tried sudo grub-install —recheck /dev/sdc:

Code: Select all

/usr/sbin/grub-bios-setup: warning: this LDM has no Embedding Partition; embedding won't be possible.
/usr/sbin/grub-bios-setup: error: embedding is not possible, but this is required for cross-disk install.

Please let me know if there is anything I should be posting. thanks.

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.

Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Gpg error the following signatures couldn t be verified
  • Grub install error failed to get canonical path of overlay
  • Gp 300 термометр ошибка erl
  • Group authorization failed error
  • Got error 197 from se while migrating tablespaces

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии