[Solved] No disk space left during mint upgrade from 17.3 to 18.0
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
[Solved] No disk space left during mint upgrade from 17.3 to 18.0
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!
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 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.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
- catweazel
- Level 19
- Posts: 9763
- 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
Backup your treasured stuff and clean install.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?
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
Re: No disk space left during mint upgrade from 17.3 to 18.0
How can I access the data? Most of it is on a separate partition but some stuff is on the LM system partition?
- catweazel
- Level 19
- Posts: 9763
- 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
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.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?
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
Re: No disk space left during mint upgrade from 17.3 to 18.0
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.,
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.
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...Re: No disk space left during mint upgrade from 17.3 to 18.0
I can login but I get the the following message upon .
The problem is that this would require even more space that I don't have anymore for root. What to do now?
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.
Re: No disk space left during mint upgrade from 17.3 to 18.0
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
Re: No disk space left during mint upgrade from 17.3 to 18.0
Run theFrederick 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
The problem is that this would require even more space that I don't have anymore for root. What to do now?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.
Code: Select all
apt clean
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).
Re: No disk space left during mint upgrade from 17.3 to 18.0
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
Just as long as you free up enough space to get back in.
[ was typing while gm10 said the basically same ]
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 ]
Re: No disk space left during mint upgrade from 17.3 to 18.0
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
.Re: No disk space left during mint upgrade from 17.3 to 18.0
Code: Select all
sudo mv /var/lib/dpkg/info/linux-image-extra-4.4.0-21-generic.* /tmp/
Output:
Code: Select all
mv: cannot stat '/var/lib/dpkg/info/linux-image-extra-4.4.0-21-generic.*': No such file or directory
How would I do a clean install on a dual boot system?
Re: No disk space left during mint upgrade from 17.3 to 18.0
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 wrote: ⤴Thu Oct 11, 2018 1:53 pm How would I do a clean install on a dual boot system?
Re: No disk space left during mint upgrade from 17.3 to 18.0
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
Re: No disk space left during mint upgrade from 17.3 to 18.0
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...
Re: No disk space left during mint upgrade from 17.3 to 18.0
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).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...
Last edited by gm10 on Thu Oct 11, 2018 2:34 pm, edited 1 time in total.
Re: No disk space left during mint upgrade from 17.3 to 18.0
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.
Re: No disk space left during mint upgrade from 17.3 to 18.0
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.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.
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).
Re: No disk space left during mint upgrade from 17.3 to 18.0
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.