You are not logged in.

#1 2014-07-20 04:18:51

yhylord
Member
Registered: 2013-12-24
Posts: 13

[SOLVED]Syslinux install failed with BTRFS subvolume /boot

I have a MBR 1GB device with Windows and brand new Arch on it.

After installing base and base-devel, partitioning devices, I've tried to install Syslinux.

But

# syslinux-install_update -iam
Syslinux BIOS install successful
FAILED to Set the boot flag on /dev/sda6[/bootfs]
# fdisk -l
...
/dev/sda6 *    211816845  311773454  49978305  83 Linux
...

And I couldn't see Syslinux also.
Any idea?

Last edited by yhylord (2014-07-21 06:44:39)

Offline

#2 2014-07-20 04:36:21

anatolik
Developer
Registered: 2012-09-27
Posts: 458

Re: [SOLVED]Syslinux install failed with BTRFS subvolume /boot

It is weird, the boot flag is set fine.

The error message comes from https://projects.archlinux.org/svntogit … s/syslinux and it is a result of failure of 'sfdisk /dev/sda -A 6'. Could you run the command manually and post its output?


Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster

Offline

#3 2014-07-20 04:37:51

anatolik
Developer
Registered: 2012-09-27
Posts: 458

Re: [SOLVED]Syslinux install failed with BTRFS subvolume /boot

You can also skip '-a' flag when run syslinux-install_update as the boot flag is already set.

FYI: I found syslinux works unstable with btrfs, that is why I moved /boot to a ext4 partition at the beginning of the disk. The rest of my machine root successfully uses btrfs.

Last edited by anatolik (2014-07-20 04:40:08)


Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster

Offline

#4 2014-07-20 06:06:09

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED]Syslinux install failed with BTRFS subvolume /boot

The last time I tried a few months back, syslinux didn't handle /boot on a subvolume so well.  This is assuming things haven't changed, but I think it uses the boot flag to find the partition to search on, then looks for /boot/syslinux and /syslinux.  So if from subvolid=0, you have /bootfs/syslinux which it cannot find.

Apart from the boot flag error (which it doesn't appear as though you really need to worry about), does the machine boot okay?  I ask out of curiosity more than anything else.

Offline

#5 2014-07-20 06:33:20

yhylord
Member
Registered: 2013-12-24
Posts: 13

Re: [SOLVED]Syslinux install failed with BTRFS subvolume /boot

anatolik wrote:

It is weird, the boot flag is set fine.

The error message comes from https://projects.archlinux.org/svntogit … s/syslinux and it is a result of failure of 'sfdisk /dev/sda -A 6'. Could you run the command manually and post its output?

# sfdisk /dev/sda -A 6
sfdisk: Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
sfdisk: Done
sfdisk: You have 0 active primary partitions. This does not matter for LILO,
but the DOS MBR will only boot a disk with 1 active partition.

Offline

#6 2014-07-20 06:34:58

yhylord
Member
Registered: 2013-12-24
Posts: 13

Re: [SOLVED]Syslinux install failed with BTRFS subvolume /boot

anatolik wrote:

You can also skip '-a' flag when run syslinux-install_update as the boot flag is already set.

FYI: I found syslinux works unstable with btrfs, that is why I moved /boot to a ext4 partition at the beginning of the disk. The rest of my machine root successfully uses btrfs.

# syslinux-install_update -im
Syslinux BIOS install successful
Installed MBR (/usr/lib/syslinux/bios/mbr.bin) to /dev/sda

And then when I tried to boot the computer:

Failed to load ldlinux.c32
Boot failed: please change disks and press a key to continue.

Finally I used a Windows disk to fix boot...

Offline

#7 2014-07-20 06:37:43

yhylord
Member
Registered: 2013-12-24
Posts: 13

Re: [SOLVED]Syslinux install failed with BTRFS subvolume /boot

WonderWoofy wrote:

The last time I tried a few months back, syslinux didn't handle /boot on a subvolume so well.  This is assuming things haven't changed, but I think it uses the boot flag to find the partition to search on, then looks for /boot/syslinux and /syslinux.  So if from subvolid=0, you have /bootfs/syslinux which it cannot find.

Apart from the boot flag error (which it doesn't appear as though you really need to worry about), does the machine boot okay?  I ask out of curiosity more than anything else.

I think your opinion makes sense. I've never installed Syslinux successfully on BTRFS.
But last time it says it can support btrfs now. And I think grub sucks. It's configuration file sucks.
So I want to use Syslinux if it's possible.

Offline

#8 2014-07-20 13:09:35

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED]Syslinux install failed with BTRFS subvolume /boot

What if you just make the subvolume /boot instead of /bootfs?  This could still be mounted to /boot on the running system later (what I assume would ultimately be /rootfs/boot).

Otherwise, I am curious as to whether it would be able to recognize /syslinux if you made /bootfs the default subvolume.  This would make it so that if you mounted the filesystem without any subvol= or subvolid= , it would automatically mount at /bootfs.  This could of course be overridden by the use of the kernel command line and fstab as necessary.

Offline

#9 2014-07-20 14:13:06

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED]Syslinux install failed with BTRFS subvolume /boot

It has been mentioned to me on IRC that setting the boot flag on an extended partition might not actually be enough for thing to work properly.

Ady2 on IRC wrote:

This is about how the MBR partition table selects the partition to boot to (in normal mbr.bin, "active" flag needs to be in sdx{1-4}, an "active" sdx6 is not enough). Alternative1: use primary partition. Alternative2: use altmbr.bin.

Offline

#10 2014-07-21 03:51:24

yhylord
Member
Registered: 2013-12-24
Posts: 13

Re: [SOLVED]Syslinux install failed with BTRFS subvolume /boot

WonderWoofy wrote:

What if you just make the subvolume /boot instead of /bootfs?  This could still be mounted to /boot on the running system later (what I assume would ultimately be /rootfs/boot).

Otherwise, I am curious as to whether it would be able to recognize /syslinux if you made /bootfs the default subvolume.  This would make it so that if you mounted the filesystem without any subvol= or subvolid= , it would automatically mount at /bootfs.  This could of course be overridden by the use of the kernel command line and fstab as necessary.

The same.

Offline

#11 2014-07-21 03:52:26

yhylord
Member
Registered: 2013-12-24
Posts: 13

Re: [SOLVED]Syslinux install failed with BTRFS subvolume /boot

WonderWoofy wrote:

It has been mentioned to me on IRC that setting the boot flag on an extended partition might not actually be enough for thing to work properly.

Ady2 on IRC wrote:

This is about how the MBR partition table selects the partition to boot to (in normal mbr.bin, "active" flag needs to be in sdx{1-4}, an "active" sdx6 is not enough). Alternative1: use primary partition. Alternative2: use altmbr.bin.

Last time when I used Syslinux, I can boot on /dev/sda6.
How to use altmbr.bin?

Offline

#12 2014-07-21 04:04:18

anatolik
Developer
Registered: 2012-09-27
Posts: 458

Re: [SOLVED]Syslinux install failed with BTRFS subvolume /boot

yhylord wrote:

How to use altmbr.bin?

http://www.syslinux.org/wiki/index.php/Mbr


Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster

Offline

#13 2014-07-21 06:44:03

yhylord
Member
Registered: 2013-12-24
Posts: 13

Re: [SOLVED]Syslinux install failed with BTRFS subvolume /boot

I just switch to ext4, and everything is fine now. Thank you guys.

Last edited by yhylord (2014-07-21 06:44:16)

Offline

Board footer

Powered by FluxBB