-
Install Syslinux:
apk add syslinux
-
Copy the Syslinux boot files: Create a directory for Syslinux in your boot partition (assuming it’s mounted at
/mnt/boot):mkdir -p /mnt/boot/syslinux cp /usr/share/syslinux/* /mnt/boot/syslinux/ -
Install the Syslinux bootloader: Use the
syslinuxcommand to install it directly to your disk:syslinux /dev/sdxY # Replace /dev/sdxY with your boot partition, like sda1 or nvme0n1p1 -
Create or edit the Syslinux configuration file: Create the
syslinux.cfgfile in/mnt/boot/syslinux:nano /mnt/boot/syslinux/syslinux.cfg
Add an entry similar to this:
DEFAULT linux LABEL linux KERNEL /vmlinuz-lts APPEND root=/dev/sdxY # Replace with your actual root partition, like sda2 or nvme0n1p2 INITRD /initramfs-lts -
Set the bootable flag: If you're using a partition table, make sure your boot partition is flagged as bootable. You can do this with
fdisk:fdisk /dev/sdx # Replace /dev/sdx with your disk, like sda or nvme0n1Then follow these steps:
- Press
ato toggle the bootable flag on the appropriate partition. - Press
wto write changes and exit.
- Press
-
Reboot your system:
umount -R /mnt reboot
Last active
October 28, 2024 00:56
-
-
Save lisenhatson/2545ba3218bb2066a3e437bcb175dd3f to your computer and use it in GitHub Desktop.
fix alpine mbr
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment