Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

make-kpkg not making initrd

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
User avatar
dbbolton
Posts: 2129
Joined: 2007-06-20 08:17
Location: Iapetus

make-kpkg not making initrd

#1 Post by dbbolton »

I'm building a kernel, followed this guide: http://forums.debian.net/viewtopic.php?f=16&t=36525

I've tried using the vanilla kernel source (2.6.29.4) and the Debian kernel source (2.6.29). I copied the config from my working kernel (2.6.26-2-amd64) and ALL I changed was processor type, preemption model, timer frequency, and removed some unneeded network and soundcard modules. Here is the exact command I used to compile it:

Code: Select all

time fakeroot make-kpkg --append-to-version "-dbb" --revision "20090610" --initrd kernel_image kernel_headers
When I tried to boot my kernel, it panicked, printing a message about being unable to mount the root filesystem. I noticed that in /boot my working kernel has an intrd file, which is also the kernel in its grub entry, but my custom kernel does not- even though I used --initrd.

What could be the problem?
GitHub | zsh docs in Letter PDF
Telemachus wrote:Put down the CGI.

User avatar
garrincha
Posts: 2335
Joined: 2006-06-02 16:38

Re: make-kpkg not making initrd

#2 Post by garrincha »

It's a bug. See similar bug report:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=523735

I also had the same problem once or twice. My quick workaround is to build an initrd image, this will create an initrd image for your kernel:

Code: Select all

update-initramfs -c -k 'uname -r'
Replace 'uname -r' with your kernel version. This is assuming that your kernel image is something like 'vmlinuz-2.6.29.1' etc.
Maurice Green on Usain Bolt's 9.58: "The Earth stopped for a second, and he went to Mars."

User avatar
dbbolton
Posts: 2129
Joined: 2007-06-20 08:17
Location: Iapetus

Re: make-kpkg not making initrd

#3 Post by dbbolton »

garrincha wrote:It's a bug. See similar bug report:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=523735

I also had the same problem once or twice. My quick workaround is to build an initrd image, this will create an initrd image for your kernel:

Code: Select all

update-initramfs -c -k 'uname -r'
Replace 'uname -r' with your kernel version. This is assuming that your kernel image is something like 'vmlinuz-2.6.29.1' etc.
I'll give this a go. Thanks a lot.
GitHub | zsh docs in Letter PDF
Telemachus wrote:Put down the CGI.

milomak
Posts: 2160
Joined: 2009-06-09 22:20
Been thanked: 1 time

Re: make-kpkg not making initrd

#4 Post by milomak »

i thought i was doing something wrong with my compiles. but now i notice it is this initrd issue.
Desktop: A320M-A PRO MAX, AMD Ryzen 5 3600, GALAX GeForce RTX™ 2060 Super EX (1-Click OC) - Sid, Win10, Arch Linux, Gentoo, Solus
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid

User avatar
bugsbunny
Posts: 5354
Joined: 2008-07-06 17:04
Been thanked: 1 time

Re: make-kpkg not making initrd

#5 Post by bugsbunny »

It's not so much a bug as a design decision by the maintainer, which at least some people aren't happy with.

You need to copy some hook scripts to /etc/kernel/

Read through the information in /usr/share/doc/kernel-package/
There are example scripts in there as well, which will work in most cases as is (just copy them over).

Immediate solution is to just run update-initramfs (see man page for syntax)

Stian1979
Posts: 316
Joined: 2007-07-29 14:57

Re: make-kpkg not making initrd

#6 Post by Stian1979 »

garrincha wrote:It's a bug. See similar bug report:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=523735

I also had the same problem once or twice. My quick workaround is to build an initrd image, this will create an initrd image for your kernel:

Code: Select all

update-initramfs -c -k 'uname -r'
Replace 'uname -r' with your kernel version. This is assuming that your kernel image is something like 'vmlinuz-2.6.29.1' etc.
It don't work for me.

Code: Select all

update-initramfs: Generating /boot/initrd.img-linux-image-2.5.30 -r
Cannot find /lib/modules/linux-image-2.5.30 -r                     
The folder is right there in /lib/modules :evil:
Image
Debian Bullseye

User avatar
Morticia
Posts: 56
Joined: 2008-05-07 15:47
Location: Lost in the ozone

Re: make-kpkg not making initrd

#7 Post by Morticia »

bugsbunny's solution of copying the example scripts and tweaking them, as described in this thread and here:
http://forums.debian.net/viewtopic.php?f=5&t=41735

Worked perfectly for me :D

It is better to have a permanent fix than a workaround (IMHO)
What you know is boring, embrace what you don't know.

Stian1979
Posts: 316
Joined: 2007-07-29 14:57

Re: make-kpkg not making initrd

#8 Post by Stian1979 »

Morticia wrote:bugsbunny's solution of copying the example scripts and tweaking them, as described in this thread and here:
http://forums.debian.net/viewtopic.php?f=5&t=41735

Worked perfectly for me :D

It is better to have a permanent fix than a workaround (IMHO)
I think I will be sitting around and see if the permanent come soon.
Is there a bug report for this?
Image
Debian Bullseye

User avatar
bugsbunny
Posts: 5354
Joined: 2008-07-06 17:04
Been thanked: 1 time

Re: make-kpkg not making initrd

#9 Post by bugsbunny »

Bug report is linked earlier in this thread. If you manually inserted the kernel version into the update-initramfs command then make sure you're not tacking -r onto the end (which it looks like you did, the -r is what's causing the problem).

I think you'll be waiting a while for a "fix", although there is talk of (maybe) adding some script packages (see the bug thread).

milomak
Posts: 2160
Joined: 2009-06-09 22:20
Been thanked: 1 time

Re: make-kpkg not making initrd

#10 Post by milomak »

I copied /usr/share/doc/kernel-package/examples/etc/kernel/postinst.d/initramfs to /etc/kernel/postinst.d/

initrd images are now created
Desktop: A320M-A PRO MAX, AMD Ryzen 5 3600, GALAX GeForce RTX™ 2060 Super EX (1-Click OC) - Sid, Win10, Arch Linux, Gentoo, Solus
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid

Post Reply