Toot

Written by #?.info :commodore: on 2024-09-21 at 22:32

So, posting as a warning to others.

What I wanted: A Debian 12 PV/PVH domU running under Xen with a btrfs file system. My Xen Dom0 is another Debian 12 system (just installed! 12.7!)

What I got: technically it's possible, but everything is broken by default. Some people have implemented btrfs in their own pieces but it requires more than their pieces to work.

xen-create-image claims to support btrfs. It sort of does. But overall, Xen doesn't support it across the board.

There are two major problems:

  1. PyGrub is out. Completely. Forget it. Will bitch at you with a "unable to find partition containing kernel" message. It doesn't actually report it can't mount the drive because of a file system issue, and Googling that error message will get you lots of links about zeroing out the boot sector (!) but nothing about btrfs. But it is because PyGrub doesn't support btrfs. Now, I'm not blaming the PyGrub devs because they're relying on a third party library apparently to read file systems, but as of now btrfs isn't one of them.

  1. Assuming I set up PvGrub correctly, it doesn't either, which is odd. Want to try it? Enter "kernel = '/usr/lib/grub-xen/grub-x86_64-xen.bin'" and comment out the bootloader command. That's apparently how you launch it. I'm unconvinced that's right but...

  1. The default install of Debian 12 (also known as bookworm) sets up / in fstab with the option "errors=remount-ro". This is not a valid btrfs option and stops btrfs from remounting the main partition rw during the initial boot.

Third thing is easy to fix, remove all that crap, and while you're at it, add noatime and compress=lzo because we're not animals.

First and second: Basically you're going to have to use an external kernel and initrd. Now if you happen to be running Debian 12 as your Dom0 anyway, that's easy, just point them at your local files, something like this in your .cfg file:

kernel='/vmlinuz'

root='/dev/xvda2'

extra=' ro elevator=noop'

ramdisk='/initrd.img'

and comment out bootloader.

Now, I'm not sure if it's a side effect of this, or because the Debian installer has another problem, but it's worth noting the Ethernet device isn't called 'eth0' when you boot after making those changes. So you'll have to go into /etc/network/interfaces and change it to the name you get (in my case 'enX0')

I guess a second possible option might be to create an ext4 /boot partition for each Debian image, but that's going to be a pain with each set up. Reading the options I don't see xen-create-image doing it easily. And that's assuming it'll still boot.

For now though I guess I'll probably have to forget about btrfs. Which is a crying shame. This is so weird, the latter is now a default with some SuSE and Fedoras, so what's the deal with the lack of support? It's nearly 20 years old!

For those curious, pygrub supports the following (according to :/usr/lib/xen-4.17/lib/x86_64-linux-gnu/xenfsimage): ext2fs, fat, iso9660, reiserfs (urgh), ufs (!), xfs, and zfs.

Wonder which one works best with SSDs?

[#]xen #linux

=> More informations about this toot | View the thread | More toots from poundquerydotinfo@virctuary.com

Mentions

Tags

=> View xen tag | View linux tag

Proxy Information
Original URL
gemini://mastogem.picasoft.net/toot/113177916254832806
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
322.478668 milliseconds
Gemini-to-HTML Time
1.012004 milliseconds

This content has been proxied by September (3851b).