Sure, if you're using dracut, which is not true for "Linux" in general.
I use OpenSuse so I had to use the guide for Fedora, but there were some differences as far as I remember.
Fedora, RHEL, CentOS, Rocky, Alma, Arch, and Gentoo
Dracut is available on:
Debian and Ubuntu
That covers most common Linux distros.
-
Personally, I'm using this on Fedora.