Volodymyr Mutel wrote:

Looking into 
https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/initramfs-tools/tree/scripts/local?h=ubuntu/noble
 ,
we can see logic added by Ubuntu in lines 220..268 for handling loop= option in 
the kernel cmdline,

Can anyone please propose, how the same logic could be implemented within 
Debian Trixie and its initramfs-tools ?
Probably there could be some kind of drop-in script for top or premount stage ?

Dear Everyone,

I implemented the required logic, as I suppose, in the simplest working way by 
copying most code from Ubuntu and splitting it into premount and bottom parts.
The scripts are available from 
https://github.com/muwlgr/scripts/blob/main/initramfs/hostloop-premount ,
that's to be copied into /etc/initramfs-tools/scripts/local-premount/ and 
assigned executable rights,
and from https://github.com/muwlgr/scripts/blob/main/initramfs/hostloop-bottom ,
that's to be copied into /etc/initramfs-tools/scripts/local-bottom/ and also 
assigned executable rights.
In my solution I use this very useful exchange of updated environment variables 
through /conf/param.conf

Please review the code, adopt and customize it, and share your feedback.
Also please have a look at my larger article at 
https://muwlgr.dreamwidth.org/54748.html
where these scripts are copied into the target filesystem from here-documents.

I would appreciate your insightful responses. Thank you in advance.

Reply via email to