0

I am running Ubuntu 18.04 LTS. About two weeks back my kernel got an update of version 4.15.0-58. Before that (in version 55) I was getting some error which kept showing a dialog box with “Report error” button which I kept pressing every time. When Kernel was upgraded to version 58 and I restarted the PC, I got a blank purple screen and the system froze. So I rebooted and selected Advanced boot options and manually selected Kernel 58. This time it showed “Kernel panic - not syncing VFS: Unable to mount root fs on unknown-block(0,0)” error.

By rebooting again and selecting version 55 I’m able to boot successfully.

Do you think my kernel version 58 is corrupted? In which case will it be useful for me to remove version 58? Or wait until version 59 is available and hope it will fix my problem?

Thanks, makarand

PS: I am a beginner level user. So will it be better for me to just use a GUI tool like say ubuntu-cleaner to do this?


ls -al /boot  
-rw-r--r--  1 root root  1009450 Oct  9  2013 abi-3.11.0-12-generic  
-rw-r--r--  1 root root  1011333 Mar 12  2014 abi-3.11.0-19-generic  
-rw-r--r--  1 root root  1011742 May  3  2014 abi-3.11.0-20-generic  
-rw-r--r--  1 root root  1011634 May 16  2014 abi-3.11.0-22-generic  
-rw-r--r--  1 root root  1011685 Jun  5  2014 abi-3.11.0-23-generic  
-rw-r--r--  1 root root  1170475 Jun 29  2016 abi-3.13.0-92-generic  
-rw-r--r--  1 root root   925685 May  1  2013 abi-3.8.0-19-generic  
-rw-r--r--  1 root root   926513 Sep 11  2013 abi-3.8.0-31-generic  
-rw-r--r--  1 root root   926513 Oct  2  2013 abi-3.8.0-32-generic  
-rw-r--r--  1 root root   926578 Oct 23  2013 abi-3.8.0-33-generic  
-rw-r--r--  1 root root   926578 Nov 13  2013 abi-3.8.0-34-generic  
-rw-r--r--  1 root root   926578 Dec  3  2013 abi-3.8.0-35-generic  
-rw-r--r--  1 root root   168533 Oct  9  2013 config-3.11.0-12-generic  
-rw-r--r--  1 root root   168540 Mar 12  2014 config-3.11.0-19-generic  
-rw-r--r--  1 root root   168540 May  3  2014 config-3.11.0-20-generic  
-rw-r--r--  1 root root   168540 May 16  2014 config-3.11.0-22-generic  
-rw-r--r--  1 root root   168541 Jun  5  2014 config-3.11.0-23-generic  
-rw-r--r--  1 root root   170036 Jun 29  2016 config-3.13.0-92-generic  
-rw-r--r--  1 root root   160890 May  1  2013 config-3.8.0-19-generic  
-rw-r--r--  1 root root   160908 Sep 11  2013 config-3.8.0-31-generic  
-rw-r--r--  1 root root   160909 Oct  2  2013 config-3.8.0-32-generic  
-rw-r--r--  1 root root   160909 Oct 23  2013 config-3.8.0-33-generic  
-rw-r--r--  1 root root   160909 Nov 13  2013 config-3.8.0-34-generic  
-rw-r--r--  1 root root   160898 Dec  3  2013 config-3.8.0-35-generic  
-rw-r--r--  1 root root   218920 Jul  2 22:11 config-4.15.0-55-generic  
-rw-r--r--  1 root root   218850 Aug  6 16:15 config-4.15.0-58-generic  
drwxr-xr-x  5 root root     4096 Aug 20 14:20 grub  
-rw-r--r--  1 root root 16923372 Apr 18  2014 initrd.img-3.11.0-12-generic  
-rw-r--r--  1 root root 17037446 Apr 22  2014 initrd.img-3.11.0-19-generic  
-rw-r--r--  1 root root 17035411 May  7  2014 initrd.img-3.11.0-20-generic  
-rw-r--r--  1 root root 17035859 May 28  2014 initrd.img-3.11.0-22-generic  
-rw-r--r--  1 root root 17037767 Jun  9  2014 initrd.img-3.11.0-23-generic  
-rw-r--r--  1 root root 28113312 Jul 19 14:41 initrd.img-3.13.0-92-generic  
-rw-r--r--  1 root root 15986620 Oct 19  2013 initrd.img-3.8.0-19-generic  
-rw-r--r--  1 root root 16054984 Oct 19  2013 initrd.img-3.8.0-31-generic  
-rw-r--r--  1 root root 16054243 Nov  9  2013 initrd.img-3.8.0-32-generic  
-rw-r--r--  1 root root 16054604 Nov 12  2013 initrd.img-3.8.0-33-generic  
-rw-r--r--  1 root root 16054953 Dec  7  2013 initrd.img-3.8.0-34-generic  
-rw-r--r--  1 root root 16107710 Jan  6  2014 initrd.img-3.8.0-35-generic  
-rw-r--r--  1 root root 35594219 Aug 13 09:51 initrd.img-4.15.0-55-generic  
-rw-r--r--  1 root root 35606182 Aug 16 10:06 initrd.img-4.15.0-58-generic  
drwx------  2 root root    16384 Sep 18  2013 lost+found  
-rw-r--r--  1 root root   182704 Jan 28  2016 memtest86+.bin  
-rw-r--r--  1 root root   184380 Jan 28  2016 memtest86+.elf  
-rw-r--r--  1 root root   184840 Jan 28  2016 memtest86+_multiboot.bin  
-rw-------  1 root root  2621091 Oct  9  2013 System.map-3.11.0-12-generic  
-rw-------  1 root root  2629933 Mar 12  2014 System.map-3.11.0-19-generic  
-rw-------  1 root root  2630177 May  3  2014 System.map-3.11.0-20-generic  
-rw-------  1 root root  2630092 May 16  2014 System.map-3.11.0-22-generic  
-rw-------  1 root root  2630383 Jun  5  2014 System.map-3.11.0-23-generic  
-rw-------  1 root root  2702749 Jun 29  2016 System.map-3.13.0-92-generic  
-rw-------  1 root root  2443743 May  1  2013 System.map-3.8.0-19-generic  
-rw-------  1 root root  2445683 Sep 11  2013 System.map-3.8.0-31-generic  
-rw-------  1 root root  2445627 Oct  2  2013 System.map-3.8.0-32-generic  
-rw-------  1 root root  2445793 Oct 23  2013 System.map-3.8.0-33-generic  
-rw-------  1 root root  2445747 Nov 13  2013 System.map-3.8.0-34-generic  
-rw-------  1 root root  2450539 Dec  3  2013 System.map-3.8.0-35-generic  
-rw-------  1 root root  3167185 Jul  2 22:11 System.map-4.15.0-55-generic  
-rw-------  1 root root  3170172 Aug  6 16:15 System.map-4.15.0-58-generic  
-rw-r--r--  1 root root  5632848 Apr 18  2014 vmlinuz-3.11.0-12-generic  
-rw-------  1 root root  5669328 Mar 12  2014 vmlinuz-3.11.0-19-generic  
-rw-------  1 root root  5666800 May  3  2014 vmlinuz-3.11.0-20-generic  
-rw-------  1 root root  5668304 May 16  2014 vmlinuz-3.11.0-22-generic  
-rw-------  1 root root  5668432 Jun  5  2014 vmlinuz-3.11.0-23-generic  
-rw-------  1 root root  5855520 Jun 29  2016 vmlinuz-3.13.0-92-generic  
-rw-------  1 root root  5368560 May  1  2013 vmlinuz-3.8.0-19-generic  
-rw-------  1 root root  5372944 Sep 11  2013 vmlinuz-3.8.0-31-generic  
-rw-------  1 root root  5375088 Oct  2  2013 vmlinuz-3.8.0-32-generic  
-rw-------  1 root root  5375056 Oct 23  2013 vmlinuz-3.8.0-33-generic  
-rw-------  1 root root  5375472 Nov 13  2013 vmlinuz-3.8.0-34-generic  
-rw-------  1 root root  5402224 Dec  3  2013 vmlinuz-3.8.0-35-generic  
-rw-------  1 root root  7567504 Jul  2 22:11 vmlinuz-4.15.0-55-generic  
-rw-------  1 root root  7580576 Aug  6 16:15 vmlinuz-4.15.0-58-generic  


