Stuck in login loop - how do I free-up space on /boot with only Command Line access?

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
User avatar
Cassandra
Level 3
Level 3
Posts: 139
Joined: Fri Mar 26, 2021 7:07 pm
Location: The English equivalent of US 'Flyover country'

Re: Cannot login to Mint after software update from Mint official Update Manager

Post by Cassandra »

I tried sudo apt autoclean, and it appears to removed above 62Mb of “linuxmint1+una”.

Should I try to reboot?

Or is there another command I should use first?
Busy, busy, busy! And probably turtles all the way down.
Mint Cinnamon 20.3 Una (64-bit)
User avatar
Cassandra
Level 3
Level 3
Posts: 139
Joined: Fri Mar 26, 2021 7:07 pm
Location: The English equivalent of US 'Flyover country'

Re: Cannot login to Mint after software update from Mint official Update Manager

Post by Cassandra »

sleeper12 wrote: Fri Jan 28, 2022 4:54 pm Try:

Code: Select all

 sudo apt remove --auto-remove 
That has also returned a list of all 0 (to upgrade, etc).
Busy, busy, busy! And probably turtles all the way down.
Mint Cinnamon 20.3 Una (64-bit)
sleeper12
Level 21
Level 21
Posts: 14607
Joined: Thu May 25, 2017 3:22 pm

Re: Cannot login to Mint after software update from Mint official Update Manager

Post by sleeper12 »

Ok, not sure what autoclean removed, but see if you can reboot now.
User avatar
Cassandra
Level 3
Level 3
Posts: 139
Joined: Fri Mar 26, 2021 7:07 pm
Location: The English equivalent of US 'Flyover country'

Re: Cannot login to Mint after software update from Mint official Update Manager

Post by Cassandra »

sleeper12 wrote: Fri Jan 28, 2022 4:58 pm Ok, not sure what autoclean removed, but see if you can reboot now.
Hmm.
ls -la looks the same, so I don’t know what it’s removed either.

What is the correct command for shutdown?
Should I just use the power button?
Busy, busy, busy! And probably turtles all the way down.
Mint Cinnamon 20.3 Una (64-bit)
sleeper12
Level 21
Level 21
Posts: 14607
Joined: Thu May 25, 2017 3:22 pm

Re: Cannot login to Mint after software update from Mint official Update Manager

Post by sleeper12 »

Try:

Code: Select all

 poweroff 
User avatar
Cassandra
Level 3
Level 3
Posts: 139
Joined: Fri Mar 26, 2021 7:07 pm
Location: The English equivalent of US 'Flyover country'

Re: Cannot login to Mint after software update from Mint official Update Manager

Post by Cassandra »

Well, I am still stuck in the ‘login loop’ :(

Ctrl+Alt+F3 at login has me back to a full-screen Terminal/command prompt.

Should I start using rm to remove the files associated with old kernels that I no longer want?
Or would that be dangerous?
Busy, busy, busy! And probably turtles all the way down.
Mint Cinnamon 20.3 Una (64-bit)
sleeper12
Level 21
Level 21
Posts: 14607
Joined: Thu May 25, 2017 3:22 pm

Re: Cannot login to Mint after software update from Mint official Update Manager

Post by sleeper12 »

I've never done it that way, so not sure. You might want to wait for someone else to respond.
User avatar
Cassandra
Level 3
Level 3
Posts: 139
Joined: Fri Mar 26, 2021 7:07 pm
Location: The English equivalent of US 'Flyover country'

Re: Cannot login to Mint after software update from Mint official Update Manager

Post by Cassandra »

sleeper12 wrote: Fri Jan 28, 2022 5:12 pm I've never done it that way, so not sure. You might want to wait for someone else to respond.
Ok, thanks for your help anyway :)
Busy, busy, busy! And probably turtles all the way down.
Mint Cinnamon 20.3 Una (64-bit)
User avatar
Cassandra
Level 3
Level 3
Posts: 139
Joined: Fri Mar 26, 2021 7:07 pm
Location: The English equivalent of US 'Flyover country'

Re: Stuck in login loop - how do I free-up space on /boot with only Command Line access?

Post by Cassandra »

I’ve now changed the name of the thread again, to reflect the fact that the problem appears to be that my /boot directory is 98% full.

If anyone is reading this, I need to re-iterate that I have ONLY got command line access (I can not log in to any GUI), and that I am a clueless new user.

I have looked at many old ‘login loop’ threads already, but have not found one that tells me how to free-up space in /boot.
I cannot get into Timeshift to delete old backups, or to change the location to which it writes backups, because I cannot access the GUI.

