You are not logged in.

#1 2015-09-18 20:25:55

CarlD
Member
From: London
Registered: 2013-11-23
Posts: 128

[solution] syslinux and btrfs subvolume booting

Hi all,

Although syslinux does support btrfs, a little extra configuration of the syslinux.cfg file is required where using subvolumes. A failure to do so will result in the following error message when attempting to boot:

ERROR: Root device mounted successfully, but /sbin/init does not exist.

To explain the solution as clearly as possible, consider the following (BIOS) setup:

sda1: /boot (ext2)
sda2: /        (btrfs)
sda3: swap

sda2 is mounted and the subvolume 'ROOT' is created. The partition is then unmounted and remounted again:

mount -o noatime,subvol=ROOT /dev/sda2 /mnt

Other subvolumes are then created in the mounted ROOT subvolume (e.g. 'home', 'var', 'etc' and so on), although these do not affect this issue. The basic syslinux config generated would be:

syslinux.cfg

LABEL arch
MENU LABEL Arch Linux
LINUX ../vmlinuz-linux-lts
APPEND root=/dev/sda2 rw
INITRD ../initramfs-linux-lts.img

This will fail. The APPEND line of the file needs to be amended as follows:

APPEND root=/dev/sda2 rw rootflags=subvol=ROOT

Grub2 does this automatically. Will update the syslinux page on the Archwiki, although wanted to know if anyone had any other info that should be added.

Offline

Board footer

Powered by FluxBB