severity 523835 wishlist
reassign 523835 initramfs-tools
merge 523835 523735
thanks

Hi,


On Tue, Sep 01 2009, Mark Hedges wrote:


> I'm having the same problem.  I use make-kpkg like I've
> always used it to build the kernel.  But it does not
> create an initrd.  
>
> hed...@maggie:~$ find /etc/kernel -type f
> /etc/kernel/postrm.d/initramfs-tools
> /etc/kernel/postinst.d/initramfs-tools
>
> Those are supposed to be user-supplied scripts?  I never
> had to write any scripts before to get make-kpkg to work.
> apt-file does not show these scripts.  They are auto-gen'd
> by make-kpkg?

        Nope. They belong to initramfs-tools. Th scripts provided by
 kernel-package (which would have worked here, BTW) are:
/usr/share/kernel-package/examples/etc/kernel/postinst.d/initramfs
/usr/share/kernel-package/examples/etc/kernel/postrm.d/initramfs

        So, if you use those scripts, things will work. If you want to
 use the scripts provided by initramfs-tools, you have to wait until the
 wishlist bug is fixed.


> It seems like the postinst script should run from postinst
> after installing the .deb, right?  It does not.

        Actually, it does, but the script ignores the invocation.


> If I run the script myself, it creates the initrd.

        Right, you are not running with the same number of arguments
 that the postinst does, and thus the initramfs-tools scripts no longer
 ignore you.

        manoj


        From: 
/usr/share/doc/kernel-package/README.gz 

        Note that you will have to arrange for the actual
 initrd creation to take place by installing a script like
 /usr/share/kernel-package/examples/etc/kernel/post{inst,rm}.d/yaird
 or, alternately,
 /usr/share/kernel-package/examples/etc/kernel/post{inst,rm}.d/initramfs 
 into the corresponding directories /etc/kernel/post{inst,rm}.d,
 since the kernel-postinst does not arrange for the initramfs
 creator to be called. You can thus select your own;
 initramfs-tools or yaird.

 Let me repeat: 
 Since nothing is created automatically. you need to provide a hook
 script for things to happen when you install the kernel image
 package.  The user provides such scripts. For example, to invoke
 mkinitramfs, I did:
--8<---------------cut here---------------start------------->8---
 cp /usr/share/kernel-package/examples/etc/kernel/postinst.d/yaird \
    /etc/kernel/postinst.d/
 cp /usr/share/kernel-package/examples/etc/kernel/postrm.d/yaird \
    /etc/kernel/postrm.d/
--8<---------------cut here---------------end--------------->8---

        Or, alternately, you could do:
--8<---------------cut here---------------start------------->8---
 cp /usr/share/kernel-package/examples/etc/kernel/postinst.d/initramfs \
    /etc/kernel/postinst.d/
 cp /usr/share/kernel-package/examples/etc/kernel/postrm.d/initramfs \
    /etc/kernel/postrm.d/
--8<---------------cut here---------------end--------------->8---

        These scripts above to nothing unless the corresponding
 packages are installed (initramfs-tools or yaird), so you could
 potentially cp both over -- as long as you never install both yaird
 and initramfs-tools at the same time.

        To run grub, I have in /etc/kernel-img.conf:
--8<---------------cut here---------------start------------->8---
postinst_hook = update-grub
postrm_hook   = update-grub
--8<---------------cut here---------------end--------------->8---

You can look at other example in the examples directory:
/usr/share/kernel-package/examples/ to see if there are other example
script you want to cp into /etc/kernel -- and you can create your own
scripts.

For example, if you use linux-headers-* packages to compile third
party modules so that you do not have to keep the sources directory
around, you might be interested in:
--8<---------------cut here---------------start------------->8---
/etc/kernel/header_postinst.d/link
/etc/kernel/header_postrm.d/link
/etc/kernel/header_prerm.d/link
/etc/kernel/postinst.d/force-build-link
/etc/kernel/postrm.d/force-build-link
--8<---------------cut here---------------end--------------->8---


-- 
Q: What's the difference between Bell Labs and the Boy Scouts of
America? A: The Boy Scouts have adult supervision.
Manoj Srivastava <sriva...@acm.org> <http://www.golden-gryphon.com/>  
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to