Difficulties changing kernel [Solved]

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
norm.h
Level 5
Level 5
Posts: 585
Joined: Tue Mar 23, 2010 11:45 am
Location: Oxfordshire, UK

Re: Difficulties changing kernel

Post by norm.h »

Please see also my other thread "Two Grub2 queries" here...
viewtopic.php?f=46&t=261369

minitux
Level 5
Level 5
Posts: 854
Joined: Tue Sep 12, 2017 10:05 am

Re: Difficulties changing kernel

Post by minitux »

Code: Select all

sudo rm /var/lib/dpkg/info/linux-image-4.13.0-26-generic.postinst

Code: Select all

sudo rm /var/lib/dpkg/info/linux-image-extra-4.13.0-26-generic.postinst

Code: Select all

sudo rm /var/lib/dpkg/info/grub-pc.postinst

Code: Select all

sudo apt install -f

norm.h
Level 5
Level 5
Posts: 585
Joined: Tue Mar 23, 2010 11:45 am
Location: Oxfordshire, UK

Re: Difficulties changing kernel

Post by norm.h »

Code: Select all

normh@normh-nspire2 ~ $ sudo rm /var/lib/dpkg/info/linux-image-4.13.0-26-generic.postinst
[sudo] password for normh: 
normh@normh-nspire2 ~ $ sudo rm /var/lib/dpkg/info/linux-image-extra-4.13.0-26-generic.postinst
normh@normh-nspire2 ~ $ sudo rm /var/lib/dpkg/info/grub-pc.postinst
normh@normh-nspire2 ~ $ sudo apt install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 66 not to upgrade.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up grub-pc (2.02~beta2-36ubuntu3.9+linuxmint1) ...
Setting up linux-image-4.13.0-26-generic (4.13.0-26.29~16.04.2) ...
Setting up linux-image-extra-4.13.0-26-generic (4.13.0-26.29~16.04.2) ...
normh@normh-nspire2 ~ $

sudo update-grub still returns the same text

[code]normh@normh-nspire2 ~ $ sudo update-grub
/usr/sbin/grub-mkconfig: 1: /etc/default/grub: If: not found
normh@normh-nspire2 ~ $ 

minitux
Level 5
Level 5
Posts: 854
Joined: Tue Sep 12, 2017 10:05 am

Re: Difficulties changing kernel

Post by minitux »

it seems that has configured everything, try now the update of grub, what does it say?

Code: Select all

sudo update-grub

norm.h
Level 5
Level 5
Posts: 585
Joined: Tue Mar 23, 2010 11:45 am
Location: Oxfordshire, UK

Re: Difficulties changing kernel

Post by norm.h »

Code: Select all

normh@normh-nspire2 ~ $ sudo update-grub
[sudo] password for normh: 
/usr/sbin/grub-mkconfig: 1: /etc/default/grub: If: not found
normh@normh-nspire2 ~ $ 
I just tried a reboot.
Grub first line is for the original [4.8]
In the choices there are only 4.8 and 4.4 but 4.13 isn't shown.

Which is why I started the other thread.

norm.h
Level 5
Level 5
Posts: 585
Joined: Tue Mar 23, 2010 11:45 am
Location: Oxfordshire, UK

Re: Difficulties changing kernel

Post by norm.h »

Must shut down for today.
Many thanks again for your interest and help.
Back tomorrow.

minitux
Level 5
Level 5
Posts: 854
Joined: Tue Sep 12, 2017 10:05 am

Re: Difficulties changing kernel

Post by minitux »

Before I did not see all the outputs, I would try to remove and then reinstall the grub-pc package, but it involves operations to be chosen in a terminal window if you want to try make before a backup of your data.

Code: Select all

sudo apt purge grub-pc
Image
with the Tab key choose yes and press enter

at the end

Code: Select all

sudo apt install --reinstall grub-pc
Image
with the Tab key choose OK and press enter

then select /dev/sda pressing the space bar
Image
and in the end select OK pressing Tab key
Image
and press Enter

norm.h
Level 5
Level 5
Posts: 585
Joined: Tue Mar 23, 2010 11:45 am
Location: Oxfordshire, UK

Re: Difficulties changing kernel

Post by norm.h »

Problem solved from advice in the "Two Queries" thread to check the #s in etc/default/grub.
The # was missing from the first line - corrected this, rebooted straight into 4.13, no problems. :D

Thank you again for your help.

minitux
Level 5
Level 5
Posts: 854
Joined: Tue Sep 12, 2017 10:05 am

Re: Difficulties changing kernel

Post by minitux »

Nice, It was a mistake of mine, you had also posted the file here but I had not noticed the # missing the first line.

viewtopic.php?f=46&t=261295#p1412507

If I realized it, you had solved it before

However, put [SOLVED] on this thread, since problems with installing kernel packages have been fixed

Post Reply

Return to “Installation & Boot”