Bug#964906: This is still an issue in 11.2

2022-01-26 Thread Jason Michaelson
After two years i did a dist-upgrade on one particular system and this is
still an issue. I have to wonder why it got moved to btrfs-progs. This
really seems like a sequencing matter because all of the btrfs devices
aren't found before the system attempts to mount /. That makes me think
that it is an issue with initamfs-tools, especially since those of us who
have submitted potential fixes for it in this bug did so against initramfs
scripts.

I'm glad I had my script changes elsewhere and could migrate them from one
system to another when i encountered this problem. It would just be nice to
have it incorporated at the source.


Bug#964906: initramfs can't boot a raid1 btrfs root volume

2020-07-11 Thread Jason Michaelson
Package: initramfs-tools
Verston 0.137

I just installed a system using the testing netinst cd image [Debian
GNU/Linux bullseye-DI-alpha2 _Bullseye_ - Official Snapshot amd64 NETINST
20200315-11:07]

After install, I converted my btrfs root partition to a raid1 profile, with
the understanding that the Debian installer doesn't support that out of the
box yet. The problem I've had is that while the initramfs does a btrfs
device scan before trying to mount the root file system, when the mount
command in the initramfs executes, the second device in the btrfs
filesystem goes unfound.

If I run a btrfs device scan from the initramfs shell i can mount the root
file system just fine and continue to boot into the installed operating
system.

If i add the script lines from the pre-mount btrfs scripts to the
local_mount_root() in  /usr/share/initramfs-tools/scripts/local right
before the mount command is executed the initramfs works correctly. I have
a hunch this isn't the right solution, despite the fact that it works and I
know that the btrfs device scan in the pre-mount btrfs script does in fact
get executed. I'm simply unsure what the correct solution actually is with
this.

if [ -x /bin/btrfs ]
then
modprobe btrfs ||:
# If asked to be quiet, show only errors
[ "${quiet}" = "y" ] && exec >/dev/null
/bin/btrfs device scan
fi