[pkg-cryptsetup-devel] Bug#481104: [Pkg-cryptsetup-devel] /usr/sbin/update-initramfs: update-initramfs edits /etc/initramfs-tools/conf.d/cryptroot

David Härdeman david at hardeman.nu
Wed Jul 9 08:23:57 UTC 2008


On Sun, July 6, 2008 17:54, gpall at ccf.auth.gr‚ wrote:
> maximilian attems wrote:
>> right send output of
>> a) sh -x mkinitramfs -o /tmp/foo
>> b) sh -x update-initramfs -u
>
> Sending requested outputs a) -> out1, b) -> out2

Ok, I see the problem.

During the initramfs build, mkinitramfs will ln -s all config files into
the build dir. Later when the cryptsetup hook is executed it will write
config lines to the cryptroot config file in the build dir (which is
linked to the /etc... file outside the build dir).

I'm not 100% sure how we should solve this (why do you have a cryptroot
file by the way? It's supposed to be a cryptsetup internal config file).

Perhaps the best way to "handle" it would be to detect a symlink'ed config
file in the cryptsetup initramfs hook and to explode...on the other hand,
this is a problem in general since any other hook/script might also want
to write config files from their hook script and the same problem will
happen to them.

An alternative solution would be to move the step where external config
files are copied into the initramfs to a later stage in the mkinitramfs
run and allow mkinitramfs to check if it's about to overwrite already
written config files....maks?

-- 
David Härdeman




More information about the pkg-cryptsetup-devel mailing list