ls -al /var/crash  
total 12  
drwxrwsrwt  2 root     whoopsie 4096 Sep  3 10:07 .  
drwxr-xr-x 15 root     root     4096 Aug  7  2016 ..  
-rw-r--r--  1 kernoops whoopsie 3072 Aug 30 15:04 linux-image-4.15.0-55-generic.219232.crash  

dpkg -l *linux-image* | grep ii  
ii  linux-image-4.15.0-55-generic          4.15.0-55.60  i386         Linux kernel image for version 4.15.0 on 32 bit x86 SMP  
ii  linux-image-4.15.0-58-generic          4.15.0-58.64  i386         Linux kernel image for version 4.15.0 on 32 bit x86 SMP  
ii  linux-image-4.15.0-60-generic          4.15.0-60.67  i386         Linux kernel image for version 4.15.0 on 32 bit x86 SMP  
ii  linux-image-generic                    4.15.0.60.62  i386         Generic Linux kernel image  

dpkg -l *3.8.0* | grep ii  
dpkg-query: no packages found matching *3.8.0*  

dpkg -l *3.11.0* | grep ii  
dpkg-query: no packages found matching *3.11.0*  
  • Do I think -58 is corrupted; doubt it, but you could try install --reinstall; however I'd be very tempted to apt-mark hold the latest kernel you know works so it doesn't disappear if you forget about it & have problems with later kernels... I would also look on launchpad for problems like yours, and "affects me too" so you can watch & deal with it. Did you see anything in logs before the panics? or was it early in booting? (the earlier it is the harder to find useful info I suspect). – guiverc Sep 02 '19 at 07:54
  • Edit your question and show me ls -al /boot and ls -al /var/crash. Start comments to me with @heynnema or I'll surely miss them. – heynnema Sep 02 '19 at 17:33
  • @heynnema: I've added output from the two commands to my question – makarand Sep 03 '19 at 09:55
  • Is there any reason you didn't move up to the hwe kernels, which would put you on the 5.0.0.... family? – Organic Marble Sep 04 '19 at 14:20
  • @OrganicMarble As I mentioned in one of the comments, I just accept a kernel upgrade when presented by Software updater, assuming it's the latest stable version. Any idea why Software updater does not prompt me to get the latest version, like the 5.0.* family? – makarand Sep 05 '19 at 12:38
  • @makarand you have to take some actions to move up to the 'hwe' kernels. https://wiki.ubuntu.com/Kernel/LTSEnablementStack but see also this https://askubuntu.com/a/885582/243321 – Organic Marble Sep 05 '19 at 13:10

