LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 07-17-2020, 09:19 PM   #1
smaclennan
Member
 
Registered: May 2010
Location: Ottawa, Canada
Distribution: slackware
Posts: 37
Blog Entries: 2

Rep: Reputation: 13
Question apt upgrade creating initrd files for long gone kernels


I always build my own kernels. I have now upgraded from 16.04 to 18.04.

I am trying to get a clean apt upgrade, but every time it fails trying to create tons of initrd files for long gone kernels.

They are not in /lib/modules, they are not in /boot, they are not in grub.cfg... where is Ubuntu finding these versions?
 
Old 07-17-2020, 09:54 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
A little more information might be helpful.
Such as:
You have already upgraded to 18.04, correct?
Which command(s) you enter (I suppose it's apt upgrade).
What is the command output.
What error messages do you see.
What is the outcome. I know it fails, but are there any files lying around or messages in log files etc.

EDIT: If you don't want the kernel package(s) to be upgraded, you can mark them with apt-mark, it seems.

Last edited by berndbausch; 07-17-2020 at 09:57 PM.
 
Old 07-17-2020, 09:56 PM   #3
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: Ubuntu based stuff for the most part
Posts: 1,177

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
How did you remove the old kernels? The problem seems like apt thinks they are still installed, so trying to remove them with apt might clear it up.
 
Old 07-17-2020, 10:46 PM   #4
smaclennan
Member
 
Registered: May 2010
Location: Ottawa, Canada
Distribution: slackware
Posts: 37

Original Poster
Blog Entries: 2

Rep: Reputation: 13
I have upgraded to 18.04.

Yes: apt upgrade

None of the kernels where installed using apt. I built them and copied them into place. But I did use update-initramfs and update-grub. They where removed with good ol' rm.

Example error... there are many many of these:

update-initramfs: Generating /boot/initrd.img-5.4.20+
WARNING: missing /lib/modules/5.4.20+
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/5.4.20+: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_YEiINl/lib/modules/5.4.20+/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_YEiINl/lib/modules/5.4.20+/modules.builtin: No such file or directory


I normally don't build kernels that need an initramfs... but this is a work computer and they picked LVM for the root device

It wasn't a problem with 16.04 since I had to apt upgrade cleanly to do the release upgrade.
 
Old 07-17-2020, 10:58 PM   #5
smaclennan
Member
 
Registered: May 2010
Location: Ottawa, Canada
Distribution: slackware
Posts: 37

Original Poster
Blog Entries: 2

Rep: Reputation: 13
Found it!

/var/lib/initramfs-tools/*
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Aboout "with very long lines",how long is very long? yun1st Linux - Newbie 4 07-20-2012 03:38 PM
long long long: Too long for GCC Kenny_Strawn Programming 5 09-18-2010 01:14 AM
debian apt-get upgrade gone bad, missing command files, /dev error? lxa2xjj Linux - Software 3 03-05-2010 05:04 AM
synaptic upgrade quit; blasted on using apt-get;upgrade; x-windows now gone blupton Linux - Newbie 0 11-22-2009 03:48 PM
What's the difference between apt-get upgrade and apt-get dist-upgrade? davidas Linux - Newbie 4 04-04-2004 08:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 02:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration