The Issue
During shutdown and reboot, I had an issue where the screen would hang on a terminal line like this:
Obviously, some processes weren’t terminating properly.
Analysis
What helped was letting the system run for a while to see if it would print something else I could catch.
Eventually, the terminal snitched on the likely suspect:
|
|
Yeah, the swap partition was likely to blame. After rebooting, I checked in the terminal:
|
|
And following advice from more experienced Linux gurus, I first tried adding in:
|
|
(make sure to uncomment the line)
But that didn’t help either.
Solution
Finally, an expert suggested adding the swap to fstab.
First, I found the UUID of the swap partition using:
|
|
Then I added this to 🗂️ /etc/fstab
:
|
|
Since then, the issue has been gone. Just a reminder: before shutting down, close everything, as turning off swap will wipe any unsaved data stored there.
Final thoughts
I’m mainly writing this for myself in case I need to deal with it again in the future. It probably depends on how you have your swap set up, and it might not work for you (systemd vs fstab). Also, keep in mind that if you misconfigure something in fstab, you’ll need to recover it, for example using a USB stick.