#UGRD DM, issues
1 messages · Page 2 of 1
what?
ohhh
pull now
im actively working on that lol
the pains of 9999
i just fixed it
Works lmao
it should actually validate the luks mounts now
you can try to set the lvm info again lol
absolutely
Udev. Links went nuclear
ugrd is meant to have this kinda of checking
but in the past it errored out if it wasn't 100% sure it was a luks dm entry
and then i added lvm support and removed that so it just checked it was a dm item
Same start job. Hoping it’s not a udev thing again
and now it properly validates it
i think
well idk about that, i have tested this on a systemd vm and it boots fine
no lvm tho
i guess i need to make a system lvm test
none of my openrc systems care that symlink isn't there
Same thing
can you show the specific message?
also someone in support may really be able to help more here
idk that much about systemd
just that it is super touchy
i can barely get it running in lvm containers and it literally pollutes my cgroups when it runs
and if i don't let it, it refuses to run
in a container?!?!!?
yeah
maybe systemd is like "oh i see you have a device, let me wait until i see udev has handled that device"
but since it's already handled it just sits there and waits
well i see the vg0 folder isn't there for me
but it's mounted fine lol
im not entirely sure what is actually supposed to make that
Yeah I think so. It says if you do vgmknodes after, it creates a dangling link
I’m testing to see if you do the nodes before vgscan it’s fine?
you just add that to the lvm binaries, and the you add that line to the bash bit
yeah feel free to add the binary in a debug image and then see what is required, i bet you need to do it after vgscan or vgcgange
it could maybe be run last
it may just be there to help the system later
also most of the time im in the debug module i start by catting the init script and i more or less step through it
ohh if you can just add that to the main command that would be all you neeed
super simple pr if you want to make it lol
i can ofc
Yeah. Let me rebuild the initramfs, in concept it should work, now gotta edit UGRD lol
How do you apply a patch?
you can edit the site files directly lol
The scripts are in ‘usr/bin no?
The main lvm modules built in UGRD
I assume there .sh scripts somewhere in the system
Then I gotta edit, then and try UGRD, with the mknodes and see if it fixes
/usr/lib/python3.11/site-packages/ugrd/fs/
that is where the files actually live
you can also edit the init file in the build dir
and then repack the initramfs
pycpio --recursive --relative /tmp/initramfs -a /tmp/initramfs -o ugrd.cpio
you can do something like that too
pycpio is what ugrd uses to pack the images anyways
that recursively adds everything in /tmp/initramfs and then makes it all relative to that dir
you can do that to just plainly edit the built image and repack it
Oh do I need file,a bug report for UGRD, make install?
im not sure this is necessarily related
and we can wait for andrew, he is in charge of installkernel, more or less
ugrd is in the process of being merged into ::gentoo so there are a few small changes taht are being made
so this stuff is kinda already in flux/motion
but the fact it was making those weird dracut images is totally separate from ugrd, and i talked with andrew in irc today and they are working on some changes to the linux-firmware initramfs behavior
Fr, when dracut is so bad it’s making images without it even being installed 
i mean for one you're not even technically using the same 9999 ebuild that is latest in guru
because it's in dev, not master
yeah i really don't know what's up wht that, like that is the kind of shit i'd see and just reinstall from scratch
like i kinda don't fuck with that kinda behavior lol
dracut is just a bundle of hacks on hacks, im kinda not suprised at what it does at times but at the same time, you'd really expect something that is so widely used to just be better
Technically, for UGRD, could I just edit the files in python3.11, add the command and see if it recompiles successfully?
if you edit those site-package files then yea you're editing the live program more or less
it's not generally advisable but it's the most direct way to make a patch
i mean you can go really wrong editing your site-packages especially on gentoo where python is very integrated into the system
Ah alright, uh that’s weird. Vgscan —mknodes brings it up but still gives the link error
makes the /dev/vg0 and the symlink?
that's nice, and should probably still be added, but systemd can never be pleased 😦
Definitely, I found this long discussion
the issue is that they don't often clearly define requirements, at least from what i've seen
and it's rarely a hard st andard
things just happen to work a certain way
Seems like a systemd thing
Considered it’s been around for 9+ years
First accounts of these bugs I can find are 2009
maybe you can tell udev to run again?
i think pulling udev into the initramfs image is kinda excessive
like sure it has a point but it's a ton of stuff and needs databases and things to properly wokr
if systemd wants more than just the device nodes present it should tell udev to reload or something
not sit around and wait for things to time out
there may be a way to configure that
Definitely.
Also seems to be a completely mess of systemd, skipping certain Udev rules, then more Udev rules in tern skip the needed ones
Is it because your supposed to call Udev early the script to bring up /proc and /sys file systems?
I found this excerpt on Udev, not sure tho.
You would typically call udev fairly early in your startup sequence. One of the few things you should (must?) do before that is mount /proc and /sys. After starting the daemon, call udevadm trigger --action=add; udevadm settle to make udev process all pending events from the kernel (trigger) and wait until the events are processed before continuing (settle). You can then proceed to locate the device containing the root filesystem.
Besides the udevd binary, you'll need the other parts of udev on your initrd. This includes configuration files in /etc/udev, the base configuration in /lib/udev as well as helper binaries such as scsi_id also in /lib/udev. You need all the programs that are called from udev rules that you include in the initrd.
At the end of the initrd, before transfering control to the real root partition, you'll need to stop udevd like every other program from the initrd. This doesn't remove any device from /dev. Use mount --move /dev /root/dev to move the mounted /dev to the real root.
Gentoo has an initramfs guide and an initramfs wiki page which mention udev among other things. Initramfs is the modern successor to initrd, using a cpio archive rather than a filesystem image, and with a different process interface (on an initrd, /linuxrc must exit, whereas on an initramfs, /init must exec the init from the real root); most systems have switched these days (even if the file might still be called initrd)```
i use a devtpmfs
udev isn't really needed
it does some nice things like make syslinks for uuids of stuff
but it's really not required
and it's mostly for dynamic stuff
this is where i get caught up, because there's not really a single simple way to install udev
and if you have udev rules for your 4 required devices then udev is pointless
and i think switch_root moves that stuff
that move bit is from the old "initrd" days, this is an initramfs
The link exists?
What
ok so that mknodes thing worked?
im assuming that made it
becuase i don't see that on my test system
idk why systemd is upset?
or it only made one for root?
no wait all of those are there
idk why systemd is upset?
i mean if lvm sees all of it fine, it should work, maybe it's just really made that those weren't made by udev lol
yeah maybe you can read the systemd service files and see what it checks for
it may be worth disabling that service entirely if it is checking for something that doesn't matter
sometimes systemd just wants a super particular setup that doesn't really make sense
there's a chance it's checking for something important, but it may not be, kinda hard to tell with how it fails and how everything seems fine
Did you add another patch to UGRD? Broke again lol
Okay your mount patch broke it lol
I strongly suspect you have an initrd left over in your kernel source tree
Check /usr/src/linux/arch/x86/boot
Or equivalent for your arch
@livid solar what is the behaviour of ugrd if the image it wants to install already exists? Does it overwrite?
Maybe the bug here is that somehow ugrd is not overwriting the existing image and instead is appending to it somehow
Anyway, try to mv /usr/src/linux/arch/x86/boot/initrd to somewhere else, and then try to install again cleanly
(mv and not rm so we can inspect that image later)
which patch?
I don't think I made more patches besides removing some code I verified was unused
it rotates the file
so it will make a .old and overwrite it essentially
it has no mechanism to append, and you'd have to disable "clean mode" for it to not overwrite but it would error out if it sees a file in that case
the "clean mounts" stuff was old clode that unmounted things before switch root but it hasn't been used in a while and probably causes more harm than good anyways
is this installkernel with or without systemd?
if it is +systemd, and there is a left-over dracut initrd in the kernel source tree, and if then ugrd rotates the file. We will have initrd and initrd.old in the staging area where one is dracut and the other is ugrd
depending on the bootloader you are using and if you're using UKIs, these two initrds may get merged
it would also be helpful to have the full log from make install
if this is the case, then solution is to remove the left-over initrd in the kernel source tree as above
but also we should probably not have this rotate behaviour in the +systemd kernel-install plugin for ugrd
for -systemd it doesn't matter since we only use the exact match 'initrd'. But +systemd uses every file on the staging area that matches initramfs* or initrd*
i think installkernel but maybe not systemd? not entirely sure
I wasn't able to replicate any of this
i can add a --no-rotate option or something
if there is a "right" way to merge the files i may do that
i don't think julian was able to extract the cpio inside that packed cpio, was using lzma compression and didn't know how to decomprress it (i didn't either)
but seeing it wasn't xz it wasn't the plain ugrd image so gave us some info
what does the merging here?
if this just replaces a microcode cpio file that would be bad
i guess we need the full make install log but i think they don't have the uki flag and something was definitely merging the images, like there weren't 2 images being installed to the staging area
ukify for one does that
idk about others
having multiple initrd files on the staging area is not something I had in mind when writing most of these plugins
microcode file would be named microcode* not initramfs*
oh wait you're right lol i just fixed this, there was one small lingering bit of code
yeah i think for julian, the image had the microcode in it, and also contained another initramfs
im sure when they are back they can help provide the exact file and more info
yeah i can simply start by making it not do the rotate thing if called by dist-kernel
but this still doesn't help me understand how things are getting mashed together because ugrd doesn't do that at all
yeah I am also confused
but if this is -systemd then installkernel puts its stuff in the kernel source directory so I suspect that an old dracut initramfs is the origin of the dracut code
maybe obvious, but you did check that the files in the initramfs are not in the root file system?
i think they unpacked it and it had dracut stuff inside
maybe they didn't clean the build dir?
they were using gentoo-sources
@dull laurel i patched ugrd to not rotate files when used by installkernel, can you pull the latest 9999 and test when you have the time?
Ye
thanks
and maybe try cleaning the kernel build dir or seeing if you can find dracut bits hanging around
and you're sure you have the uki stuff disabled right?
I would just upgrade the kernel, it's a nice way of ensuring you're starting clean and saves compile time later
Note make clean is not sufficient, it does not remove initrd/UKI files
Question. What format does Dracut technically use?
It doesn’t seem it’s like yaml, toml or json tbh
cursed bash? idk
Lol true.
i've never seen anything else use that particular formatting, i think it may be based around bash? really not sure, its weird config syntax is one of the main things i hate about it
The only thing I wish UGRD was double quotes lol
wdym?
When you make the array for kmod_init
did you clean out the whole kernel dir?
like you're totally certain you deleted everything?
Yeah, but I’m triple checking rn
Yup.
Rm -rf’d the whole Linux-6.8.9 directory, andmodules
Also rm’d my boot
huh that is super strange @warped notch do you want any particular info to debug this?
i think if you can show the full output of make install that would help
like wgetpaste -c 'make install' in the build dir
Ok
that's all of it?
and you checked and that creatd image is not ugrd?
oh wait huh it's writing it to /tmp/initramfs_out/arch/x86/boot/initrd
is it writing it to /boot?
Ye, but I do get a initramfs file in ‘boot
Huh, that’s strange
Not anymore.
Works now. Got kernel panic tho lol
kernel panic means it's not loading ugrd
do you have xz enabled in the kernel?
you can disable compression if not
Oh wait LOL
I think it’s because make install yeah
When I built it yesterday I ran —no-compress
yeah you can set that in the config, there is info on the readme in the cpio section
Cpio_compression?
yup
if you set that to false it will not be used
i disable it sometimes for testing because the xz bit is by far the slowest part
the python module is single threaded :((
Oof
what part fails?
Oh might be secure boot
nah that shouldn't affect it
woah mine is failing too, im looking into it
Oh I thought it was just me
this is super weird? cryptsetup isn't able to read the device info or something?
woaahhhh
why is it using 1.7.0?
i thought i had 1.9.0 installed on this test...
Still failing
I’m wonder if cause my module signature is broken
It’s failing to load nvme
wtf it's reading the the boot uuuid not root??
oh i had that set, and it wasn't using the latest version?
that was to test to make sure it would correctly catch invalid devices
Uh is it a hardware thing or UGRD thing
After one patch yesterday I can’t see my caps lock light anymore lol
yeah so things are actually fine, i just had misconfg set and it didn't validate that properly
im wokring on that
but if it's autoconfiguring your luks/lvm stuff it should work
Validate the caps lock?
no validate that the luks entry is really a luks volume
if it's not reading your devices properly, i think you should check your kernel config
did you backup the known working config?
You can run vgmknodes, but it will always just mention udev is broken
and no, im not sure waht systemd wants there
bash
but are these files also on your / somewhere?
make install can't invent them, they must be coming from somewhere
wait are you running this from a live usb?
this log seems incomplete
Quick question. I can’t overwrite the ignore, list ? Even with kmod_init?
wdym? you can manually set kmod_ignore
Oddly, assumed kmod_init should overwrite ignore no?
no ignore is stronger
Anyway to ignore, the ignore?
My main issue is I can’t for the love of me get my Ethernet in at all, I need to apply some patches to test
Ok got it nvm.
ugrd generally avoids loading network stuff. it's generally better to have that stuff be loaded later - especially if firmware may be needed
Hey Zen, how is ugrd on lvm/Luks so far?
it should just work
Is the feature still wip?
systemd gets a bit unhappy if there are other lvm partitions
it doesn't mount them for some reason
Hey, I’m just getting a weird validation issue on UGRD. It won’t find my boot src.
what is the error?
and do you have it using your /boot mount and that's not mounted currently?
Well I got it working, weirdly it didn’t like a mounts.boot.source underneath
But now it’s hating cryptsetup 😭
wdym?
and yeah i made the config style a bit simpler, it should warn but work if you use an old style
It creates cryptsetup: root with my lvm (root) uuid
I think however it seems like because my lvm name is not root but rather lvm0, it’s failing
Ah gotcha.
do you have it manuall defined or are you using autodetect?
can you wgetpaste the log?
Okay, I keep somehow getting past these errors. I forgot do you support lz4?
Auto detect seems to work better rn
autodetect works?
nice, i'd just double check what it says it detected
well you may have been setting the wrong one, you should be setting the uuid of whatever contains it
Cool thanks.
Do I just set the compression to none, then manually lz4 it?
When I have time I might write a lz4 module / hook
Python be giving me a stroke tho.
Last thing, how do set the compression type to bone?
cpio_compression=“none” does not work in the toml?
Okay got it. Seems to work good cool. Here’s the issue earlier with my toml
ah i guess that error is fatal now lol
Lmao. What? Did you get this during testing 😭
What is it?
no i mean the mounts.boot.source thing
that is the old style
you've got to do llke:
[mounts.boot]
uuid = x
Okay. I’ll wgetpaste the new error now lol
Using this format with uuid= and type under, I get this
do you have autodetection in?
on
the "issue" is your root luks volume is called "gentoo"
in the config it's named root and it can't validate it
the info is right but the names differ
Auto detection, which module is that?
this i mean
ah i think the autodetection may be looking for the name root?
well that's what it is named here
I think so yeah. What’s weird is
When I do UGRD normally, ie not specify the uuid, works fine
what is your config?
oh yeha
from above, you specified the name in your config
that makes it unable to validate
Wait even in a comment?
Yup, there’s no workaround correct? Tbh seems easier yeah
well the workaround is to either make the names line up or disable validation
or just let it autodetect
How much work would it take to reimplement, I have any idea to implement using cryptsetup.volume_name, but I assume I need to patch alot of UGRD and rewrite the base hooks correct? Seems like your main code is based off root as you mentioned
it already is cryptsetup.volume_name?
if you let it autodetect itll use the same mapped name currently in use
Wait, I thought it was cryptsetup.root in general? Unless I misunderstood how UGRD is analyzing the volumes.
nah
Also is there a list of UGRD modules?
i mean the root mount is kinda important
mor or less everything in a dir here
the rest is core code
all the autodetecton stuff is in mounts
im considering moving it to the cryptsetup module but the lvm stuff is kinda tacked on
Gotcha. My only concern is can I still use stuff like retries then for UGRD?
yeah you just have to be sure to use the right mapped name
so it has to match whatever the currently used mapped name is
So simply just changing my volume name?
in the config yea
Uh when I tried just plain lvm0 it can’t find it? As well as tagging on the dm name, gentoo-lvm0 into. Cryptsetup same thing. Here’s the wget paste
How does auto detection works? Auto detection seems the best compared to many config?
Cause manual configuration seems to like mismatch errors a lot I notice.
Now it’s picking the wrong uuid. But what I’m not sure is how autodetect differs fine. When I built it without the stuff in toml, it differed between my /dev/mapper/gentoo and gentoo-lvm0 fine.
are you sure it's picking the wrong uuid?
can you send the output with --print-config if it works?
you can read the code here if you're intersted i how autodetection works
the "lvm" uuid will likely be pointing to the luks device, and the luks uuid will likely point to your drive
the root uuid pointing to lvm
so on
it's kinda confusing but in each case the uuid info is for the SOURCE, there's no point in having it define its own uuid
Sent.
Also I’m wondering how feasible is something like UGRD with C, I just realized Python seems to make it alot nicer,
Might explain why Dracut and most seem built with Python
Oh I was completely wrong LOL
Here it seems to be miss parsing
Am I formatting the config wrong?
Ah. Do you think I should just ignore cryptsetup module then? And let UGRD do this thing?
yeah that should work
Question. How do I kernel modules out of knod_ignore.
I need to use hid_usb but it’s in kmod_jgnore, and when it’s in kmod_init I get “ cannot ignore external module in kmod_init”
hi. i ran into https://github.com/desultory/ugrd/blob/main/src/ugrd/fs/mounts.py#L300 which should be related to https://github.com/desultory/ugrd/issues/7 as i'm not using a partitioning scheme, but a raw block device (nvme0n1). maybe a probing option could be added to the cryptsetup entry config (cryptsetup.root) to be used in _autodetect_dm and checked around line 295, probing the blkid-less disk with the headers of the entry.