2 Answers2

0

First, your ls -al /boot shows a great number of old kernels and support files. Normally you should only see 1-2 older versions. Software Updater should be prompting you to delete these older versions, and help clean up your disk.

Second, to try and solve your current problem, we'll try and rebuild a couple of files that are used during the boot cycle.

In terminal...

sudo update-initramfs -c -k 4.15.0-55-generic # rebuild initrd.img

sudo update-initramfs -c -k 4.15.0-58-generic # rebuild initrd.img

sudo rm -i /var/crash/*.crash # to clean up an old crash dump

reboot # to kernel -58

Update #1:

To clean up /boot, we'll use synaptic...

Start synaptic.

Search for 3.11.0-12, click on the $ column header to sort, identify the 3-5 installed files that begin with linux-. "Complete remove" these files.

Repeat this for all versions showing in the ls -al /boot listing, except the 4.15.0-xx files.

sudo update-grub # rebuild GRUB menu

Update #2:

Since you're having trouble using synaptic, you can try it this way...

You should be able to:

dpkg -l *3.8.0*|grep ii # list installed packages

dpkg -l *3.11.0*|grep ii # list installed packages

sudo dpkg -P enter_package_name_here, etc. # purge package

... but being careful to just purge the linux- kernel and support file packagenames. Then also

sudo update-grub # update GRUB

Update #3:

The files left over in /boot must be from the use of ubuntu-cleaner, or similar utility. Ubuntu-cleaner doesn't remove these extra files when removing older kernels.

You'll have to manually remove these extra files. Something like this should work...

sudo rm -i /boot/*3*generic

this will query you for each file it finds, so make sure that the files belong to the 3.8.0 and 3.11.0 file set before responding with "y".

sudo update-grub

heynnema
  • 70,711
  • Thanks again. Well, Software updater woke up today and offered a kernel upgrade which I promptly accepted, and now I have 4.15.0-60 installed. This time kernel did not panic :-). I did get the "System encountered an error" message though, which was there in #55 too. How can I see what this error is?

    I will still follow your advice and rebuild the 2 files you've pointed.

    If Software updater is not prompting to delete the older kernels, what should I do, apart from removing them one by one as suggested in some other posts?

    – makarand Sep 04 '19 at 05:12
  • @makarand I've updated my answer with instructions on how to clean up /boot. The instructions are already there to take care of the system error. Please remember to accept my answer if it was helpful. Thanks! – heynnema Sep 04 '19 at 13:34
  • The update-initramfs commands worked. I am now able to boot into both 55 & 58 without kernel panic
  • The crash file (as listed in my post) is in /var/crash folder, not /var/log like you have mentioned. I assume that is a typo? So should I delete the file (only 1) in /var/crash folder?
  • Synaptic showed only one instance of 3.13 but no 3.8.* or 3.11.* for some reason! I did remove 3.13, but the others still show up at boot time. Any idea what may be the reason? This also may be why Software updater has not prompted me to delete these versions. It's not finding them either!!
  • – makarand Sep 05 '19 at 12:26
  • Also, I still get the "System program problem detected" message a minute or two after booting - even in #60. And even though I click on "Report problem..." button no further dialog box opens which is what one expects when there is a ... on the button! – makarand Sep 05 '19 at 12:34
  • @makarand good news overall. -55 and -58 now boot. Yes, there was a typo in /var/crash, I've corrected that, and you can delete the single crash file that's there. Since synaptic isn't showing all of the kernel files in /boot, you'll have to delete the 3.8.* and 3.11.* files manually (but no others) and then run sudo update-grub (which I also added to my answer) to rebuild the GRUB menu. Report back. – heynnema Sep 05 '19 at 15:14
  • I removed the .crash file. No issue with that. With kernel versions however there is something weird going on. When I run dpkg -l | grep -E 'linux-image-[0-9]+' | grep -Fv $(uname -r) command it shows me the removed versions (3.13 for example) but no 3.8.* or 3.11.*. As a result I'm seeing the 3.8 & 3.11 versions only in Advanced boot options and in the boot folder. Pls do let me know if you know of any other method to locate & remove the pesky 3.8 & 3.11 versions. Meanwhile, since my main problem is solved, I'm accepting your answer. Thanks for your patience and meticulous replies. – makarand Sep 06 '19 at 12:39
  • @makarand you should be able to dpkg -l *3.11.0*|grep ii, and then sudo dpkg -P filename, etc. but being careful to just purge the linux- kernel and support file filenames. Then also sudo update-grub. – heynnema Sep 06 '19 at 13:06
  • @makarand See Update #2 – heynnema Sep 06 '19 at 13:16
  • I have edited the question and added the result of dpkg -l 'linux-image' | grep ii, and as you can see it does not list 3.8 & 3.11 versions. So now except for boot folder nowhere else are 3.8.* & 3.11.* versions visible, so apparently cannot be removed. I googled this particular issue but did not find any useful info. Any insights? Should I post this as a new question? – makarand Sep 07 '19 at 10:53
  • @makarand you didn't use the commands that I gave you. Try again. Report back. If we can't do it this way, I'll create an Update #3 and we'll do it manually. – heynnema Sep 07 '19 at 12:53
  • I have added the output. As reported earlier dpkg is not able to find these kernel images. The files seem to be present only in /boot directory. Even locate linux-image-3.8 comes back with no result – makarand Sep 09 '19 at 10:43
  • @makarand Please see Update #3 – heynnema Sep 09 '19 at 14:26
  • Followed update #3. That was a simple solution to removing the leftover files :-). Although, just FYI, I got hold of Ubuntu-cleaner (or Synaptic) only recently and did not use them either. Now Advanced options shows only the 4 most recent kernels. This is great. Thanks. – makarand Sep 10 '19 at 09:06