I don’t know how to create new partitions, re-size existing ones, or to move files between them from the CLI.

I need to know whether it is safe for me to start trying to remove files in the /boot that are related to old kernels by using the rm command from the CLI, or whether attempting to do so might banjax my system even more.

Thanks in advance for any suggestions.
Busy, busy, busy! And probably turtles all the way down.
Mint Cinnamon 20.3 Una (64-bit)
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Stuck in login loop - how do I free-up space on /boot with only Command Line access?

Post by Flemur »

Cassandra wrote: Fri Jan 28, 2022 5:58 pm I have looked at many old ‘login loop’ threads already, but have not found one that tells me how to free-up space in /boot.
This will remove old kernels:

Code: Select all

sudo apt-get autoremove --purge
In an emergency you could also run

Code: Select all

uname -a 
to see which kernel you using, e.g. 5.11.0-37-generic, then remove, by hand, the files for another kernel(s):

Code: Select all

sudo rm /boot/*5.4.0-96*  # a not-used kernal
If you can now boot and login with the same one uname returned, run the Update Manager and clean up the kernels there.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
User avatar
Cassandra
Level 3
Level 3
Posts: 139
Joined: Fri Mar 26, 2021 7:07 pm
Location: The English equivalent of US 'Flyover country'

Re: Stuck in login loop - how do I free-up space on /boot with only Command Line access?

Post by Cassandra »

Flemur wrote: Fri Jan 28, 2022 6:07 pm
Cassandra wrote: Fri Jan 28, 2022 5:58 pm I have looked at many old ‘login loop’ threads already, but have not found one that tells me how to free-up space in /boot.
This will remove old kernels:

Code: Select all

sudo apt-get autoremove --purge
I just tried that, and got the same response as my other attempts at autoclean and purge - a list of 0 effects :(
Flemur wrote: Fri Jan 28, 2022 6:07 pm In an emergency you could also run

Code: Select all

uname -a 
to see which kernel you using, e.g. 5.11.0-37-generic, then remove, by hand, the files for another kernel(s):

Code: Select all

sudo rm /boot/*5.4.0-96*  # a not-used kernal
If you can now boot and login with the same one uname returned, run the Update Manager and clean up the kernels there.
uname -a tells me that the machine is running 5.13.0-27-generic.

Should I now start using rm to remove the files in /boot that are associated with e.g. the old 5.11 kernels?
Busy, busy, busy! And probably turtles all the way down.
Mint Cinnamon 20.3 Una (64-bit)
User avatar
Cassandra
Level 3
Level 3
Posts: 139
Joined: Fri Mar 26, 2021 7:07 pm
Location: The English equivalent of US 'Flyover country'

Re: Stuck in login loop - how do I free-up space on /boot with only Command Line access?

Post by Cassandra »

Well, I have found out that most of the files that I want to remove are currently write-protected, and so I cannot remove them, even using sudo.

Is there a way for me to change them from read-only to read/write from the CLI?

The current ‘permissions’ string on each of them is:
- r w - - - - - -
Busy, busy, busy! And probably turtles all the way down.
Mint Cinnamon 20.3 Una (64-bit)
User avatar
Cassandra
Level 3
Level 3
Posts: 139
Joined: Fri Mar 26, 2021 7:07 pm
Location: The English equivalent of US 'Flyover country'

Re: Stuck in login loop - how do I free-up space on /boot with only Command Line access?

Post by Cassandra »

Further information:
I have managed to get /boot down to ‘only’ 84% full, with 106Mb free space, so ought to be able to login now - but I am still stuck in the ‘Login Loop’ :(

What should I be trying next?
Busy, busy, busy! And probably turtles all the way down.
Mint Cinnamon 20.3 Una (64-bit)
User avatar
Cassandra
Level 3
Level 3
Posts: 139
Joined: Fri Mar 26, 2021 7:07 pm
Location: The English equivalent of US 'Flyover country'

Re: Stuck in login loop - how do I free-up space on /boot with only Command Line access?

Post by Cassandra »

Another thread suggests that I use rm .ICEauthority .Xauthority from within /home.

I am within /home/myusername/
The command ls -la returns a list that does not include the file .ICEauthority, but .Xauthority is there.
Should I just try removing .Xauthority?
Busy, busy, busy! And probably turtles all the way down.
Mint Cinnamon 20.3 Una (64-bit)
User avatar
Cassandra
Level 3
Level 3
Posts: 139
Joined: Fri Mar 26, 2021 7:07 pm
Location: The English equivalent of US 'Flyover country'

Re: Stuck in login loop - how do I free-up space on /boot with only Command Line access?

Post by Cassandra »

Cassandra wrote: Fri Jan 28, 2022 6:57 pm Another thread suggests that I use rm .ICEauthority .Xauthority from within /home.

I am within /home/myusername/
The command ls -la returns a list that does not include the file .ICEauthority, but .Xauthority is there.
Should I just try removing .Xauthority?
Ok, so I have now done that, and yet I am still stuck in the Login Loop.
And, although .Xauthority did reappear in the list of files in my home directory, .ICEauthority is still not present :(

So, does anyone have any more suggestions?

Thanks again for any answers.
Busy, busy, busy! And probably turtles all the way down.
Mint Cinnamon 20.3 Una (64-bit)
t42
Level 11
Level 11
Posts: 3744
Joined: Mon Jan 20, 2014 6:48 pm

Re: Stuck in login loop - how do I free-up space on /boot with only Command Line access?

Post by t42 »

if you stuck in login loop and have separate partitions, not the lack of space on the boot partition is the problem.
-=t42=-
User avatar
Cassandra
Level 3
Level 3
Posts: 139
Joined: Fri Mar 26, 2021 7:07 pm
Location: The English equivalent of US 'Flyover country'

Re: Stuck in login loop - how do I free-up space on /boot with only Command Line access?

Post by Cassandra »

t42 wrote: Fri Jan 28, 2022 7:06 pm if you stuck in login loop and have separate partitions, not the lack of space on the boot partition is the problem.
Sorry, I don’t understand what you mean - I have two ‘user accounts’ on the machine, and have had since I bought it.

I have not re-partitioned my drive at any time since I bought the machine.

If it’s any help, the /home/‘username’ directory for each of the two user accounts (‘my username’, which is password-protected, and the ‘guest’ account, which has no password) have the same problem.
Curiously, neither folder contains a .ICEauthority file.
Busy, busy, busy! And probably turtles all the way down.
Mint Cinnamon 20.3 Una (64-bit)
User avatar
SMG
Level 25
Level 25
Posts: 31971
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Stuck in login loop - how do I free-up space on /boot with only Command Line access?

Post by SMG »

Cassandra wrote: Fri Jan 28, 2022 5:58 pmI cannot get into Timeshift to delete old backups, or to change the location to which it writes backups, because I cannot access the GUI.
If your boot partition is full, I'm not sure removing snapshots will help.

However, if you have your install usb, you can boot to a live session of Linux Mint and use Timeshift on the live session to either restore to an earlier snapshot or to remove older snapshots.

The live session also had G-Parted on it if you would need to do anything with partitions.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
Cassandra
Level 3
Level 3
Posts: 139
Joined: Fri Mar 26, 2021 7:07 pm
Location: The English equivalent of US 'Flyover country'

Re: Stuck in login loop - how do I free-up space on /boot with only Command Line access?

Post by Cassandra »

Further information:

I went all the way up the directory-tree to the root folder.
I tried the command sudo apt-get install -f.

That returned another list of 0 possible changes.

So I then tried sudo apt-get - -fix-broken .

That returned a slightly different message; it told me
Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend)
, at the end of which was
are you root?
Then I was back to the CLI at/$

Does that suggest that a file on my laptop is corrupted?
Or is it just the folder that stores the bit of code within Mint that means that no user has root permission?
Busy, busy, busy! And probably turtles all the way down.
Mint Cinnamon 20.3 Una (64-bit)
User avatar
Cassandra
Level 3
Level 3
Posts: 139
Joined: Fri Mar 26, 2021 7:07 pm
Location: The English equivalent of US 'Flyover country'

Re: Stuck in login loop - how do I free-up space on /boot with only Command Line access?

Post by Cassandra »

SMG wrote: Fri Jan 28, 2022 7:42 pm
Cassandra wrote: Fri Jan 28, 2022 5:58 pmI cannot get into Timeshift to delete old backups, or to change the location to which it writes backups, because I cannot access the GUI.
If your boot partition is full, I'm not sure removing snapshots will help.

However, if you have your install usb, you can boot to a live session of Linux Mint and use Timeshift on the live session to either restore to an earlier snapshot or to remove older snapshots.

The live session also had G-Parted on it if you would need to do anything with partitions.
I did manage to remove some old files from /boot and got it down to 84% full, so it ought to now be bootable if space was the problem, shouldn’t it?
(I personally don’t know, and am going by an old thread that suggested that 92% was the threshold for boot problems.)

I bought the machine with Mint pre-installed on it. It did come with a USB though.
Should I try booting from that?
Busy, busy, busy! And probably turtles all the way down.
Mint Cinnamon 20.3 Una (64-bit)
Locked

Return to “Beginner Questions”