:: Re: [DNG] reinstalling GRUB2
トップ ページ
このメッセージを削除
このメッセージに返信
著者: fsmithred
日付:  
To: dng
題目: Re: [DNG] reinstalling GRUB2
On 7/22/19 1:48 AM, Steve Litt wrote:
> On Sun, 21 Jul 2019 20:25:42 +0100
> Simon Hobson <linux@???> wrote:
>


>>
>> 2) use these incantations, lifted from a post elsewhere :
>>
>> mkdir /sysroot
>> mount /dev/your-root-dev /sysroot
>> mount /dev/your-boot-dev /sysroot/boot
>> mount --bind /dev /sysroot/dev
>> mount --bind /sys /sysroot/sys
>> mount --bind /proc /sysroot/proc
>> mount --bind /run /sysroot/run (recommended if you are using systemd)
>> chroot /sysroot
>> grub-install /dev/your-grub-boot-device (may be grub2-install on some
>> distro)
>
> *Exactly* what do you mean by "your-grub-boot-device"? Does it vary
> depending on MBR vs UEFI?


Yes, it varies depending on BIOS vs. UEFI boot. For bios boot, the grub
boot device is the drive whose mbr you want to use, like /dev/sda or /dev/sdb.

For UEFI, you don't name the device. Grub knows to put the bootloader in
the efi partition. In that case, an extra step above would be to mount the
efi partition to /sysroot/boot/efi

>
> So now you've installed Grub(2), but then how do you configure grub?


While you are still in the chroot, run:

update-grub

And that will make a new boot menu.



fsmithred