Your message dated Sat, 17 Jul 2010 11:16:09 -0700
with message-id <[email protected]>
and subject line Re: Bug#581711: Created kernel-package do not trigger the 
creation of an initrd
has caused the Debian Bug report #581711,
regarding Created kernel-package do not trigger the creation of an initrd
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
581711: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=581711
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: kernel-package
Version: 12.033
severity: medium

Hello Manoj,
from time to time I build kernels with kernel-package. Since the new
kernel-package version (I installed squeeze's version to my lenny
machine) I cannot build packages anymore that automatically create an
initrd. I already read the docs and the man package I did what is
recommended to do, but I still don't get hook scripts
in /etc/kernel/foobar....

My questions:
* Does the --initrd option of make-kpkg _only_ enable the scan and
execution of the the hooks in /etc/kernel?
* Is there any mode in that creates a kernel package which _installs_
hook scripts on the _target_ system? I want the hooks script itself
being included in the kernel package I create. I see make-kpkg creates
debian/linux-image-foobar/etc/kernel/postinst.d/, but this dir is
always empty.
* Are you aware that the initramfs-tools ship a hook that contains:
---8<--- 
# kernel-package passes an extra arg; hack to not run under
kernel-package
[ -z "$2" ] || exit 0 
---8<---
So that hook script exit 0 when called by a kernel package made by
make-kpkg - why would it be wrong to run that hook when installing a
kernel made by kernel-package?

My goal is to create distro-like kernel packages, i.e. I want the
packages to be transferable to other machines as a drop-in replacement
for the packages that Debian ships. But as long as the
users habe to call the mkinitramfs manually, it's a real pitfall for
them ...

Best Regards,
Andreas





--- End Message ---
--- Begin Message ---
,----[ Manual page make-kpkg(1) ]
|  --initrd
|         If make-kpkg is generating a kernel-image package, arrange to
|         convey to the hook scripts run from the post installation
|         maintainer scripts that this image requires an initrd, and that
|         the initrd generation hook scripts should not short circuit
|         early. Without this option, the example initramfs hook scripts
|         bundled in with kernel-package will take no action on
|         installation.  The same effect can be achieved by setting the
|         environment variable INITRD to any non empty value.  Please note
|         that unless there are hook scripts in /etc/kernel or added into
|         the hook script parameter of /etc/kernel-img.conf.  no initrd
|         will be created (the bundled in example scripts are just
|         examples -- user action is required before anything happens).
`----



,----[ /usr/share/doc/kernel-package/README.gz ]
|  gotchas. 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---
| 
|         These scripts will try to make sure that the symlink
|  /lib/modules/$VERSION/build 
|  is sane -- that is points to the header packages whether you install
|  the image packages first, or the header packages first -- and takes
|  care of cleanup when either of the packages are installed.
`----

        manoj

-- 
So we follow our wandering paths, and the very darkness acts as our
guide and our doubts serve to reassure us.- Jean-Pierre de Caussade,
eighteenth-century Jesuit priest
Manoj Srivastava <[email protected]> <http://www.golden-gryphon.com/>  
4096R/C5779A1C E37E 5EC5 2A01 DA25 AD20  05B6 CF48 9438 C577 9A1C


--- End Message ---

Reply via email to