BIOS / GRUB не может обнаружить внешний жесткий диск

Не удается загрузить с Linux из-за того, что меню загрузки BIOS и консоль аварийного образа GRUB не могут обнаружить внешний жесткий диск

задан 20 June 2020 в 03:50

1 ответ

Due to the limitations of some BIOS, external hard drives are unable to be detected. A work around is to use USB drive to load GRUB which then run configfile of grub.cfg inside external hard drive. However GRUB uses data from BIOS to get the list of devices, thus external hard drive is still not visible. The solution is to use GRUB native driver to look for the external driver.

Switch from firmware disk drivers to native ones.

Using nativedisk, all your USB devices will be detected by GRUB using GRUB's own drivers instead of data from BIOS. Once this is done, you can use ls normally inside the grub> console and all of your USB devices will be listed. By listing each device one by one, you then find the root of Linux installation, boot folder, grub folder, and grub.cfg. eg: ls (hd1,msdos2)/boot/grub/ output: grub.cfg

Load file as a configuration file. If file defines any menu entries, then show a menu containing them immediately. Any environment variable changes made by the commands in file will not be preserved after configfile returns.

Using the command configfile, we will load the grub.cfg inside the external drive to boot to it. eg: configfile (hd1,msdos2)/boot/grub/grub.cfg

The grub.cfg in the USB drive can then be modified to run nativedisk and configfile (hd1,msdos2)/boot/grub/grub.cfg automatically without user input.

Example grub.cfg to put inside USB Grub Rescue

configfile (hd1,msdos2)/boot/grub/grub.cfg
ответ дан 30 July 2020 в 22:25

Другие вопросы по тегам:

Похожие вопросы: