install grub boot-blocks

install

ubuntu

apt install grub-pc

slack150+

v15.0 now has the package available

slackpkg search grub-2

but you might need v2.12+ for F2FS

from source

see grub-source

requirements

define your target disk

fdisk -l
disk=/dev/sda
disk=/dev/nvme0n1
disk=/dev/loop0

define the boot folder – here within the root partition (default)

boot=/boot

–or–in case it is mounted from another system

boot=lala/boot

check your version (need F2FS support?)

grub-install -V

gpt

in case it is a GPT table, do this first (BIOS BOOT PARTITION)

cgdisk $disk

(about 1M free space is more than enough)
(it does not matter what partition number / slot you take)
type --> ef02
name --> bios-boot

partprobe $disk
fdisk -l $disk
ls -lF ${disk}*

ready to go

in any case, you can then proceed

grub-install --target=i386-pc --boot-directory=$boot $disk

and setup grub

troubleshooting

while using gentoo admincd (grub 2.12!) w/o chroot

grub-install: error: failed to get canonical path of `LiveOS_rootfs'.

==> see grub-rescue


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun