[syslinux] extlinux| Failed to load ldlinux.c32 with btrfs subvolume

Erik Erik.Haller at BroadLux.com
Sun Sep 29 12:42:34 PDT 2019


I am new to syslinux/extlinux. Can I boot from a linux btrfs subvolume? 
I am getting "Failed to load ldlinux.c32" when I attempt to boot from a 
btrfs subvolume.

Setup:

1) I have a USB disk with one partition. The partition is marked "active".
2) I make a btrfs filesystem with "mkfs.btrfs /dev/sdd1". I mount the 
partiton and execute "btrfs su create root".
3) I set the default volume with "btrfs set-default 257 ." for the 
"root" subvolume".
I unmount/mount /dev/sdd1 and then untar a Linux Debian/Buster (Testing) 
OS with all the latest updates and the extlinux package.
4) I "mount --bind" "proc sys dev dev/pts run" onto the mounted 
/dev/sdd1 and chroot to it.
5) I execute "extlinux --install /". Now I have a /ldlinux.c32 file 
present. I also copy the linux kernel vmlinuz-5.2.0-2-686-pae and 
initrd.img-5.2.0-2-686-pae to /.
6) I make a /extlinux.conf file. Here it is:

# vim: ft=conf
Default linux
LABEL linux
LINUX /vmlinuz-5.2.0-2-686-pae
INITRD /initrd.img-5.2.0-2-686-pae
APPEND ipv6.disable=1 rw fsck.mode=skip systemd.restore_state=0 
root=/dev/sda1 rootflags=subvol=/root,noatime,nospace_cache,clear_cache

7) I unmount everything and attempt to boot the USB disk. I receive 
"Failed to load ldlinux.c32" on the console.

extlinux: 6.04 (bf6db5b4)

Note:

I am able to successfully boot a btrfs subvolume if I place the 
extlinux.conf at / when I mount the disk with "mount -o subvolid=0 
/dev/sdd1 /mnt".
I "cd /mnt" and "mv 
root/ldlinux.c32|extlinux.conf|vmlinuz-5.2.0-2-686-pae|initrd.img-5.2.0-2-686-pae" 
files to /mnt.
One special problem with this setup is that symbolic links are not followed.
For example, if I symlink /mnt/vmlinuz -> 
/mnt/root/boot/vmlinuz-5.2.0-2-686-pae, extlinux
will not find the Linux kernel by following the symlink. I have to copy 
the Linux kernel and initrd.img to /.
I would like to get the subvolume setup working so I do not have to 
change extlinux.conf
with the new Linux kernel and initrd.img filenames when I upgrade.

Any suggestions would be much appreciated.

Thank you for your help,
Erik
  --




More information about the Syslinux mailing list