Gentoo Archives: gentoo-user

From: Peter Humphrey <peter@××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Can't boot btrfs
Date: Fri, 31 Jul 2015 09:36:04
Message-Id: 3518118.b1n1VSXoEv@wstn
Hello list,

I've created a new btrfs volume on SSDs, complete with a lot of subvolumes
corresponding to the old lvm2 logical volumes. I took the opportunity of
removing a couple of old partitions, so I now have this:

/dev/sd[ab]1 form /dev/md1 as /boot,
/dev/sd[ab]2 are my rescue system: sda2 is its root, sdb2 is its portage tree,
/dev/sd[ab]3 is the btrfs file system.

I can boot my rescue system with no problems, but not the main system - I get
a kernel panic with "BTRFS: failed to read the system array on sda3". I'm
writing this after chroot, su - prh, startx.

Both in the main and rescue systems I have this:
$ grep -i btrfs /usr/src/linux/.config
CONFIG_BTRFS_FS=y
CONFIG_BTRFS_FS_POSIX_ACL=y
# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set
# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set
# CONFIG_BTRFS_DEBUG is not set
# CONFIG_BTRFS_ASSERT is not set

The relevant grub.cfg entries (I've moved to grub-2) are:

menuentry 'Gentoo Linux 4.0.5, no network' {
        linux /boot/kernel-x86_64-4.0.5-gentoo root=/dev/sda3 softlevel=nonet 
net.ifnames=0 irqpoll
}
menuentry 'Rescue System 4.0.5' {
        linux /boot/kernel-x86_64-4.0.5-gentoo-rescue root=/dev/sda2 
net.ifnames=0 irqpoll
}

Something seemed to be wrong in the kernel setup, so to test that I compiled
the main kernel with the .config from the rescue system. Same result.

Another test: I wondered whether, somehow, the btrfs volume included the name
of the mount point where it had been created, and would only allow itself to
be mounted there. Not so: moving its mount point in the rescue system didn't
prevent it from being mounted. I didn't expect it would, since the kernel
panic occurs long before fstab is read.

The other thing I've tried is to build an initramfs with dracut. I tried to
include its btrfs module but it refused because it couldn't find a command
btrfs. So I recompiled the kernel with btrfs as a module and added
'filesystems+="btrfs" ' into dracut.conf. Still no success.

After a few days of floundering around, copious googling and getting splinters
under my fingernails I'm out of ideas. Can anyone see what else I can try? I
created the btrfs with "mkfs.btrfs -m raid1 -d raid1 --label GENTOO /dev/sda3
/dev/sdb3". I've done that twice, with all the subvolume creation and backup
recovery, the second time with --force.

-- 
Rgds
Peter

Replies

Subject Author
Re: [gentoo-user] Can't boot btrfs Neil Bothwick <neil@××××××××××.uk>
Re: [gentoo-user] Can't boot btrfs Rich Freeman <rich0@g.o>
Re: [gentoo-user] Can't boot btrfs Dale <rdalek1967@×××××.com>