[Solved] No disk space left during mint upgrade from 17.3 to 18.0

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read how to get help
Post Reply
Frederick Turner
Level 1
Level 1
Posts: 36
Joined: Wed Sep 02, 2015 2:57 pm

[Solved] No disk space left during mint upgrade from 17.3 to 18.0

Post by Frederick Turner » Wed Oct 10, 2018 5:45 pm

Hi,

Unfortunately, I apparently encountered a serious problem during mint upgrade. While the upgrade took place, I got a warning that the space in root (?) was running low. I was surprised about that as generally I had ample disk space. Eventually, it ran out and the upgrade process stalled. After a reboot, I cannot login to Linux Mint anymore. Is there any chance to save this or do I have to scrap everything and make a clean install?

Additional info:
It's a dual boot setup. I can still access Windows 7 if that helps.

Thanks for your help!
Last edited by Frederick Turner on Sun Oct 14, 2018 1:58 pm, edited 1 time in total.
Linux Mint 17.2 64-bit Cinnamon

User avatar
catweazel
Level 17
Level 17
Posts: 7747
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: No disk space left during mint upgrade from 17.3 to 18.0

Post by catweazel » Wed Oct 10, 2018 5:54 pm

Frederick Turner wrote:
Wed Oct 10, 2018 5:45 pm
Is there any chance to save this or do I have to scrap everything and make a clean install?
Backup your treasured stuff and clean install.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

Frederick Turner
Level 1
Level 1
Posts: 36
Joined: Wed Sep 02, 2015 2:57 pm

Re: No disk space left during mint upgrade from 17.3 to 18.0

Post by Frederick Turner » Wed Oct 10, 2018 5:57 pm

How can I access the data? Most of it is on a separate partition but some stuff is on the LM system partition?
Linux Mint 17.2 64-bit Cinnamon

User avatar
catweazel
Level 17
Level 17
Posts: 7747
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: No disk space left during mint upgrade from 17.3 to 18.0

Post by catweazel » Wed Oct 10, 2018 6:05 pm

Frederick Turner wrote:
Wed Oct 10, 2018 5:57 pm
How can I access the data? Most of it is on a separate partition but some stuff is on the LM system partition?
You can access the data on the LM partition from the live media. Copy it to a safe place, such as that separate partition you mentioned.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

rene
Level 8
Level 8
Posts: 2226
Joined: Sun Mar 27, 2016 6:58 pm

Re: No disk space left during mint upgrade from 17.3 to 18.0

Post by rene » Wed Oct 10, 2018 8:32 pm

The likely only reason you can not log in anymore is however also a simple space issue: a certain percentage of a file system, 5% by default, is reserved for the root user and it's likely that available space is still somewhere above 0, even though you can not graphically login as your user anymore.

On the login screen you can with Ctrl-Alt-F1 switch to a virtual console (a text console) and try and login there as your user. If that works, you can free up some space from there, e.g., sudo apt-get autoremove --purge, sudo apt-get clean, and check with df if it matters any. If you have added enough free space again log out with exit and switch back to the graphical login with Ctrtl-Alt-F7. Continue to clean up after logging in regularly as your user, if that now works.

If you can not even login as your user on a virtual console any more (unlikely) you'd do the initial cleaning from the root prompt you are allowed to enter when you boot the system in "rescue mode" in the Grub menu, and if even that fails to free up enough space again, you can temporarily set the reserved blocks percentage on a filesystem to 0 with e.g. tune2fs -m0 /dev/sdz1 for the proper z and 1 from for example the live system. This gets more involved the worse your current fill-rate is, but it's likely that the initial suggestion may work already...

Frederick Turner
Level 1
Level 1
Posts: 36
Joined: Wed Sep 02, 2015 2:57 pm

Re: No disk space left during mint upgrade from 17.3 to 18.0

Post by Frederick Turner » Thu Oct 11, 2018 1:25 pm

I can login but I get the the following message upon

Code: Select all

sudo apt-get autoremove --purge
.

Code: Select all

You might want to run 'apt-get -f install' to correct these
The following packages have unmet dependencies:
	linux-kernel-generic : Depends: linux-image-extra-4.4.0-21-generic but is not installed
E: Unmet dependencies. Try using -f.
The problem is that this would require even more space that I don't have anymore for root. What to do now?
Linux Mint 17.2 64-bit Cinnamon

User avatar
administrollaattori
Level 14
Level 14
Posts: 5466
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: No disk space left during mint upgrade from 17.3 to 18.0

Post by administrollaattori » Thu Oct 11, 2018 1:33 pm

Frederick Turner wrote:
Thu Oct 11, 2018 1:25 pm
You might want to run 'apt-get -f install' to correct these
The following packages have unmet dependencies:
linux-kernel-generic : Depends: linux-image-extra-4.4.0-21-generic but is not installed
E: Unmet dependencies. Try using -f.

Code: Select all

sudo mv /var/lib/dpkg/info/linux-image-extra-4.4.0-21-generic.* /tmp/
sudo dpkg --remove --force-remove-reinstreq linux-image-extra-4.4.0-21-generic
sudo apt-get update

gm10
Level 12
Level 12
Posts: 4114
Joined: Thu Jun 21, 2018 5:11 pm

Re: No disk space left during mint upgrade from 17.3 to 18.0

Post by gm10 » Thu Oct 11, 2018 1:44 pm

Frederick Turner wrote:
Thu Oct 11, 2018 1:25 pm
I can login but I get the the following message upon

Code: Select all

sudo apt-get autoremove --purge
.

Code: Select all

You might want to run 'apt-get -f install' to correct these
The following packages have unmet dependencies:
	linux-kernel-generic : Depends: linux-image-extra-4.4.0-21-generic but is not installed
E: Unmet dependencies. Try using -f.
The problem is that this would require even more space that I don't have anymore for root. What to do now?
Run the

Code: Select all

apt clean
first, that might get you enough disk space to fix the above regularly.

If that wasn't enough, it's safest to either delete some files you don't need or move them to another partition, then try again.

Your system is likely in an inconsistent state with the half-finished upgrade though so I would also recommend a clean install (straight to LM19 if that runs ok from a live USB).

rene
Level 8
Level 8
Posts: 2226
Joined: Sun Mar 27, 2016 6:58 pm

Re: No disk space left during mint upgrade from 17.3 to 18.0

Post by rene » Thu Oct 11, 2018 1:46 pm

Certainly do the above first, but also... since you were in a failed intra-version upgrade, I do believe you should consider the system up for a reinstall from scratch; that you only need to free enough space to to be able to properly log in again and backup anything you want from within your familiar environment before reinstalling.

