Меню

Grub probe ошибка не удалось найти привод grub для dev sdb1 проверьте device map

Что и почему получилось — вполне понятно, ссылки выше уже давал.
Главная ошибка — необходимо было предварительно преобразовать динамический (Dynamic) диск в базовый (Basic) в терминологии Windows.

Без этого у вас получилось примерно следующее.
1) В MBR была запись о единственном первичном (primary) разделе с типом 0x42 и размером на весь диск; в последнем МБ этого раздела лежала реальная LDM-таблица разделов этого диска;

2) После

Acronis Disk Director и с помощью него отрезал 400 с лишним ГБ от дисков C и D.

возникает вопрос, действительно ли он умеет работать с LDM и что получилось при отрезании:
а) умеет, изменены (1) размеры ФС «дисков» C: и D:, (2) границы разделов внутри LDM, (3) границы внешнего контейнера в MBR;
б) не умеет, изменены размеры только внешнего контейнера.
Почему-то кажется, что у варианта (б) больше шансов :(, ведь динамический диск не может содержать дополнительных разделов внутри MBR и/или GPT… Но это мои домыслы, тут нужно исследовать вопрос по версии ADD, его документации, а при тишине в ней на эту тему — путем натурного эксперимента.

3) После создания разделов и установки Linux то, что получилось, могло выглядеть как-то так:

Было: (сверху данные MBR, снизу — LDM)

v----------------- раздел 4 тип 0x42 ---------------v
=====================================================
^-- диск C: тип 7 --^ ^---- диск D: тип 7 ----^ ^LDM^

Стало (если была поддержка):

v~~~ расш. sda1 ~~~v
v sda 5, 6, 7, 8 v v----- раздел 4 тип 0x42 ------v
=====================================================
^-диск C:-^ ^--диск D:---^ ^LDM^

Стало (если не было поддержки):

v--- расш. sda1 ---v
v sda 5, 6, 7, 8 v v----- раздел 4 тип 0x42 ------v
=====================================================
^-- диск C: тип 7 --^ ^---- диск D: тип 7 ----^ ^LDM^

На картинке оптимистичный вариант, когда «диск D:» не был затерт, но это не гарантировано.

Вон там: http://www.glazavezde.ru/nastroyka-programm-v-korporativnyh-setyah/tonkosti-n… пишут, что ADD 11 знает про динамические диски.

4) Если не было ценных данных, или есть их резервная копия, переразметьте и переставьте обе системы.
Если были — самое время озаботиться вопросом, 1) целы ли они и 2) куда переписать то, что еще не убито.

5) Если поддержка все же была, преобразование в Basic диск в том же ADD должно помочь, если он сможет оставить и MBR, и LDM разделы в MBR варианте.

bormant ★★★★★

(04.01.18 20:02:16 MSK)



Последнее исправление: bormant 04.01.18 20:07:35 MSK
(всего

исправлений: 3)

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

Стоят Windows и несколько Ubuntu-подобных ОС.
Слетел GRUB.
Откуда SFS взялась???Где ext2?

root@kali:~# sudo fdisk -l

Disk /dev/sda: 465,8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xa244bd53

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1              63      2047      1985 992,5K 42 SFS
/dev/sda2  *         2048    718847    716800   350M 42 SFS
/dev/sda3          718848 213012479 212293632 101,2G 42 SFS
/dev/sda4       213012480 976771119 763758640 364,2G 42 SFS

Partition 2 does not start on physical sector boundary.

Disk /dev/sdb: 3,6 GiB, 3880452096 bytes, 7579008 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x3077d69f

Device     Boot Start     End Sectors  Size Id Type
/dev/sdb1  *    16128 7579007 7562880  3,6G  7 HPFS/NTFS/exFAT
/dev/sdb4       68576 1534943 1466368  716M  0 Empty

Disk /dev/sdc: 14,7 GiB, 15798894592 bytes, 30857216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x3b0217b6

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdc1        2048 30855167 30853120 14,7G  c W95 FAT32 (LBA)

root@kali:~#

root@kali:~# grub-mkconfig -o /boot/grub/menu.cfg
Generating grub configuration file …
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Найден образ linux: /boot/vmlinuz-4.0.0-kali1-amd64
Найден образ initrd: /boot/initrd.img-4.0.0-kali1-amd64
  No volume groups found
grub-probe: ошибка: не удалось найти привод GRUB для /dev/sda15. Проверьте device.map.
grub-probe: ошибка: не удалось найти привод GRUB для /dev/sda5. Проверьте device.map.
grub-probe: ошибка: не удалось найти привод GRUB для /dev/sdb4. Проверьте device.map.
Найден Ubuntu 15.04 (15.04) на /dev/sda1
Найден Ubuntu 15.04 (15.04) на /dev/sda11
Найден Windows 7 (loader) на /dev/sda2
Найден Ubuntu 15.04 (15.04) на /dev/sda7
завершено

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).

При отключение одного диска из raid (soft) не грузится система.

При отключение одного из дисков рейда, система не грузится, не важно какой диск.

В конфете grob я нашел вот этот код:

А вот все uid дисков системы.

подскажите, Спасибо за помощь.

Сделай grub-install на все диски в рейде.

Uuid md устройства, не должен меняться.

raid 1, зеркало. Ставил grub на все диски. Он грузит якобы систему но в какой-то урезанный шел .

grub-install

Какая-то фигня выходит. Когда ставил систему то поставил помощью инсталятора на два диска grub, все прошло без ошибок и предупреждений.

Сейчас пытался grub-install /dev/sda1 или grub-install / dev/sdb1 выдает ошибку:

Вот что у меня загружается если отключить любой из винтов: (фото экрана) http://s008.radikal.ru/i304/1506/8c/50a8e14da5ef.jpg

не смотрел как во втором грубе, а для первого menu.lst должно содержать нечто подобное

загрузчик надо ставить на sda, а не на раздел

Ну во первых
grub-install /dev/sda
grub-install /dev/sdb
Должно работать.

Сори, что то я провтыкал. Но проблемы это не решает . одно что grub ставится на оба диска и он там уже был, но система не грузится с одним винтом?

Потому-что у тебя root почему-то указывает на первый диск, а должен — на md-устройство. Читай ошибку на скрине после «ALERT!»

Потому-что у тебя root почему-то указывает на первый диск, а должен — на md-устройство. Читай ошибку на скрине после «ALERT!»

А почем у вы так уверены, что root указывает на первый диск?

UUID b566fce0-ed95-42b6-9b66-7c865478e5ff это устройство /dev/md0

и вот мой grub.cfg Я даже пытался везде прописать

попробовал я добавить еще один пункт загрузки

Подскажите, что делать чтобы грузилась система без одного диска.

В файлике /etc/default/grub – нужно раскоментировать строку “GRUB terminal=console”

В файлике /etc/default/grub – нужно раскоментировать строку “GRUB terminal=console”

А почем у вы так уверены, что root указывает на первый диск?

Точно, невнимательно прочитал пост.

Там ничего не надо прописывать в файле, он автоматически переконфигурируется (о чём написано в 6 первых строчках), надо dpkg-reconfigure grub-pc набрать и выбрать свои диски (/dev/sda и /dev/sdb) в запросе.

попробую угадать, система на базе systemd?

попробуй добавить в kernel парамеры

Там ничего не надо прописывать в файле, он автоматически переконфигурируется (о чём написано в 6 первых строчках), надо dpkg-reconfigure grub-pc набрать и выбрать свои диски (/dev/sda и /dev/sdb) в запросе.

не помогло . тоже самое. Как на фото.

попробую угадать, система на базе systemd?

Это как? Как вам ответить на этот вопрос, где посмотреть?

попробуй добавить в kernel парамеры

Подскажите как это сделать?

добавить в конец строки linux /boot/vmlinuz-3.16.0-4-amd64 .

А может стоит забить на UUID? и сделать по-старому set root=/dev/md0 (и не надо вызывать search).

No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 8.1 (jessie) Release: 8.1 Codename: jessie

добавить в конец строки linux /boot/vmlinuz-3.16.0-4-amd64 .

А может стоит забить на UUID? и сделать по-старому set root=/dev/md0 (и не надо вызывать search).

да я писал set root=/dev/md0, не работает и так. Я добавлял отдельное меню с set root=/dev/md0 и даже для каждого диска .

Я тут гуглил по «module ehci-orion not found in modules.dep» я не селен в английском (полный профан) но по русскому сегменту вижу что это проблема debiana

Странно раньше ставилось все без проблем, были проблемы с активными секторами диска но это решалось fdisk -a и все . А сейчас и не знаю как это победить.

добавить в конец строки linux /boot/vmlinuz-3.16.0-4-amd64 .

Источник

Grub2 не генерирует конфиг

При вызове grub2-mkconfig выходит сообщение Generating grub.cfg . а далее /usr/sbin/grub2-probe: error: cannot find a GRUB drive for . Check your device.map. Генерирую из-под LiveCD Ubuntu под chroot. /dev,/proc смонтирован.

Как вызываете grub2-mkconfig? Только не говорите, что без параметров.

Напиши руками, там 20 строчек.

grub2-mkconfig -o /boot/grub2/grub.cfg

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

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

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

Он нормально работал, просто систему на новый хард перенес

просто систему на новый хард перенес

А UUID`ы поменяли где надо?

просто систему на новый хард перенес

а grub-install нормально отработал?

попробуй grub-mkdevicemap перед генераций конфига

Нука, откачу-ка я граб на версию пониже

так плюнь на убунту, да запусти с харда через chroot

дык и так из-под chroot grub пускаю

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

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

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

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

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

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

монтируй и /dev и /proc и /sys через -o bind

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

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

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

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

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

Источник

Ошибка при восстановлении загрузчика.

При стандартной процедуре восстановления загрузчика возникает проблема —
ошибка: invalid volume.
grub-install: ошибка: не удалось найти привод GRUB для /dev/sda5. Проверьте device.map.

Главное то, что файла device.map нет вообще. Кто-нибудь сталкивался с данной проблемой? Как можно её можно решить?

Обычно grub на /dev/sda ставят.

/dev/sda

Я как-раз на /dev/sda и ставил.

Ты сейчас можешь загрузиться в какую-либо ОС с жесткого диска или только с флешки или DVD?

Хорошо, загрузись с неё и кинь сюда вывод

По поводу странной разметки можно не писать(сам знаю).

Да у тебя она не просто странная: выводы fdisk и blkid не совпадают! Да и вообще бред какой-то: зачем нужен EFI раздел на dos разметке, он ведь обычно на gpt?

Не могу ответить на этот вопрос, т.к вручную я EFI не настраивал. Возможно это является последствием дуалбута с виндой(извиняюсь, если написал какой-то бред).

Я бы сейчас в первую очередь озаботился вытаскиванием данных с диска, пока всё совсем не накрылось. А уже потом всё остальное.

Тем не менее хотя бы одну из операционок надо восстановить.

Поможет ли здесь восстановление загрузчика в принцепе?

Поясняю: у тебя происходит какая-то фигня с разметкой диска. Обычно подобное чревато потерей данных с этого диска. Поэтому я рекомендую сначала сбросить на другой диск ценные данные (если ещё нет), а уже потом продолжать попытки восстановления.

Еще вопрос, покажите выхлоп (в тегах code или pre):
sudo gdisk -l /dev/sda

sudo gdisk -l /dev/sda

По поводу кода 42 на ntfs разделе немного огорчу
https://www.win.tue.nl/

42 Windows 2000 dynamic extended partition marker
If a partition table entry of type 0x42 is present in the legacy partition table, then W2K ignores the legacy partition table and uses a proprietary partition table and a proprietary partitioning scheme (LDM or DDM). As the Microsoft KnowledgeBase writes: Pure dynamic disks (those not containing any hard-linked partitions) have only a single partition table entry (type 42) to define the entire disk. Dynamic disks store their volume configuration in a database located in a 1-MB private region at the end of each dynamic disk.

Именно их видит ядро и не видят fdisk и gdisk (и могли насоздавать разделов на занятом месте, записью в которые могла быть убита накрытая ими ФС).

Давайте смотреть выхлоп:
cat /proc/partitions

Эта фигня — Microsoft Dynamic Disk, см. сообщение выше.

Спасибо за инфу, просто практически не жил на винде.

cat /proc/partitions

Извиняюсь, что так долго не писал.
Выхлоп:

Если судить по /proc/partitions, то размеры отдельных разделов в сумме не превышают размера диска. Но это так, скорее всего, из-за того, что ядро читает только старые данные LDM — это логично, на динамическом диске не должно быть значимых данных ни в MBR, ни в GPT. А отыскать их (прежние разделы) в выводе fdisk и gdisk не удалось, кроме sda4.

Рассказывайте, как был размечен диск изначально, если точнее, как именно было уменьшено место, занятое Windows.

Попробуйте смонтировать видимые в LiveUSB разделы, что-то получится? Возможно, принудительно.

Если повезло, и все данные Windows действительно внутри sda4 (в чем я очень сильно сомневаюсь), то даже удастся вытащить данные.

Можно попробовать получить границы LDM-разделов (чтобы понять, есть ли неповрежденные) при помощи ldmtool: https://www.mankier.com/1/ldmtool
Можно попробовать найти границы разделов при помощи testdisk и надеяться, что не разрушены управляющие структуры, скопировать данные.

Иначе, стирать 1Mb в конце диска, переразмечать и переустанавливать обе системы.

История дуалбута.

Итак, решил всерьёз подумать о переходе с windows на linux. В качестве первого дистрибутива выбрал Manjaro с окружением KDE. Windows решил оставить до тех пор пока полностью не освоюсь в linux. Скачал Acronis Disk Director и с помощью него отрезал 400 с лишним ГБ от дисков C и D. При установке самого manjaro решил воспользоваться функцией замены раздела. С этого момента и начались мои мучения. С начала были проблемы с fsck, потом device UUID=. not found. В итоге, многократно переустанавливая линукс с разными разметками, я пришёл к чёрному экрану с надписью GRUB и мигающим курсором:

Что и почему получилось — вполне понятно, ссылки выше уже давал.
Главная ошибка — необходимо было предварительно преобразовать динамический (Dynamic) диск в базовый (Basic) в терминологии Windows.

Без этого у вас получилось примерно следующее.
1) В MBR была запись о единственном первичном (primary) разделе с типом 0x42 и размером на весь диск; в последнем МБ этого раздела лежала реальная LDM-таблица разделов этого диска;

Acronis Disk Director и с помощью него отрезал 400 с лишним ГБ от дисков C и D.

возникает вопрос, действительно ли он умеет работать с LDM и что получилось при отрезании:
а) умеет, изменены (1) размеры ФС «дисков» C: и D:, (2) границы разделов внутри LDM, (3) границы внешнего контейнера в MBR;
б) не умеет, изменены размеры только внешнего контейнера.
Почему-то кажется, что у варианта (б) больше шансов :(, ведь динамический диск не может содержать дополнительных разделов внутри MBR и/или GPT. Но это мои домыслы, тут нужно исследовать вопрос по версии ADD, его документации, а при тишине в ней на эту тему — путем натурного эксперимента.

3) После создания разделов и установки Linux то, что получилось, могло выглядеть как-то так:

На картинке оптимистичный вариант, когда «диск D:» не был затерт, но это не гарантировано.

4) Если не было ценных данных, или есть их резервная копия, переразметьте и переставьте обе системы.
Если были — самое время озаботиться вопросом, 1) целы ли они и 2) куда переписать то, что еще не убито.

5) Если поддержка все же была, преобразование в Basic диск в том же ADD должно помочь, если он сможет оставить и MBR, и LDM разделы в MBR варианте.

На картинке оптимистичный вариант, когда «диск D:» не был затерт

К сожалдению, скорее всего «диска D» больше нет, т.к. из линукса можно взаимодействовать только с «C:».
Сейчас буду пытаться переустанавливать винду, а с неё уже посмотрю, что можно сделать.

Снеси все разделы и создай 3 следующих раздела: /, /home, /swap

После переустановки что-либо делать будет уже поздно, скорее всего, прежним данным будет хана. Если такой ваиант устраивает, сразу делайте Basic разметку, не Dynamic. Если в интерфейсе установщика на эту тему ничего не найдете, shift+F10, diskpart в помощь.

Сейчас буду пытаться переустанавливать винду

Линуксы могут работать без винды. Без винды они работают даже лучше.

Вопрос 1: чем сносить LDM?
В установщике Windows это легко сделать из diskpart.
В Linux-ах на ум приходит только dd или ldmtool (мало где есть в установщиках?)

Пока на диске есть LDM, ядро не увидит разделов из MBR.

Тем не менее, есть шанс его найти при помощи testdisk или других утилит восстановления данных.

Благодарю за ответ, надеюсь скоро отпишусь о том, что получилось.

Успешная установка

Спустя 3 с небольшим дня всё же установил linux. Для этого пришлось скинуть файлы в облако и создать новую GPT(и решить 3-4 возникшие проблемы). Спасибо всем за помощь! В следующий раз буду внимательнее при установке какой-либо системы дуалбутом с виндой.

Источник

Forum rules
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

harley_biker

[Solved] Error: Cannot find a GRUB drive for /dev/sdb1.

Have the first drive working fine. Have a second drive with XP and 40_custom indicating:
menuentry «XP (on /dev/sdb1)» {
insmod ntfs
set root=(hd0,1)
search —no-floppy —fs-uuid —set 9ee8cf34e8cf0a0b
chainloader +1

No matter what sdb1 is changed to (hd0, hd1, hd2 etc) the grub loader cannot find the second drive.

Found Microsoft Windows XP Professional on /dev/sdb1
grub-probe: error: Cannot find a GRUB drive for /dev/sdb1. Check your device.map.

Any help is appreciated.

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

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

remoulder

Level 17
Level 17
Posts: 7621
Joined: Fri May 09, 2008 1:14 pm

Re: Error: Cannot find a GRUB drive for /dev/sdb1.

Post

by remoulder » Sun Mar 14, 2010 6:42 pm

Please download and run the boot info script, details here, and post the results.txt back here.

[Edit] your original post and add [SOLVED] once your question is resolved.

“The people are my God” stressing the factor determining man’s destiny lies within man not in anything outside man, and thereby defining man as the dominator and remoulder of the world.

harley_biker

Re: Error: Cannot find a GRUB drive for /dev/sdb1.

Post

by harley_biker » Sun Mar 14, 2010 10:47 pm

Thanks remoulder for the reply. Lot’s of guys are looking for answers. Linux has a big learning curve for people getting their feet wet :)

Solved the issue: Found some code that remapped the drive. For others trying to dual boot, or run multiple drives with error messages can try this simple code.

Be sure to make sure your first boot drive is the drive that has the grub loader.

1) Bring up terminal.

Enter: sudo grub-mkdevicemap

Enter: sudo update-grub

Done :wink:

I previously posted here with this question, which is now resolved. I am trying to install ubuntu 15.10 on my macbook pro with a flash drive. Specifically, I am following these instructions I found by searching, however I did not follow Part 1 of this guide since I am using a flash drive that my friend put Ubuntu onto already. I hope this is not related to the problem that I am having now.

I am now up to part 4: making Ubuntu bootable. I am up to the step where I have to type into terminal:

grub-mkconfig -o boot/grub/grub.cfg
And this is the results that I get:
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.2.0-38-generic
Found initrd image: /boot/initrd.img-4.2.0-38-generic
Found linux image: /boot/vmlinuz-4.2.0-16-generic
Found initrd image: /boot/initrd.img-4.2.0-16-generic
grub-probe: error: cannot find a GRUB drive for /dev/sdc1.  Check your device.map. 
done

When I use

cat /boot/grub/device.map 

(which I found in a similar forum post)

All I get is:

(hd0)   /dev/disk/by-id/ata-APPLE_SSD_SM0256F_S1K4NYAFC30996

(hd1)   /dev/disk/by-id/usb-SanDisk_Cruzer_4C531001431122101253-0:0

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

sudo fdisk -1 gives me:

sudo: unable to resolve host ubuntu
Disk /dev/ram0: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram1: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram2: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram3: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram4: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram5: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram6: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram7: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram8: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram9: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram10: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram11: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram12: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram13: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram14: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram15: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/loop0: 1.1 GiB, 1130688512 bytes, 2208376 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 233.8 GiB, 251000193024 bytes, 490234752 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: BD61344F-612D-4DB6-9691-47475BB7DFE3

Device         Start       End   Sectors   Size Type
/dev/sda1         40    409639    409600   200M EFI System
/dev/sda2     409640 425544751 425135112 202.7G Apple Core storage
/dev/sda3  425544752 426814287   1269536 619.9M Apple boot
/dev/sda4  426814288 431791719   4977432   2.4G Apple HFS/HFS+
/dev/sda5  431792128 447791103  15998976   7.6G Linux swap
/dev/sda6  447791104 490233855  42442752  20.2G Linux filesystem


Disk /dev/sdc: 29.8 GiB, 32015679488 bytes, 62530624 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x429817b4

Device     Boot   Start     End Sectors  Size Id Type
/dev/sdc1  *          0 2301535 2301536  1.1G  0 Empty
/dev/sdc2       2279532 2284075    4544  2.2M ef EFI (FAT-12/16/32)
root@ubuntu:/# 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

root@ubuntu:/# cat /boot/grub/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 ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  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="0"
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 recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; 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
}

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-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6  e3b2cb67-7623-4f39-a4e5-1b3082a03c02
else
  search --no-floppy --fs-uuid --set=root e3b2cb67-7623-4f39-a4e5-1b3082a03c02
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_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=hidden
    set timeout=0
  # Fallback hidden-timeout code in case the timeout_style feature is
  # unavailable.
  elif sleep --interruptible 0 ; then
    set timeout=0
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30,0; then
  clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
    set gfxpayload="${1}"
    if [ "${1}" = "keep" ]; then
        set vt_handoff=vt.handoff=7
    else
        set vt_handoff=
    fi
}
if [ "${recordfail}" != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-e3b2cb67-7623-4f39-a4e5-1b3082a03c02' {
    recordfail
    load_video
    gfxmode $linux_gfx_mode
    insmod gzio
    if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
    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-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6  e3b2cb67-7623-4f39-a4e5-1b3082a03c02
    else
      search --no-floppy --fs-uuid --set=root e3b2cb67-7623-4f39-a4e5-1b3082a03c02
    fi
    linux   /boot/vmlinuz-4.2.0-38-generic.efi.signed root=UUID=e3b2cb67-7623-4f39-a4e5-1b3082a03c02 ro  quiet splash $vt_handoff
    initrd  /boot/initrd.img-4.2.0-38-generic
}
submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-e3b2cb67-7623-4f39-a4e5-1b3082a03c02' {
    menuentry 'Ubuntu, with Linux 4.2.0-38-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.2.0-38-generic-advanced-e3b2cb67-7623-4f39-a4e5-1b3082a03c02' {
        recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        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-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6  e3b2cb67-7623-4f39-a4e5-1b3082a03c02
        else
          search --no-floppy --fs-uuid --set=root e3b2cb67-7623-4f39-a4e5-1b3082a03c02
        fi
        echo    'Loading Linux 4.2.0-38-generic ...'
        linux   /boot/vmlinuz-4.2.0-38-generic.efi.signed root=UUID=e3b2cb67-7623-4f39-a4e5-1b3082a03c02 ro  quiet splash $vt_handoff
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-4.2.0-38-generic
    }
    menuentry 'Ubuntu, with Linux 4.2.0-38-generic (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.2.0-38-generic-init-upstart-e3b2cb67-7623-4f39-a4e5-1b3082a03c02' {
        recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        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-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6  e3b2cb67-7623-4f39-a4e5-1b3082a03c02
        else
          search --no-floppy --fs-uuid --set=root e3b2cb67-7623-4f39-a4e5-1b3082a03c02
        fi
        echo    'Loading Linux 4.2.0-38-generic ...'
        linux   /boot/vmlinuz-4.2.0-38-generic.efi.signed root=UUID=e3b2cb67-7623-4f39-a4e5-1b3082a03c02 ro  quiet splash $vt_handoff init=/sbin/upstart
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-4.2.0-38-generic
    }
    menuentry 'Ubuntu, with Linux 4.2.0-38-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.2.0-38-generic-recovery-e3b2cb67-7623-4f39-a4e5-1b3082a03c02' {
        recordfail
        load_video
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        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-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6  e3b2cb67-7623-4f39-a4e5-1b3082a03c02
        else
          search --no-floppy --fs-uuid --set=root e3b2cb67-7623-4f39-a4e5-1b3082a03c02
        fi
        echo    'Loading Linux 4.2.0-38-generic ...'
        linux   /boot/vmlinuz-4.2.0-38-generic.efi.signed root=UUID=e3b2cb67-7623-4f39-a4e5-1b3082a03c02 ro recovery nomodeset 
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-4.2.0-38-generic
    }
    menuentry 'Ubuntu, with Linux 4.2.0-16-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.2.0-16-generic-advanced-e3b2cb67-7623-4f39-a4e5-1b3082a03c02' {
        recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        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-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6  e3b2cb67-7623-4f39-a4e5-1b3082a03c02
        else
          search --no-floppy --fs-uuid --set=root e3b2cb67-7623-4f39-a4e5-1b3082a03c02
        fi
        echo    'Loading Linux 4.2.0-16-generic ...'
        linux   /boot/vmlinuz-4.2.0-16-generic root=UUID=e3b2cb67-7623-4f39-a4e5-1b3082a03c02 ro  quiet splash $vt_handoff
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-4.2.0-16-generic
    }
    menuentry 'Ubuntu, with Linux 4.2.0-16-generic (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.2.0-16-generic-init-upstart-e3b2cb67-7623-4f39-a4e5-1b3082a03c02' {
        recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        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-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6  e3b2cb67-7623-4f39-a4e5-1b3082a03c02
        else
          search --no-floppy --fs-uuid --set=root e3b2cb67-7623-4f39-a4e5-1b3082a03c02
        fi
        echo    'Loading Linux 4.2.0-16-generic ...'
        linux   /boot/vmlinuz-4.2.0-16-generic root=UUID=e3b2cb67-7623-4f39-a4e5-1b3082a03c02 ro  quiet splash $vt_handoff init=/sbin/upstart
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-4.2.0-16-generic
    }
    menuentry 'Ubuntu, with Linux 4.2.0-16-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.2.0-16-generic-recovery-e3b2cb67-7623-4f39-a4e5-1b3082a03c02' {
        recordfail
        load_video
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        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-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6  e3b2cb67-7623-4f39-a4e5-1b3082a03c02
        else
          search --no-floppy --fs-uuid --set=root e3b2cb67-7623-4f39-a4e5-1b3082a03c02
        fi
        echo    'Loading Linux 4.2.0-16-generic ...'
        linux   /boot/vmlinuz-4.2.0-16-generic root=UUID=e3b2cb67-7623-4f39-a4e5-1b3082a03c02 ro recovery nomodeset 
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-4.2.0-16-generic
    }
}

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

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

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

### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###

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

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### 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 ###
root@ubuntu:/# 

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

I am running Linux Mint 19.1 on a Samsung 860 EVO 500 GB (dev/sdb) along with Windows 10 on it and recently added a Crucial MX500 1TB (dev/sda) to try out and use more distros, both of them are partitionated. After that installing GRUB on the MX500 failed while installing the other distros (Kali and Parrot), I tried running

sudo update-grub

which returned the following errors:

/usr/sbin/grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
Found Kali GNU/Linux Rolling (kali-rolling) on /dev/sda1
/usr/sbin/grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
/usr/sbin/grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
/usr/sbin/grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
/usr/sbin/grub-probe: error: cannot find a GRUB drive for /dev/sda3.  Check your device.map.
Found Parrot 4.5 (4.5) on /dev/sda3
/usr/sbin/grub-probe: error: cannot find a GRUB drive for /dev/sda3.  Check your device.map.

Mint and Windows were detected with no errors being returned. The GRUB manual page indeed suggested editing device.map (https://www.gnu.org/software/grub/manual/grub/html_node/Device-map.html), which I do not know how to do (and I also could not find the file in /boot/grub/, it does not appear to be present in GRUB 2 anymore), I also did not understand the instructions at https://www.gnu.org/software/grub/manual/grub/html_node/Device-map.html. I also searched various forums, which e.g suggested deleting grub.cfg and let it be regenerated by updating grub again or running

 sudo grub-mkdevicemap

All of this did not work.

A comment asked for the output of lsblk, so here it is:

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0    7:0    0 157,2M  1 loop /snap/brave/58
loop1    7:1    0  91,1M  1 loop /snap/core/6531
loop2    7:2    0 152,7M  1 loop /snap/brave/44
loop3    7:3    0  34,8M  1 loop /snap/gtk-common-themes/1122
loop4    7:4    0 155,5M  1 loop /snap/brave/57
loop5    7:5    0  89,3M  1 loop /snap/core/6673
loop6    7:6    0  34,6M  1 loop /snap/gtk-common-themes/818
loop7    7:7    0    91M  1 loop /snap/core/6405
loop8    7:8    0  35,3M  1 loop /snap/gtk-common-themes/1198
sda      8:0    0 931,5G  0 disk 
├─sda1   8:1    0   326G  0 part 
├─sda2   8:2    0  31,3G  0 part 
├─sda3   8:3    0 195,3G  0 part 
└─sda4   8:4    0  15,9G  0 part 
sdb      8:16   0 465,8G  0 disk 
├─sdb1   8:17   0   549M  0 part 
├─sdb2   8:18   0 239,8G  0 part 
├─sdb3   8:19   0     1K  0 part 
└─sdb5   8:21   0 225,5G  0 part /
sdc      8:32   0 931,5G  0 disk 
└─sdc1   8:33   0 931,5G  0 part 

sdc is my HDD, no OS installed there. sdb2 is Windows, sdb5 is Mint.

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

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

А вот еще интересные материалы:

  • Яшка сломя голову остановился исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного где ошибка
  • Grub install ошибка не удалось получить канонический путь overlay
  • Grub install ошибка не удалось получить канонический путь cow