Can't install with pacman: Partition /etc too full
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can't install with pacman: Partition /etc too full
Hi, I'm a Steam Deck user (Arch Linux type OS). I can't install anything (except very small packages) using pacman: (...) Partition /etc too full: x blocks needed 0 free Not enough free disk space (...)
Viewing /etc properties it's 5.5mb in size but says "0b free of 229.9mb used" for free space.
I'm comfortable with Linux and shell but not that experienced, I've searched Google for a while on this one but I just can't find examples of this problem. Google is not good at the keyword "etc" apparently haha.
What's etc for, and why is pacman trying to cram files in there specifically? Can I make pacman use a different location or can I expand or repartition etc (without losing data)? I've got plenty of free space elsewhere.
You haven't said what your disk/partitions look like.
What is the output of (for you to look at)
Code:
lsblk -f
fdisk -l
df -h
mount | column -t
du -c /etc
I would not put /etc in it's own partition. I would make it part of /. If you have a partition that is full, then you'll need to make space or, reinstall differently. The only partition that is mandatory is /.
What /etc is there for is to contain all the system configuration files. All of these are plain text, readable on screen or in any editor. Some belong to the system as a whole but most belong to individual programs. Many programs put configuration files here and no, they can't go elsewhere.
What is really weird about your system is that you have a separate partition for /etc. I've never seen that before so I'm not surprised you couldn't find any examples with google. Usually /etc is a directory (folder) on your root partition.
If you have enough space on the root partition, you can just create an /etc directory there and move over all the stuff currently on this partition, then edit /etc/fstab to prevent the partition being mounted in future.
Thanks @hazel, that sounds doable, and like a perfect solution. I am a little nervous about bricking the system though (will make some backups before I do this). Based on your suggestion I found similar instructions here at the bottom; https://unix.stackexchange.com/quest...-linux-machine
Are you confident that this is safe to do? Thinking about things like locking itself out some way, since you mentioned editing fstab which itself will be moved. But because it's moved to the same path as before, it should be fine as long as you don't reboot in the middle of the process I suppose?
Was giving it a go, but won't let me unmount or mv /etc because it is busy.
Of course not! As stated above it is a system configuration directory and is in use from the moment the system is powered on.
You will need to boot using a live media, then do the changes suggested while the OS disks are not in use by the running system
[code]
1. boot to live media
2. create 2 directories, /mnt/root and /mnt/etc
3. mount the main OS / partition at /mnt/root
4. mount the main /etc partition at /mnt/etc
5. copy everything from /mnt/etc to /mnt/root/etc/
'sudo cp /mnt/etc/* /mnt/root/etc/' would do that
6. edit /mnt/root/etc/fstab to remove or comment out the line that mounts the original /etc partition at /etc
7. reboot normally and things should work properly.
Once all that is done then you can, if you wish, remove the original /etc partition and free up that space for other uses.
I don't know how much space you have in that partition, but the suggestions from and results asked for by teckk and hazel will tell you that. For me I only have 58M of data under /etc.
@computersavvy, Thanks so much for the in-depth instructions!
However just now, after checking out fstab and running the commands suggested by teckk and hazel, ... it looks like /etc is not a partition after all. So why is pacman complaining about /etc being a full partition, and why is the file explorer showing me that it's indeed full?
Code:
Packages (1) fakeroot-1.27-1
Total Installed Size: 0.13 MiB
:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring [######################################] 100%
(1/1) checking package integrity [######################################] 100%
(1/1) loading package files [######################################] 100%
(1/1) checking for file conflicts [######################################] 100%
(1/1) checking available disk space [######################################] 100%
error: Partition /etc too full: 11773 blocks needed, 0 blocks free
error: not enough free disk space
error: failed to commit transaction (not enough free disk space)
Errors occurred, no packages were upgraded.
(user@synchideck ~)$ sudo fdisk -l
Device Start End Sectors Size Type
/dev/nvme0n1p4 264192 10749951 10485760 5G Linux root (x86-64)
(user@synchideck ~)$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/nvme0n1p4 5.0G 3.9G 899M 82% /
If you have no other partitions, then /etc is in your /(root) directory which has 5G and available 899M. Consider making that partition a minimum of 10G better 15G or 20G if you can afford it.
Limited freespace and BTRFS make poor partners. You really need to put those filesystems on a diet, or replace most with larger, or both. That full /var is ready to bite you hard. Also, for dealing with BTRFS filesystems there are special versions of filesystem tools that may need to be substituted for customary ones to get a full picture. e.g. for freespace checking:
Your root file system has inadequate space, and /var has only a tiny amount. Your only solution is to remove some installed apps or to expand the file system to a reasonable size. Most recommendations are for 20G or more for the main file system when doing an install. With todays standard it is also often recommended that /var not be separated from /, but that depends upon your usage. It has always been a standard that /var have adequate space since that is the one that grows over time and the original reason for separating it from / was to prevent a hard system crash when the growth of /var filled up the / file system.
Seeing /etc as an overlay implies you may be using one of the immutable OS & file systems similar to fedora silverblue or kinoite. If that is the case there are more things you need to manage as you fix this.
In any case, I recommend you expand all of /dev/nvme0n[468] since those 3 are the ones that are full or very close.
Last edited by computersavvy; 10-26-2022 at 09:55 AM.
If you are using LVM = Logical Volume Management, which these days is the default, then "running out of space" is usually a thing of the past and in any case it is easy to fix without downtime. LVM separates the "physical" storage situation, which it refers to as storage pools, from the "logical [volume ...]" picture that is seen by the operating system. You can add storage, reallocate it, deal with "devices that are starting to make ominous clicking noises," and much more, generally without downtime. It's simple, it's solid, it's well thought out, and most of all it works.
If you are not yet using LVM, I strongly encourage you to switch your system to it. "Much better, thanks!"
Last edited by sundialsvcs; 10-26-2022 at 10:58 AM.
Just as a matter of perspective the Steam Deck is a hand held game computer that runs Steam OS. It can be connected to a regular monitor which I assume is how the OP is posting the desired information. From a bit of searching and as computersavvy conjectured it does use an immutable OS and filesystems.
The underlying question is not that /etc is full but why? I don't play games and probably do not have all that much stuff loaded and my servers are just for storing data but my /etc is only 32M. It just so happens to match this bloggers Steam Deck system too.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.