That is, I would also feel free to be a bit less "nice" about freeing stuff. Specifically sudo rm -r /var/cache/apt/archives/* will be effective, perhaps other directories in /var/cache, stuff from your /home directory if its shared with root, ...

Just as long as you free up enough space to get back in.

[ was typing while gm10 said the basically same ]

gm10
Level 12
Level 12
Posts: 4114
Joined: Thu Jun 21, 2018 5:11 pm

Re: No disk space left during mint upgrade from 17.3 to 18.0

Post by gm10 » Thu Oct 11, 2018 1:48 pm

rene wrote:
Thu Oct 11, 2018 1:46 pm
Specifically sudo rm -r /var/cache/apt/archives/* will be effective,
[...]
[ was typing while gm10 said the basically same ]
Indeed, and just to point out, that command you gave is basically identical to apt clean, so you don't have to be complicated about it. ;)
Or I never know what apt commands LM17 has, so in case of doubt sudo apt-get clean.

Frederick Turner
Level 1
Level 1
Posts: 36
Joined: Wed Sep 02, 2015 2:57 pm

Re: No disk space left during mint upgrade from 17.3 to 18.0

Post by Frederick Turner » Thu Oct 11, 2018 1:53 pm

administrollaattori wrote:
Thu Oct 11, 2018 1:33 pm

Code: Select all

sudo mv /var/lib/dpkg/info/linux-image-extra-4.4.0-21-generic.* /tmp/
[/quote]

Output:

Code: Select all

mv: cannot stat '/var/lib/dpkg/info/linux-image-extra-4.4.0-21-generic.*': No such file or directory
Anymore ideas?

How would I do a clean install on a dual boot system?
Linux Mint 17.2 64-bit Cinnamon

rene
Level 8
Level 8
Posts: 2226
Joined: Sun Mar 27, 2016 6:58 pm

Re: No disk space left during mint upgrade from 17.3 to 18.0

Post by rene » Thu Oct 11, 2018 1:57 pm

Frederick Turner wrote:
Thu Oct 11, 2018 1:53 pm
How would I do a clean install on a dual boot system?
Depending (a bit) on your level of expertise, easiest is picking the "Something else" option for the partitioning step of the new install and simply re-use (and format) your current Linux partition(s) for the new install.

Frederick Turner
Level 1
Level 1
Posts: 36
Joined: Wed Sep 02, 2015 2:57 pm

Re: No disk space left during mint upgrade from 17.3 to 18.0

Post by Frederick Turner » Thu Oct 11, 2018 2:00 pm

gm10 wrote:
Thu Oct 11, 2018 1:48 pm
rene wrote:
Thu Oct 11, 2018 1:46 pm
Specifically sudo rm -r /var/cache/apt/archives/* will be effective,
[...]
[ was typing while gm10 said the basically same ]
Indeed, and just to point out, that command you gave is basically identical to apt clean, so you don't have to be complicated about it. ;)
Or I never know what apt commands LM17 has, so in case of doubt sudo apt-get clean.
Both proposed commands don't seem to do the job. When I try to login via the graphical interface, I get:

Code: Select all

inictl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
mdm[1358]: GLib-CRITICAL: g_key_file_free: assertion 'key_file != NULL' failed
Linux Mint 17.2 64-bit Cinnamon

rene
Level 8
Level 8
Posts: 2226
Joined: Sun Mar 27, 2016 6:58 pm

Re: No disk space left during mint upgrade from 17.3 to 18.0

Post by rene » Thu Oct 11, 2018 2:03 pm

gm10 wrote:
Thu Oct 11, 2018 1:48 pm
Indeed, and just to point out, that command you gave is basically identical to apt clean, so you don't have to be complicated about it. ;)
The manual version was of course due to apt-get itself bombing out on the "unmet dependencies" before getting to anything else. Now, maybe that's not the case for sudo apt-get clean but frankly, I don't know.

See OP's follow-up when posting. Mmm. I'd at this point boot a live system for reinstall, and just manually back up all that's needed first from there. If that's a huge problem, post back and we can try, but given that the system needs to be considered hosed anyway, let's try for least effort...

gm10
Level 12
Level 12
Posts: 4114
Joined: Thu Jun 21, 2018 5:11 pm

Re: No disk space left during mint upgrade from 17.3 to 18.0

Post by gm10 » Thu Oct 11, 2018 2:17 pm

rene wrote:
Thu Oct 11, 2018 2:03 pm
See OP's follow-up when posting. Mmm. I'd at this point boot a live system for reinstall, and just manually back up all that's needed first from there. If that's a huge problem, post back and we can try, but given that the system needs to be considered hosed anyway, let's try for least effort...
I completely agree. That system is hosed, it's not worth investing time into anymore other than to backup up the data. After that it's time to clean install (and you should really consider LM19 instead of 18 if your system supports it, no point in installing an old version).
Last edited by gm10 on Thu Oct 11, 2018 2:34 pm, edited 1 time in total.

Frederick Turner
Level 1
Level 1
Posts: 36
Joined: Wed Sep 02, 2015 2:57 pm

Re: No disk space left during mint upgrade from 17.3 to 18.0

Post by Frederick Turner » Thu Oct 11, 2018 2:34 pm

By the way, what could I have done when the low space warning appeared during the upgrade process? I didn't know how to stop the upgrade process and I wasn't aware I could and would run into space issues to begin with.
Linux Mint 17.2 64-bit Cinnamon

gm10
Level 12
Level 12
Posts: 4114
Joined: Thu Jun 21, 2018 5:11 pm

Re: No disk space left during mint upgrade from 17.3 to 18.0

Post by gm10 » Thu Oct 11, 2018 2:40 pm

Frederick Turner wrote:
Thu Oct 11, 2018 2:34 pm
By the way, what could I have done when the low space warning appeared during the upgrade process? I didn't know how to stop the upgrade process and I wasn't aware I could and would run into space issues to begin with.
I never used the script so not sure, ideally it would check available disk space and give you a chance to free up space if it becomes a problem. I guess that didn't happen.

You could have halted the execution of the upgrade script with Ctrl+Z (same any other terminal program), then freed up some space, then brought the script back to the foreground with fg to resume. No, you were not expected to know that. ;)

I believe the LM18.3 to LM19 upgrade script forces you to create a timeshift snapshot so you can always recover from a failed upgrade no matter what. Even if the LM17.3 version didn't do that, always make sure you've got your data backed up before such an undertaking (and also just in general, your disk fail tomorrow, always have a backup).

Frederick Turner
Level 1
Level 1
Posts: 36
Joined: Wed Sep 02, 2015 2:57 pm

Re: No disk space left during mint upgrade from 17.3 to 18.0

Post by Frederick Turner » Thu Oct 11, 2018 5:19 pm

Unfortunately, the clean install did not work out as expected. See Fatal error: Unable to install GRUB. I hope you guys can help me one more time.
Linux Mint 17.2 64-bit Cinnamon

Post Reply

Return to “Other topics”