[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Third party coding for initramfs-tools



hello marc,

On Tue, Jul 11, 2006 at 10:11:48AM -0700, Marc MERLIN wrote:
> 
> I have initramfs-tools 0.60, and tried to write a 3rd party script for
> it.

ok, please use latest from unstable will reduce your pain ;-)
as the circular dep stuff is fixed.

> It's actually quite simple:
> ----------------------------------------------------------------------------
> gandalf:~$ cat /etc/mkinitramfs/scripts/local-bottom/copypwd 
> #!/bin/sh
> 
> mount -no remount,rw ${rootmnt}
> # Not totally certain if it's needed but I got a RO error once
> sleep 1
> cat /.cppwd > ${rootmnt}/.cppwd
> mount -no remount,ro ${rootmnt}
> ----------------------------------------------------------------------------

missing prereqs stuff.
 
> Unfortunately, I lost hours of debugging and rebooting because the initrd
> would die in reduce_prereqs with
> panic "PANIC: Circular dependancy.  Exiting."
> BTW, it's "dependency"
> 
> count_unsatisfied would parse the output of my copypwd script, see one
> line of output, within with i=1, and die on 1 -eq 1
> 
> I have no idea why my script seems to go through some module loading
> dependency checker, but it's very counter intuitive that if my script
> outputs anything, it gets picked up by reduce_prereqs and kills the boot
> entirely.
> 
> My stuff works now because I spend hours of tracking this problem down
> and removed the 'echo "I'm here"' in my script, but if this could be
> readily documented, or even better, if third party scripts could output 
> things without killing the whole boot in some weird way, that would be
> appreciated :)

you'll find examples in the manpage initramfs-tools(8).
or look at any other boot script in /usr/share/initramfs-tools/scripts
i fully agree that this prereqs stuff is a pain and lost boot time,
it is scheduled to go soon (0.70 most probably).

the ordering which should happen afterwards will be for example
05evms 10mdadm 20lvm 90cryptsetup
currently there is no sane way to be the first nor to be the last.

amicalement

-- 
maks




Reply to: