On 17 Jun 2024 13:33 -0600, from avelinoheribe...@gmail.com (HERIBERTO AVELINO): > My root account is locked. I experienced the well known issue "Debian > authentication failure" at the log-in stage, i.e. it would not accept the > root password.
I haven't heard of any specific issue like that, but the file system being nearly full should not prevent root from logging in on a typical system. For example ext2/3/4 has a _specific_ margin of storage space reserved for root (which can be displayed using tune2fs -l and set using tune2fs -m; historically it has defaulted to 5%). That said, if files can't be written because the file system is out of space, _some_ things probably will break, and your desktop environment might not particularly like that. But you absolutely should be able to get to a shell. > I shall not attempt a fresh partitioning as many files are not backed up. I really recommend that you start making regular backups, but that's unrelated to this particular issue. User error like overwriting or deleting the wrong file, software bugs corrupting files, and storage device malfunctions are just some examples of when a backup can be very useful; and particularly a laptop can be physically lost or damaged in ways most desktop systems typically aren't at great risk of. (Which is not to say that backups aren't beneficial also with desktop systems; they absolutely are.) But I digress. > So, I would like to ask: > - Can I access the system to back up my working files? > - How can I back up the files to an external device? Yes. If you're comfortable with the command line, then most straightforward way is probably to switch to a non-X virtual terminal (try each of Ctrl+Alt+F[1..8] until you get to a text-based login prompt; note that a laptop may require you to also hold a Fn or similar key to actually get F-key semantics), log in as root there using your normal root password; and start looking around with cd, ls, du and df. `ls -lhrS` will probably be helpful (that's long format list, human-readable file sizes, sort with largest files at the bottom); also `du -bsmx */` (the slash is important) will tell you the size of what's in each subdirectory of the current directory. If there are many, try something like `du -bsmx */ | sort -k1 -nr | head -n10` to get a list of the largest subdirectories of the current directory. Note that this may take a while to complete; be patient. You can plug in external storage such as a USB stick, use lsblk to determine its device node path, and mount it somewhere convenient using something like `mount /dev/sdx /mnt`. You can then use mv to move files to it (or cp to copy). Remember to `umount /mnt` and wait for the command prompt _before unplugging it!_ Or if you find large files that you don't need, you can use rm to delete them. Of course be careful to only do this with things you _know_ that you don't need. Another good place to start to free up space is `apt-get autoclean`, which will delete old package files from apt's local cache (it can get quite large over time if not cleaned). If you can free up a few tens of megabytes, then I suggest installing Midnight Commander. (`apt-get install mc`) Launch it by typing mc at the command prompt. It will make looking around the file system much smoother. Help is available within it by pressing F1, and you can access the drop-down menus by pressing F9. If the F keys don't work, then F1..F10 maps to Esc followed by plain digits 1 through 0. Once you free up maybe a few hundred megabytes to a gigabyte or so, assuming that the problem in the first place was lack of space, you should definitely be able to log in to a graphical session and continue there. -- Michael Kjörling 🔗 https://michael.kjorling.se “Remember when, on the Internet, nobody cared that you were a dog?”