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

Re: custom kernel not triggering update-initramfs



I should also note, that the initrd gets created with the stock debian
kernel during live build, and that my custom kernel package does
trigger update-initramfs when I install it manually in the chroot.
Where can I look to make sure my kernel packages meets the
requirements live build wants for triggering update-initramfs?

On Fri, Nov 7, 2014 at 9:26 AM, Aaron McSorley <a@aaronmcsorley.com> wrote:
> Daniel, for this one I used make-kpkg with the --initrd option against a
> recent Ubuntu LTS kernel source from git.
>
> Thanks for the hook Michal, that's what I plan to do as a last resort.
>
> On Nov 7, 2014 4:11 AM, "Michal Suchanek" <hramrach@gmail.com> wrote:
>>
>> On 7 November 2014 06:05, Daniel Baumann
>> <daniel.baumann@progress-technologies.net> wrote:
>> > On 11/06/2014 11:53 PM, Aaron McSorley wrote:
>> >> I cannot get my custom kernel to trigger an update-initramfs
>> >
>> > you probably didn't build it right, how did you do it? did you use make
>> > deb or kernel-package or something, rather than properly rebuilding a
>> > patched debian source package?
>>
>> Well, 'properly rebuilding a patched debian source package' is
>> something hardly documented for a Linux kernel, especially when what
>> you have is not really a small patch for existing Debian kernel but a
>> fresh upstream tarball or random git tree. Building a Debian kernel
>> package requires some weird dependency packages which even the Debian
>> kernel maintainers fail to generate properly and/or upload with the
>> kernel time and time again. It requires non-trivial amount of cpu time
>> and disk space and when an error happens during the build you have to
>> do whole build from start. So overall _very_ unpleasant thing.
>>
>> There is 'make deb' target in upstream kernel which is completely
>> useless because among other things it cannot build kernel headers.
>>
>> And there is kernel-package which needs the --initrd option when
>> building package to enable creating initrd. However, even with this
>> option the initrd may not be created with some versions of debian
>> because the kernel-package and initramfs-tools maintainers cannot
>> agree on a way to configure generating an initramfs.
>>
>> So I gave up and just wrote a live-build chroot hook that generates
>> missing initramfs.
>>
>> #!/bin/bash -x
>> for i in boot/vmlinuz* ; do
>>     kernel="$(basename "$i")"
>>     version="${kernel##vmlinuz-}"
>>     initrd="boot/initrd.img-${version}"
>>     [ -f "$initrd" ] || update-initramfs -c -k "$version" || true
>> done
>>
>> HTH
>>
>> Michal
>>
>>
>> --
>> To UNSUBSCRIBE, email to debian-live-request@lists.debian.org
>> with a subject of "unsubscribe". Trouble? Contact
>> listmaster@lists.debian.org
>> Archive:
>> [🔎] CAOMqctS-5=mJULGoKy7pDpoZ1qNvU8K9=9-sWMP=-S0ysD-VOw@mail.gmail.com">https://lists.debian.org/[🔎] CAOMqctS-5=mJULGoKy7pDpoZ1qNvU8K9=9-sWMP=-S0ysD-VOw@mail.gmail.com
>>
>


Reply to: