Back-to-back kernel panics
Used to be that a new upgrade could be reversed by restarting the 'puter
and then selecting an older (recent) kernel to regain control. Recently
I experienced double kernel panics. Now I cannot recover because I cannot
restart the 'puter, a Thinkpad T420.
Assuming you do not have a separate /boot partition (otherwise you need to mount it at /mnt/boot) and want to install the kernel at version 5.15.0-58-generic (you can choose another old version), I would:
- Boot a live system: https://trisquel.info/en/wiki/starting-installable-live-system
- Enable the network connection (if wired, it should be already enabled)
- Discover what is the root partition of the installed system (for instance from its size in GParted), /dev/sdXY where X is a letter and Y a number (substitute them below)
- Open a terminal, where to execute the following commands:
$ sudo mount /dev/sdXY /mnt
$ for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt/$i; done
$ sudo chroot /mnt
$ apt install linux-image-5.15.0-58-generic - Power the computer off
- Remove the live system
- Power the computer on
- Boot Linux at version 5.15.0-58-generic
- Tell us here if it worked (I have never done that)
When I installed TQ_11 in the selected ThinkPad T430, it took nearly forever,
and I discovered no disks at all. Therefore, I went through the whole process
quoted above with a TQ_10 live disk, whereupon an extensive directory structure
quickly appeared, The device is a SanDisk SSD plus with 240GB of storage, which
TQ_11 may not like.
Now we need to do this within the repository, but applied to the T420
which has a rotating HDD and the back-to-back kernel panics.
I was able to use the older Live Disk because its alternative kernels
contained one that works. I used it to install TQ_10 over TQ_11, which
got us to this stage.
I used it to install TQ_10 over TQ_11, which got us to this stage.
I have not told you to reinstall Trisquel. Just to boot any GNU/Linux live system (that of Trisquel 10 is fine) to chroot to the installed system where you would install an older version of the kernel.
The T430's SSD is invisible to the Live DVD I first tried; with the TQ_10
Live Disk, I got a clean system. The desired "older" kernel is too young ?
The frozen T420 hasn't any viable kernel; and the older ones have been
stripped out in post-processing. We need a working TQ_11-vintage kernel.
There's nothing wrong with the T430's TQ_10 operating system, but it does
have a kernel-panic one in the Grub mnenu. Back in the good old days we
could just pick an older kernel and and go happily on our way.
Maybe I can just extricate the double-kernel-panic hard drive from the
frozen 'puter and mount it in the T430's file system. However, it also
has been stripped of older kernels ...
This result got lost along the way...
"Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-image-5.15.0-58-generic
E: Couldn't find any package by glob 'linux-image-5.15.0-58-generic'
root@george-ThinkPad-T430:/# "
The problem was about a Thinkpad T420, with an unspecified version of Trisquel. I assumed it was the latest version, 11, released eight months ago. However, for some reason, you are executing commands on a Thinkpad T430 with Trisquel 10. Trisquel 10 was released with a 5.4 version of the kernel; the 5.15 version is not in its repository.
> Trisquel 10 was released with a 5.4 version of the kernel; the 5.15 version is not in its repository.
Hello, I'd like to comment on this, please note that this could be completely offtopic, but I think it could give a bit more information.
Trisquel follows the upstream generic kernels, cleaned and tweaked of course, along those it also tracks the HWE ones, where Aramo (HWE) has access to the the 6.2 release and Nabia (installing the HWE package) can use the 5.15 one.
Some of this has been detailed at: https://trisquel.info/en/wiki/update-linux-libre-kernel
So at the moment of writing, 5.15-HWE is on the nabia repository.
Regards
True. Interestingly, the existing integers after "5.15.0-" are not contiguous. The latest one in nabia-updates is 5.15.0-88 ( https://packages.trisquel.org/nabia-updates/linux-image-5.15.0-88-generic ) but there is no 5.15.0-58 for instance ( https://packages.trisquel.org/nabia-updates/linux-image-5.15.0-58-generic leads to an error ). There is 5.15.0-84 but no 5.15.0-85.
Do you happen to know if installing a kernel in a chroot environment works? Are the instructions I wrote correct?
> Do you happen to know if installing a kernel in a chroot environment works? Are the instructions I wrote correct?
It does, you can install trisquel from scratch using debootstrap and chroot if you have no installer at all, but I have not done it in a long time and of course it may require a somewhat middle to high skill level.
They seem correct but it would require some testing to actually confirm, on the next round of kernel updates I can give them a try.
Cheers!
Magic Banana wondered:
> Do you happen to know if installing a kernel in a chroot environment works? Are the instructions I wrote correct?
I tried MB's instructions, except that I over-thought the task and executed update-grub before restarting, with the awkward result of watching the login screen diddle around while thousands (?) of extra steps were added to grub. Holding the shift key during the next startup brought up a useful instance of grub, wherein the advanced
instructions include 5.15.0-84-generic, which boots Up OK. Thanks !
Now what ? I have a dead T430 with no useful operating systems ...
Can I get a useful terminal function from the rescue page ?
I tried MB's instructions, except that I over-thought the task and executed update-grub before restarting, with the awkward result of watching the login screen diddle around while thousands (?) of extra steps were added to grub.
Installing the kernel through APT triggers the execution of update-grub. Executing one more time should not change anything (since you once said you learnt mathematics: update-grub should be idempotent).
Now what ? I have a dead T430 with no useful operating systems ...
Its disk is not detected, right? Well, you should check if it is correctly plugged and, if so, change it.
I came across similar problems in the past:
With SSD: In 2016, Trisquel 7 would not recognize a SSD in my librebooted Thinkpad X200, so I had to use a hard drive instead.
With kernels: Sometimes after updating the kernel, Trisquel will fail to boot with the new kernel. Wisely, Trisquel keeps the most recent older kernels, so it is possible to use grub at boot time to select an older kernel.
If your computer recognizes the secondary storage but fails to boot from it, there is always a solution. You can always boot from an USB stick and mount the secondary storage, then backup the storage if you need to, reformat the storage if you need to, reinstall the system if you need to, or modify the bootloader if you need to. Magic Banana's guide to install a kernel through chroot is, as usual, accurate. If the suggested kernel isn't available, just try older kernels until you find one free of the panics problem.
Kind regards,
Ignacio Agulló.
At long last I understood Magic Banana's instructions as originally stated.
The errant T420 indeed starts OK with the Live Installation DVD and I have
gotten Internet/WiFi access, thanks to ThinkPenguin.
Is this fixed yet ... is there a working kernel for Thinkpad T420 laptops ?
I haven't been able to download a newer DVD image fron trisquel.info.