If your Raspberry Pi is asking for password, it might mean the SD card is full.

Thread Starter

strantor

Joined Oct 3, 2010
6,783
I have a RPi 4b on which I have been working on a project for months. It boots straight in to the desktop and I access via VNC over my LAN. One day it didn't go straight to desktop; instead it presented me with the RPi desktop login screen, and was not satisfied with any password I entered. Since I had been working with it for so long I was not 100% sure what password I had used when setting it up. It didn't like "Raspberry" or any of the other two dozen phrases I would have used.

This was a few weeks ago and I don't remember all the steps I took to work around it, but I didn't invest much effort before just starting over with a fresh install of RPi OS on a new SD card (I saved the old SD card just in case). My project was backed up to Github and I only a couple of days of uncommitted work, most of which I remembered and was able to replicate in less than a full day.

Fast forward to last night, I had an issue that I remembered having before, that I had solved by making some configuration changes to the OS on the old Pi. I could not remember what the changes were, so I had the idea to put the old SD card in a USB reader, connect it to the new Pi, and search through it for recently modified files. If I had a USB-SD card reader weeks ago I would have done this sooner, but at that time I only had the SD card slot on my Windows laptop so I was only able to see the bootfs drive and not the rootfs drive. Anyway, when opened the Linux rootfs drive under the Linux OS, I noticed it said "0b free." I searched for the source of whatever was occupying 100.0% of the 128GB SD card and it was a folder of logs generated by Python scripts in my project. Bad programming on my part, lesson learned.I deleted all 100+GB of logs and put the old SD card back in the Pi and it booted right into the desktop as it had been doing before.

I did not see this presented anywhere as a possible cause of not booting to desktop when I googled. I googled it again just now, just to see how stupid I am when it comes up as top suggestion, and was gratified to find no mention of it. Just a bunch of talk about xsession, corrupted permissions, etc. I also googled "what happens when raspberry pi sd card is full?" and it seems that the typical behavior is that it should not boot even as far as the login screen. So feeling somewhat vindicated, I decided to post here in case someone else experiences similar, remember this post.

Since I'm sure several people are about to post "when I googled it just now, 100% disk usage was the top result," please post specifically what combination of words you typed into the search bar so that I may learn to construct better queries, because nothing I tried even hinted about this being a potential cause.
 

Ya’akov

Joined Jan 27, 2019
9,117
A frustrating sort of error. A suggestion for the future: use syslog to make logs, and direct the RPi logging to a syslogd set up on another machine with conventional storage.

You can use logger or a similar program to do the writing with a system call or use a Python syslog library.
 

nsaspook

Joined Aug 27, 2009
13,253
...
I did not see this presented anywhere as a possible cause of not booting to desktop when I googled. I googled it again just now, just to see how stupid I am when it comes up as top suggestion, and was gratified to find no mention of it. Just a bunch of talk about xsession, corrupted permissions, etc. I also googled "what happens when raspberry pi sd card is full?" and it seems that the typical behavior is that it should not boot even as far as the login screen. So feeling somewhat vindicated, I decided to post here in case someone else experiences similar, remember this post.

Since I'm sure several people are about to post "when I googled it just now, 100% disk usage was the top result," please post specifically what combination of words you typed into the search bar so that I may learn to construct better queries, because nothing I tried even hinted about this being a potential cause.
It's easy to find if you already know what's wrong. ;)

It's unable to create temp files in the root partition. A general UNIX/Linux login issue since forever. This is why it's not a good thing to have everything in one partition (instead of at least split system and user partitions) where user files and critical system files share the same drive partition.
 
Top