0

My disk has 2 OS, Alpine and Debian, and a /home in a separated partition.

The bootloader is grub from Debian installed in the MBR (bios).

I want to use Alpine and its extlinux bootloader so I can remove the other OS to save space.

Alpine is on sda3

sda      8:0    0 465.8G  0 disk
├─sda1   8:1    0   300M  0 part
├─sda2   8:2    0  47.5G  0 part /mnt
├─sda3   8:3    0  78.4G  0 part /
└─sda4   8:4    0 335.6G  0 part /home

I have syslinux installed in Alpine. The begining of the MBR is overwritten for the syslinux like so .

doas dd bs=440 count=1 conv=notrunc if=/usr/share/syslinux/mbr.bin of=/dev/sda

The /boot directory looks like that

System.map-lts     extlinux.conf.old  ldlinux.sys        mboot.c32          vmlinuz-lts
config-lts         initramfs-lts      libcom32.c32       menu.c32
extlinux.conf      ldlinux.c32        libutil.c32        vesamenu.c32

The extlinux.conf

DEFAULT menu.c32
PROMPT 0
MENU TITLE Alpine/Linux Boot Menu
MENU HIDDEN
MENU AUTOBOOT Alpine will be booted automatically in # seconds.
TIMEOUT 10
LABEL lts
  MENU DEFAULT
  MENU LABEL Linux lts
  LINUX /boot/vmlinuz-lts
  INITRD /boot/initramfs-lts
  APPEND root=UUID=b0bd16c2-3546-4392-a7b2-fb8206933a47 modules=sd-mod,usb-storage,ext4 quiet rootfstype=ext4

MENU SEPARATOR

Then I ran

doas extlinux --install /boot

When I restart the PC "Intel boot agent" is not happy and brings me to the bios disk selection.

The Alpine live iso on an USB stick boots normally and it seems it uses extlinux. So I think the hardware is compatible. Whats wrong in this setup please ?

7
  • Is the Alpine partition the active boot partition?
    – Freddy
    Commented Mar 4, 2023 at 18:58
  • Hello I don't have knowledge about "active boot partition". After some search fdisk -l returns a list without stars in the "boot" column
    – Ploumploum
    Commented Mar 4, 2023 at 19:02
  • 1
    I think extlinux uses the active partition to boot. You can toggle the flag in fdisk. Run fdisk /dev/sda, type a, select partition 3 followed by w to write the changes. Reboot.
    – Freddy
    Commented Mar 4, 2023 at 19:10
  • Now extlinux is found but it asks for a "ldlinux" file.
    – Ploumploum
    Commented Mar 4, 2023 at 19:26
  • 1
    Hmm, ldlinux.c32 is there, it seems it cannot read the partition or it looks in the wrong place. Please check if the "64bit feature" is enabled on your ext4 filesystem (tune2fs -l /dev/sda3 | grep 64bit) and check your syslinux version. It might not be supported, see here.
    – Freddy
    Commented Mar 4, 2023 at 20:26

1 Answer 1

1

As the Freddy comment says, the partition that contains the boot directory wasn't flagged as "boot".

The boot flag can be enabled with the fdisk tool with root privileges. As instance for sda1 it can be: fdisk /dev/sda then a, answers 1 for partition number followed by w to write the change. The sda1 partition should now be flagged as boot.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .