Hi Tobias, On 2026-08-24 18:31, Tobias Waldekranz wrote: > This is an initial RFC on the addition of LVM support to Barebox. > > Avid readers of Barebox lore might remember me describing LVM support > as a key part of my roadmap of how I would like to boot future > versions of Infix - a network centric OS I work on - in the original > device mapper series. [1] > > I have finally gotten some time to get this in a presentable state. > > Example session: > > wkz@spa:~/src/github.com/barebox/barebox$ ./barebox -i > disk0=infix-x86_64.disk,blkdev > [...] > barebox@Sandbox:/ lvm info > VG "internal": > UUID: sN8htx-oD18-wHWH-SuCU-1EWy-th1l-5WPU6j > SeqNum: 1 > Size: 132 MiB (1 MiB extents) > #PV: 1 > #LV: 1 > PV disk0.2: > UUID: 6VHjVF-WVt7-Gk4Y-oTrK-lsgY-ve7N-GJ0CUn > Size: 134 MiB > LV "infix-x86_64.raw": > UUID: Xp76Ig-9XXj-aBfK-Xv2U-rbsY-nEWX-omt4Bo > Type: linear > Size: 132 MiB > barebox@Sandbox:/ lvm activate internal infix-x86_64.raw > [GPT warnings...] > Created internal-infix-x86_64.raw > barebox@Sandbox:/ ls /mnt/internal-infix-x86_64.raw.0/ > mounted /dev/internal-infix-x86_64.raw.0 on > /mnt/internal-infix-x86_64.raw.0 > bin boot cfg config dev etc home > lib lib64 loader log media mnt opt > proc root run sbin srv sys tmp > usr var > barebox@Sandbox:/ > > If the overall structure is OK with the community and maintainers, > then the biggest remaining issue is testing. I have been surprised to > learn that the standard LVM tools will not operate on disk images > (without loopback mounting). Nor does there seem to be any other tools > out there that allows you to provision PVs/VGs/LVs without having them > "live" and attached to the host system. If there are any suggestions > here they would be very welcome!
Would guestfish be an option? That allows you to call pvcreate/vgcreate on disk images. Sascha
