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

Re: missing the initrd file in the kernel package



On Wed, Apr 29 2009, emikaadeo wrote:

> Manoj Srivastava wrote:
>
>> On Wed, Apr 29 2009, Antonio Diaz wrote:
>> 
>>>   When I compile the kernel the file "initrd" is not created in spite
>>> of I'm specifying the "--initrd" option in the command line. Exactly,
>>> the command that I'm using to compile the kernel is:
>>>
>>> "make-kpkg --initrd --revision=1:xps.10 kernel_image"
>>>
>>>   May be there is a problem with the application that creates the
>>> initrd file.
>>>
>>>   Any suggestions?
>> 
>> ,----[ Manual page make-kpkg(1) ]
>> |  --initrd
>> |         If make-kpkg is generating a kernel-image package, arrange to
>> |         convey to the hook 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 ker‐ nel-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/kenel or added into
>> |         the hook script parameter of /etc/kernel-img.conf.  no initrd
>> |         will be created.
>> `----
>> 
>>         So, drop in scripts in /etc/kernel/post{inst,rm}.d/ to
>>  create/delete the initramfs files. You can use yaird, or
>>  initramfs-tools. For the latter, there are example scripts that you
>>  could use as a starting point:
>>  /usr/share/kernel-package/examples/etc/kernel/post{inst,rm}.d/initramfs
>> 
>>         manoj
> I upgraded to kernel-package 12.010
> If i use a :
> make-kpkg --initrd kernel_image
> then created .deb will have a initrd image ?

        No. The initrd image has neer been a part of the kernel image
 deb, and it still is not. The initramfs/initrd bits arte always
 generated on the machine the kernel image is installed upon.

> And it will install it ?

        Well, since the initramfs image is not pat of the linux-image-*
 packages, install is not the right word. Create is what actually needs
 to happen.

        Now, nothing is created automatically. you need to provide a
 hook script for this to happen.  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/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---

        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.

> Sorry but my english is not so good, so i'm trying to get this clear.

        That's all right. English was my fourth language as well.

        manoj
-- 
That's no moon... Obi-wan Kenobi
Manoj Srivastava <srivasta@acm.org> <http://www.golden-gryphon.com/>  
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C


Reply to: