|
|
Log in / Subscribe / Register

Also on Debian based systems

Also on Debian based systems

Posted Jul 30, 2020 23:19 UTC (Thu) by dmoulding (subscriber, #95171)
In reply to: Also on Debian based systems by zlynx
Parent article: Grub2 updates for Red Hat systems are making some unbootable

This is giving me a mental segfault.

There should be nothing wrong with doing "grub-install /dev/sda", assuming /dev/sda is the disk that contains the ESP. And, in fact, if you're running grub-install from a rescue system (which is UEFI) against another UEFI system's disk (such that the system currently has *two* disks attached to it, each one containing an ESP), then specifying the disk should be *mandatory* because otherwise grub-install has to choose which of the two it should install to, and it's almost certainly not going to guess that correctly every time. I would think the same would apply if you've got a rescue USB stick plugged into the system, which also contains an ESP.


to post comments

Also on Debian based systems

Posted Jul 31, 2020 2:20 UTC (Fri) by nivedita76 (guest, #121790) [Link] (2 responses)

grub-install takes an --efi-directory argument to specify where the ESP has been mounted.

Also on Debian based systems

Posted Jul 31, 2020 3:16 UTC (Fri) by dmoulding (subscriber, #95171) [Link] (1 responses)

Oh, for sure. But if you tell it which disk you want to install it to, it can easily find the ESP on that disk (by looking for the one with the ESP type UUID) and mount it itself. Then you don't need to bother mounting it in advance, nor telling it where you've mounted it.

I suppose it's still got to know which file system has the contents of /boot so that it knows where to put its modules, and the other things it wants to put in /boot/grub. That's a little harder since there isn't a designated type UUID for the partition containing /boot (and it could be on an LVM volume or something else that's not a GPT partition). So you might have to in some cases give it the --boot-directory option, as well (or mount the desired file system at /boot in advance).

Nevertheless, I still don't see how specifying a disk (as long as it's not wrong), could be more harmful than not specifying a disk.

Also on Debian based systems

Posted Jul 31, 2020 15:38 UTC (Fri) by nivedita76 (guest, #121790) [Link]

Right, I was just explaining how you can tell it which ESP if there's more than one. It could be doing that if you just supply the device name as well, just unsure if it does.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds