Ubuntu 20.04.6 LTS apt problems - how to upgrade f/w?
Bo Berglund
bo.berglund at gmail.com
Wed Nov 27 07:07:12 UTC 2024
On Tue, 26 Nov 2024 16:54:38 -0800, MR ZenWiz <mrzenwiz at gmail.com> wrote:
>On Tue, Nov 26, 2024 at 3:42?PM Bo Berglund <bo.berglund at gmail.com> wrote:
>>
>> On Tue, 26 Nov 2024 14:16:18 -0800, MR ZenWiz <mrzenwiz at gmail.com> wrote:
>>
>> >On Tue, Nov 26, 2024 at 1:33?PM Bo Berglund <bo.berglund at gmail.com> wrote:
>> >>
>> >:
>> >>
>> >> Active lines are:
>> >>
>> >> GRUB_DEFAULT=3 <<<<<<<<
>> >I believe this should be set to 0 to default to the most recent
>> >kernel. Yours is set to activate line 4 (0-origin) in the series of
>> >available kernels.
So how do I get a list of available kernels that is ordered in a way that grub
uses (in order to select the correct number for the new entry)?
>> >
>>
>> I have inspected the grub.cfg file by doing this (I cut the long lines down to
>> be able to show them here:
>>
>And in so doing you ignored what Colin and I both said.
>
>Please read and try rather than doing your own thing that's already
>not working, okay?
>
>MRZ
I *have* read it but I do not know *how* to set it to point to another line in
the menu.
I have been told earlier to not manually edit the grub files unless I *really*
know what I am doing. And I don't.
Do you mean that I should *edit* the /etc/default/grub file?
Most of the hits I have found while searching for a solution assume I can select
the appropriate kernel on the grub menu, but that assumes that I have access to
the real hardware, which I don't.
I am connecting by SSH from my Windows machine and need to do everything via the
SSH command line and that obviously does not show the power-up menu on boot...
I thought that running sudo update-grub would fix that but apparently not.
So the question now is really:
Exactly *how* do I change the default kernel in grub via an SSH terminal
connection??
And to which should I point it?
There seems to be no easily editable file to handle this unless you mean I
should edit the /etc/default/grub file.
But then there is another problem in finding the correct number to enter.
When I have listed the available kernels it has been by using a grep command
that does not necessarily do what grub does in enumerating the kernels:
$ dpkg --list 'linux-image*' | grep ^ii
ii linux-image-5.15.0-126-generic 5.15.0-126.136~20.04.1 amd64
Signed kernel image generic
ii linux-image-5.4.0-200-generic 5.4.0-200.220 amd64
Signed kernel image generic
ii linux-image-5.4.0-89-generic 5.4.0-89.100 amd64
Signed kernel image generic
ii linux-image-generic 5.4.0.200.196 amd64
Generic Linux kernel image
ii linux-image-generic-hwe-20.04 5.15.0.126.136~20.04.1 amd64
Generic Linux kernel image
In this list the one that activates (5.4.0-89.100) is the 3rd line.
(Corresponding to the GRUB_DEFAULT entry in the /etc/default/grub file)
Can I just edit the /etc/default/grub file and change 3 to 4 and reboot?
But what happens if I then remove the 5.4.0-89.100 kernel when it has booted to
the 4th entry? Will the next boot activate the now 5th entry since the earlier
3rd has disappeared?
Somewhere I have read that setting it to 0 means that grub will grab the latest
kernel, is that correct?
--
Bo Berglund
Developer in Sweden
More information about the ubuntu-users
mailing list