this post was submitted on 19 Mar 2025
4 points (100.0% liked)

Linux Mint

2134 readers
16 users here now

Linux Mint is a free Linux-based operating system designed for use on desktop and laptop computers.

Want to see the latest news from the blog? Set the Firefox homepage to:

linuxmint.com/start/

where is a current or past release. Here's an example using release 21.1 'Vera':

https://linuxmint.com/start/vera/

founded 3 years ago
MODERATORS
 

TL;DR: Lost internet mid update, decided to be an idiot and restart my laptop. Turns out it was in the middle of a kernel update, took some puttering to make things work again.

Story time. I have a Mint laptop that I use rarely because of my openSUSE desktop. Because I use it so rarely, every time I turn it on, there will be a kernel update. So today, I turned it on and ran my update script only to have it lose internet halfway through (it was a VPN issue).

Because I can be impatient, I said, "Surely nothing will go wrong," and hard powered off the laptop. Reboot it, and my desktop background is gone. Also, Ctrl+Alt+T isn't working. Actually, nothing except for my desktop icons are accessible. Turns out when I powered off my laptop, it was in the middle of specifically the kernel update (or at least some portion of it).

Through trial and error, I figured out that I got to open exactly one program and have it work as intended. Once I opened a second one, I could no longer go back to the first, and once I opened a third, my keyboard would no longer work.

But I got lucky because I had a folder available on my desktop. I was able to open the file manager, navigate to /usr/bin/gnome-terminal to get that open, and re-run the update script. After rebooting the computer, everything worked as normal, but it was a terrifying moment. Cautionary tale, I guess?

top 4 comments
sorted by: hot top controversial new old
[–] [email protected] 3 points 3 hours ago

Ah I don't miss those days.

I swapped to using Atomic distributions, no more shenanigans.

[–] [email protected] 2 points 3 hours ago

It's been a few years since I ran Mint, but I believe, it keeps old kernel versions around for when there is a problem with a newer kernel or during the upgrade.
You should be able to select an older kernel to boot from, from the bootloader (GRUB). Apparently, you can hold Shift after powering on your PC to get to GRUB's boot menu.

Though, to be honest, I'm not entirely convinced that it was (just) the kernel that was mid-update at that point.

openSUSE is more resilient for this sort of problem. In GRUB (which gets shown by default on openSUSE), you can select a filesystem snapshot to boot from. You would select the snapshot from the start of the upgrade.
If everything works correctly, you run sudo snapper rollback to tell it to actually roll back to that (throwing away your changes from the broken update) and then you do another reboot afterwards.
More info on that here: https://doc.opensuse.org/documentation/leap/reference/html/book-reference/cha-snapper.html#sec-snapper-snapshot-boot

[–] [email protected] 2 points 4 hours ago* (last edited 4 hours ago) (1 children)

Can you share your update script which broke the system? I would be very interested. I usually do apt upgrade -yd first to make sure everything is downloaded before the upgrade starts

[–] [email protected] 1 points 4 hours ago

My script is basically just the following in a .sh file:

sudo apt update -y && sudo apt upgrade -y

I think there's an autoremove statement as well, but I can't remember exactly off the top of my head.

What broke it was entirely my fault, not the script. While I'm not entirely sure what had occurred, it's definitely related to me turning off the computer in the middle of what I'm going to call "post processing" where everything is put in place.

My best guess is that there were mismatched files from different versions that were causing some kind of error. Because I was able to navigate the file system and actually use gnome-terminal once I got there, I'm starting to think I broke something in Cinnamon rather than the kernel. The consequences were that the "taskbar" was gone, I couldn't access the "start menu", my windows couldn't be resized, and no keyboard shortcuts worked.