Invisible kernels!

Whether from the cli or Synaptic, when attempting to update/upgrade, Ubuntu 16.04 errors out due to not finding 2 kernels it wants to delete. Anyone have any clues to this?

Or, could this mean disk is full?
Just checked and there is plenty of room on the boot partition…

/usr/sbin/grub-mkconfig: 1: /etc/default/grub: If: not found

looks like there might be an issue with the default grub file. the not found part seems odd. can you check to see if it is indeed there?

The grub files are present, as normal. I was able to do an update by saying yes to the “Partial update” offered. (After making sure of the current backup…) The partial update did update the software, even though it, too, reported the same error regarding the 2 kernels.
I’ve search for the files that mention these kernels, removed them to other locations, but still get the error message: I’ll keep looking. There are no other problems with the installation’s behavior, but I would prefer to ferret the cause out! :thinking:

1 Like

what about checking the dpkg log (in /var/log) to see if it has any more output?

This gives us the hint:

/usr/sbin/grub-mkconfig: 1: /etc/default/grub: If: not found

I am guessing you tried to change something in the file /etc/default/grub and in the process, you removed the # from the beginning of the first line. Lines starting with # means comments. Now the part of the file which is supposed to be comment is treated as code.

Could you please double check the first line of the /etc/default/grub file? If you are not sure of the things, please paste the output of /etc/default/grub file here so that we can analyze it.


Exactamundo! The # was missing from the beginning of the first line of /etc/default/grub.

A case of “fat fingers,” no doubt… ( ͡ᵔ ͜ʖ ͡ᵔ ) I updated the grub file and rebooted.

Thanks much!

1 Like

Gad to be of help. Enjoy Linux :slight_smile: