Bug#1061525: does not boot from multi-device root filesystems

2024-01-28 Thread Steinar H. Gunderson
On Sun, Jan 28, 2024 at 10:06:48PM +0100, Steinar H. Gunderson wrote:
>>  - The initramfs scripts attempt to rewrite UUID= _back_ to a
>>single /dev device through probing, and give that to mount. It needs
>>to avoid doing so for (multi-device) bcachefs filesystems, or they
>>will never mount since they contain too few devices.
> Fix in #1060411.

Also a patch for klibc's fstype, though I figured afterwards that blkid seems
to work just fine, in #1061662.

/* Steinar */
-- 
Homepage: https://www.sesse.net/



Bug#1061525: does not boot from multi-device root filesystems

2024-01-28 Thread Steinar H. Gunderson
forward 1061525 https://savannah.gnu.org/bugs/index.php?65151
block 1061525 by 1060256
block 1061525 by 1060411 
tags 1061525 + patch
kthxbye

On Thu, Jan 25, 2024 at 10:44:04PM +0100, Steinar H. Gunderson wrote:
>  - Likewise, root= on the kernel command line must contain the UUID
>or the initramfs scripts will wait on some colon-separated device that does
>not (and will never) exist. grub-mkconfig must be updated to write root=
>_back_ from a colon-separated device list to a UUID; I don't know if there
>is already some kind of support for UUID-roots, but I think so.
>As of today, it fails with:
> 
>  /usr/sbin/grub-probe: error: failed to get canonical path of 
> `/dev/nvme1n1p1:/dev/dm-2'.

Patch in https://savannah.gnu.org/bugs/index.php?65151 .

>  - initramfs must contain mount.bcachefs, since that is the only thing
>that knows how to probe a UUID into multiple devices. This means that
>the Rust parts needs to be built again, too (see #1060256).

#1060256 now has a patch/unofficial package.

>  - The initramfs scripts attempt to rewrite UUID= _back_ to a
>single /dev device through probing, and give that to mount. It needs
>to avoid doing so for (multi-device) bcachefs filesystems, or they
>will never mount since they contain too few devices.

Fix in #1060411.

I've verified that this makes my multi-device root filesystem (specified with
UUID= in fstab, and without errors=remount-ro) configure GRUB and boot on its
own, without any obvious issues.

/* Steinar */
-- 
Homepage: https://www.sesse.net/



Bug#1061525: does not boot from multi-device root filesystems

2024-01-26 Thread Steinar H. Gunderson
On Thu, Jan 25, 2024 at 10:44:04PM +0100, Steinar H. Gunderson wrote:
>  - The GRUB command line must be rw, not ro; mounting with -o remount,rw
>gives: “bcachefs: bch2_parse_mount_opts() Invalid mount option errors:
>invalid selection”. I don't know if this is an upstream issue or if
>this is just considered a bug in our setup.

This is evidently due to “errors=remount-ro” in fstab; removing that fixes
it. But it's probably an upstream bug, since supposedly that's a valid
option.

/* Steinar */
-- 
Homepage: https://www.sesse.net/



Bug#1061525: does not boot from multi-device root filesystems

2024-01-25 Thread Steinar H. Gunderson
Package: bcachefs-tools
Version: 24+really1.3.4-2
Severity: normal

I have / as a multi-device bcachefs filesystem (two different SSDs,
with replicas=1). Booting from it was an, well, interesting endeavor :-)
It seems the following must be done in Debian before this Just Works(TM):

 - /etc/fstab must contain the UUID, not a colon-separated list of
   devices, or systemd will wait forever (because it doesn't understand
   the syntax; I believe this is an upstream issue).

 - Likewise, root= on the kernel command line must contain the UUID
   or the initramfs scripts will wait on some colon-separated device that does
   not (and will never) exist. grub-mkconfig must be updated to write root=
   _back_ from a colon-separated device list to a UUID; I don't know if there
   is already some kind of support for UUID-roots, but I think so.
   As of today, it fails with:

 /usr/sbin/grub-probe: error: failed to get canonical path of 
`/dev/nvme1n1p1:/dev/dm-2'.

 - initramfs must contain mount.bcachefs, since that is the only thing
   that knows how to probe a UUID into multiple devices. This means that
   the Rust parts needs to be built again, too (see #1060256).

 - The initramfs scripts attempt to rewrite UUID= _back_ to a
   single /dev device through probing, and give that to mount. It needs
   to avoid doing so for (multi-device) bcachefs filesystems, or they
   will never mount since they contain too few devices.

 - The GRUB command line must be rw, not ro; mounting with -o remount,rw
   gives: “bcachefs: bch2_parse_mount_opts() Invalid mount option errors:
   invalid selection”. I don't know if this is an upstream issue or if
   this is just considered a bug in our setup.

I don't have patches for any of this, unfortunately; I've just finagled
it by hand in my local system. But it's at least a laundry list :-)

/* Steinar */