Welcome!
Forum users

Current releases
--MX-23 release info here
--Migration information to MX-23 here
--antiX-23.1 (Arditi del Popolo) release info here

Important information
--If in starting your system it boots to an unwanted Desktop, right click desktop, then select leave and logout. At the
login screen there is a session chooser at the top of the screen.

News
-- MX Linux on social media: here
-- New Forum Features, Marking Solved and Referencing a User: here

[Solved] update-initramfs: wrong kernel

Post Reply
Message
Author
User avatar
outlaw
Posts: 20
Joined: Thu Jul 13, 2006 6:35 pm

[Solved] update-initramfs: wrong kernel

#1 Post by outlaw »

I recently installed MX-18 and added the 4.9.91-antix.1-amd64-smp kernel
to eliminate an irq / vector error on startup.

A recent update (apt-get upgrade) generated a update-initramfs

update-initramfs: Generating /boot/initrd.img-4.19.0-1-amd64

The system is configured to use the 4.9.91-antix.1-amd64-smp kernel by default.
Why would update-initramfs use the 4.19.01 kernel? Should it not use the antix kernel?

I know I need to execute update-initramfs with the all kernel option, is this -a ?
Also should I create a new image (-c) or update (-u)

Thanks in advance for any advice / suggestions offered.

Tom
Naturally nuts no pharmaceuticals required
Last edited by outlaw on Sun May 19, 2019 1:19 pm, edited 1 time in total.

User avatar
kmathern
Developer
Posts: 2398
Joined: Wed Jul 12, 2006 2:26 pm

Re: update-initramfs: wrong kernel

#2 Post by kmathern »

outlaw wrote: Sun Jan 20, 2019 2:52 pm I know I need to execute update-initramfs with the all kernel option, is this -a ?
To update the initrds of all installed kernels with the update-initramfs command, use -u together with -k all.

Code: Select all

sudo update-initramfs -u -k all

User avatar
baldyeti
Posts: 677
Joined: Sat Dec 05, 2009 4:37 pm

Re: update-initramfs: wrong kernel

#3 Post by baldyeti »

Does anyone know if there is a way to always have all initrd's rebuilt (make "-uk all" the default)

I mean when the package manager needs to invoke it, so the user does not have to think of building the extra ones.

skidoo
Posts: 753
Joined: Tue Sep 22, 2015 6:56 pm

Re: update-initramfs: wrong kernel

#4 Post by skidoo »

an update-initramfs bash alias could work (but, to me, would be contrary to "the principal of least surprise")

User avatar
Stevo
Developer
Posts: 12745
Joined: Fri Dec 15, 2006 8:07 pm

Re: update-initramfs: wrong kernel

#5 Post by Stevo »

It should have rebuilt the initrd for the running kernel at least--are you certain that the 4.9 kernel process didn't just scroll off the bottom of the terminal? I've always seen it build for all installed kernels by default, so it's no surprise to see it build for the 4.19 kernel, too. You can uninstall it if you don't need it, though the vector irq warning is benign.

User avatar
baldyeti
Posts: 677
Joined: Sat Dec 05, 2009 4:37 pm

Re: update-initramfs: wrong kernel

#6 Post by baldyeti »

I am pretty sure i had the same issue recently - I have the MX17 kernel 4.15 but almost always boot to the Debian 4.9 one, and recently i noticed only the initrd for 4.15 had been rebuilt ....

Code: Select all

-rw-r--r--  1 root root 40404428 Dec  2 12:22 initrd.img-4.9.0-8-amd64
drwxr-xr-x  6 root root     4096 Jan  8 12:37 grub
-rw-r--r--  1 root root 47805755 Jan 19 23:26 initrd.img-4.15.0-1-amd64

User avatar
kmathern
Developer
Posts: 2398
Joined: Wed Jul 12, 2006 2:26 pm

Re: update-initramfs: wrong kernel

#7 Post by kmathern »

baldyeti wrote: Sun Jan 20, 2019 4:49 pm Does anyone know if there is a way to always have all initrd's rebuilt (make "-uk all" the default)

I mean when the package manager needs to invoke it, so the user does not have to think of building the extra ones.
I haven't tried it, but the changing update_initramfs=* setting from 'yes' to 'all' in the /etc/initramfs-tools/update-initramfs.conf file might work.
#
# Configuration file for update-initramfs(8)
#

#
# update_initramfs [ yes | all | no ]
#
# Default is yes
# If set to all update-initramfs will update all initramfs
# If set to no disables any update to initramfs beside kernel upgrade

update_initramfs=yes all

#
# backup_initramfs [ yes | no ]
#
# Default is no
# If set to no leaves no .bak backup files.

backup_initramfs=no

User avatar
baldyeti
Posts: 677
Joined: Sat Dec 05, 2009 4:37 pm

Re: update-initramfs: wrong kernel

#8 Post by baldyeti »

That rings a bell, kmathern, thanks. I vaguely remember having had to do that in the past. Or i got impatient and changed the value from 'all" to "yes", not sure ...

User avatar
outlaw
Posts: 20
Joined: Thu Jul 13, 2006 6:35 pm

Re: update-initramfs: wrong kernel

#9 Post by outlaw »

My apologies for leaving this thread hanging after the problem was resolved, I forgot to mark the post as solved.
Thanks to all who replied to my post, it was kmathern suggest that solved the problem.

update_initramfs=yes all

Tom
Naturally nuts no pharmaceuticals required

Post Reply

Return to “Software / Configuration”