Mint 19: What happens if system is shutdown during auto-update? [SOLVED]

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
oblong
Level 1
Level 1
Posts: 32
Joined: Sun Dec 04, 2016 11:59 pm

Mint 19: What happens if system is shutdown during auto-update? [SOLVED]

Post by oblong »

Now that Mint 19 incorporates Timeshift which supposedly allows more confident use of auto-updates, and given that the user does not know when those updates may occur, what happens if the user shuts down the system while an update is running?

Are updates completed before finally shutting down (which brings us to the annoying problem Windows has when shutting down with pending updates), or are updates postponed until next session?

Is the update process likely to be corrupted?

The reason I ask, apart from curiosity, is that I look after a machine with a fresh install of Mint 19 MATE which has auto-updates enabled. I have no reason (yet) to suspect this is a problem caused by updates, but twice in the last few days the machine has failed to start properly and ends up at the (initramfs) prompt with a corrupted file system that fsck fixes. But why does this happen? A memory test is ok and hard drive S.M.A.R.T. reports no problems with reallocated sectors, etc. The user apparently does a proper shutdown. So I'm looking for any possible culprits.

Edit: Likewise, what if shutdown occurs during Timeshift?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
gm10

Re: Mint 19: What happens if system is shutdown during auto-update?

Post by gm10 »

A regular shutdown will stop running processes including the auto-update or timeshift. It will however never result in a corrupt file system. Make sure that your users are actually performing a regular shutdown and don't just pull the power plug or hold the power button for 4 seconds because they are impatient.

Another reason for file system corruption could be the kernel version - do you update kernels? The early ones had a bug in the ext4 driver, the latest in the 4.15 series should have that fixed though.
oblong
Level 1
Level 1
Posts: 32
Joined: Sun Dec 04, 2016 11:59 pm

Re: Mint 19: What happens if system is shutdown during auto-update?

Post by oblong »

I would not have thought a normal shutdown should cause file system corruption, even if programs are running.

From what I've been able to ascertain, the computer has been shutdown properly. RAM and hard drive tests are ok. I've subsequently tested it myself and have not been able to make it fail, even by doing the nasty thing of pulling the power plug.

I think it was built from v2 of the ISO; kernel is now 4.15.0-29.

And I did a test of shutting down while Timeshift was running. No file system corruption, but there is some inconsistency in the snapshots. For example, there is a broken link in snapshots-daily and a missing link to a folder that is in snapshots. I guess subsequent runs will sort that out. I'll follow up on that.
gm10

Re: Mint 19: What happens if system is shutdown during auto-update?

Post by gm10 »

oblong wrote: Wed Aug 01, 2018 6:27 pm And I did a test of shutting down while Timeshift was running. No file system corruption, but there is some inconsistency in the snapshots. For example, there is a broken link in snapshots-daily and a missing link to a folder that is in snapshots. I guess subsequent runs will sort that out. I'll follow up on that.
Yes, that's expected unfortunately. As I said, a shutdown will end all running processes, it doesn't wait for them to finish, so your snapshot will be interrupted half-way through. It's probably best to delete that one actually.
oblong
Level 1
Level 1
Posts: 32
Joined: Sun Dec 04, 2016 11:59 pm

Re: Mint 19: What happens if system is shutdown during auto-update?

Post by oblong »

After another Timeshift run, all the snapshots and links sorted themselves out.
Locked

Return to “Other topics”