LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 10-25-2022, 08:26 AM   #1
Synchi
LQ Newbie
 
Registered: Oct 2022
Posts: 7

Rep: Reputation: 0
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.

Thanks!
 
Old 10-25-2022, 08:53 AM   #2
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,152
Blog Entries: 6

Rep: Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835
/etc is where global config files are.

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 /.
 
Old 10-25-2022, 08:56 AM   #3
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,680
Blog Entries: 19

Rep: Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492
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.
 
2 members found this post helpful.
Old 10-25-2022, 09:53 AM   #4
Synchi
LQ Newbie
 
Registered: Oct 2022
Posts: 7

Original Poster
Rep: Reputation: 0
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?
 
Old 10-25-2022, 11:16 AM   #5
Synchi
LQ Newbie
 
Registered: Oct 2022
Posts: 7

Original Poster
Rep: Reputation: 0
Was giving it a go, but won't let me unmount or mv /etc because it is busy.
 
Old 10-25-2022, 01:17 PM   #6
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Quote:
Originally Posted by Synchi View Post
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.
 
1 members found this post helpful.
Old 10-25-2022, 01:39 PM   #7
Synchi
LQ Newbie
 
Registered: Oct 2022
Posts: 7

Original Poster
Rep: Reputation: 0
@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.
 
Old 10-25-2022, 05:33 PM   #8
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Did you run 'df -h' as suggested.
If you did then post the output here so we may be able to intelligently answer the latest question.

Also post the output of the other commands suggested in post #2.
 
Old 10-25-2022, 08:29 PM   #9
Synchi
LQ Newbie
 
Registered: Oct 2022
Posts: 7

Original Poster
Rep: Reputation: 0
Code:
(user@synchideck ~)$ lsblk -f
NAME        FSTYPE FSVER LABEL     UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                                    
`-sda1      exfat  1.0   Dexternal 24E9-9787                              17.7G    85% /run/media/deck/Dexternal
sdb                                                                                    
sdc                                                                                    
nvme0n1                                                                                
|-nvme0n1p1 vfat   FAT16 esp       C268-79C8                                           
|-nvme0n1p2 vfat   FAT16 efi       C269-989F                                           
|-nvme0n1p3 vfat   FAT16 efi       C26A-DB71                                           
|-nvme0n1p4 btrfs        rootfs    50709732-d974-4c2d-bcf3-63b8e963f986    899M    77% /
|-nvme0n1p5 btrfs        rootfs    1e90fef8-989d-44bc-b5ae-ceef50e784a7                
|-nvme0n1p6 ext4   1.0   var       14466901-c821-4c76-99d1-45f2426c8291       0    94% /var
|-nvme0n1p7 ext4   1.0   var       84334188-1a21-4e0d-bbba-be464b243b60                
`-nvme0n1p8 ext4   1.0   home      c9a08054-a112-48fd-9d95-0fb433cec104   19.8G    96% /var/tmp
                                                                                       /var/log
                                                                                       /var/lib/systemd/coredump
                                                                                       /var/lib/flatpak
                                                                                       /var/lib/docker
                                                                                       /var/cache/pacman
                                                                                       /srv
                                                                                       /root
                                                                                       /opt
                                                                                       /home





Code:
(user@synchideck ~)$ sudo fdisk -l
Disk /dev/nvme0n1: 476.94 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: KINGSTON OM3PDP3512B-A01                
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 7762ADC2-BC11-934B-BD31-765FA1EE9377

Device            Start        End   Sectors   Size Type
/dev/nvme0n1p1     2048     133119    131072    64M EFI System
/dev/nvme0n1p2   133120     198655     65536    32M Microsoft basic data
/dev/nvme0n1p3   198656     264191     65536    32M Microsoft basic data
/dev/nvme0n1p4   264192   10749951  10485760     5G Linux root (x86-64)
/dev/nvme0n1p5 10749952   21235711  10485760     5G Linux root (x86-64)
/dev/nvme0n1p6 21235712   21759999    524288   256M Linux variable data
/dev/nvme0n1p7 21760000   22284287    524288   256M Linux variable data
/dev/nvme0n1p8 22284288 1000215175 977930888 466.3G Linux home


Disk /dev/sda: 114.61 GiB, 123060879360 bytes, 240353280 sectors
Disk model:  SanDisk 3.2Gen1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x7760d842

Device     Boot Start       End   Sectors   Size Id Type
/dev/sda1          32 240353279 240353248 114.6G  7 HPFS/NTFS/exFAT







Code:
(user@synchideck ~)$ df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        7.3G     0  7.3G   0% /dev
tmpfs           7.3G   97M  7.2G   2% /dev/shm
tmpfs           2.9G   10M  2.9G   1% /run
/dev/nvme0n1p4  5.0G  3.9G  899M  82% /
/dev/nvme0n1p6  230M  216M     0 100% /var
overlay         230M  216M     0 100% /etc
/dev/nvme0n1p8  466G  446G   20G  96% /home
tmpfs           7.3G   84K  7.3G   1% /tmp
tmpfs           1.5G   64K  1.5G   1% /run/user/1000
/dev/sda1       115G   97G   18G  85% /run/media/deck/Dexternal

See output of du -c /etc in attachment.

Thanks
Attached Files
File Type: txt duetc.txt (4.9 KB, 11 views)
 
Old 10-25-2022, 08:31 PM   #10
Synchi
LQ Newbie
 
Registered: Oct 2022
Posts: 7

Original Poster
Rep: Reputation: 0
Ah, and the contents of my fstab just in case:

Code:
# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# SteamOS partitions
#/dev/disk/by-partsets/self/rootfs /       ext4    defaults                0       1
#/dev/disk/by-partsets/self/var    /var    ext4    defaults                0       2
/dev/disk/by-partsets/self/efi    /efi    vfat    defaults,nofail,umask=0077,x-systemd.automount,x-systemd.idle-timeout=1min 0       2
/dev/disk/by-partsets/shared/esp  /esp    vfat    defaults,nofail,umask=0077,x-systemd.automount,x-systemd.idle-timeout=1min 0       2
/dev/disk/by-partsets/shared/home /home   ext4    defaults,nofail,x-systemd.growfs 0       2
 
Old 10-25-2022, 11:55 PM   #11
Debian6to11
Member
 
Registered: Jan 2022
Location: Limassol, Cyprus
Distribution: Debian
Posts: 382
Blog Entries: 1

Rep: Reputation: 71
Quote:
(user@synchideck ~)$ lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
|-nvme0n1p4 btrfs rootfs 50709732-d974-4c2d-bcf3-63b8e963f986 899M 77% /

(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.
 
1 members found this post helpful.
Old 10-26-2022, 01:46 AM   #12
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,877
Blog Entries: 1

Rep: Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078
Quote:
Originally Posted by Synchi View Post
Code:
(user@synchideck ~)$ df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        7.3G     0  7.3G   0% /dev
tmpfs           7.3G   97M  7.2G   2% /dev/shm
tmpfs           2.9G   10M  2.9G   1% /run
/dev/nvme0n1p4  5.0G  3.9G  899M  82% /
/dev/nvme0n1p6  230M  216M     0 100% /var
overlay         230M  216M     0 100% /etc
/dev/nvme0n1p8  466G  446G   20G  96% /home
tmpfs           7.3G   84K  7.3G   1% /tmp
tmpfs           1.5G   64K  1.5G   1% /run/user/1000
/dev/sda1       115G   97G   18G  85% /run/media/deck/Dexternal
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:
Code:
# btrfs filesystem df /
Data, single: total=15.01GiB, used=9.86GiB
System, single: total=32.00MiB, used=16.00KiB
Metadata, single: total=776.00MiB, used=327.34MiB
GlobalReserve, single: total=30.55MiB, used=0.00B
 
1 members found this post helpful.
Old 10-26-2022, 09:51 AM   #13
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Code:
/dev/nvme0n1p4  5.0G  3.9G  899M  82% /
/dev/nvme0n1p6  230M  216M     0 100% /var
overlay         230M  216M     0 100% /etc
Those 3 lines tell it all.

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.
 
Old 10-26-2022, 10:57 AM   #14
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,691
Blog Entries: 4

Rep: Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947
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.
 
Old 10-26-2022, 08:22 PM   #15
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,783

Rep: Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936
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.

https://www.svenknebel.de/posts/2022/5/2/

The computer does have an SD card slot so it is possible to boot another OS.

Last edited by michaelk; 10-26-2022 at 08:42 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Deb-pacman : A Pacman-style Frontend For APT Package Manager LXer Syndicated Linux News 1 12-09-2019 05:21 PM
LXer: My Nerd Life: Too Loud, Too Funny, Too Smart, Too Fat LXer Syndicated Linux News 0 01-24-2014 05:21 AM
Why do we need pacman-key if pacman checks md5? Mr. Alex Arch 5 03-09-2012 05:05 PM
Anyone else 'pacman -Sy' instead of simply 'pacman -S'-ing packages? Kenny_Strawn Arch 15 03-23-2011 01:09 PM
General Partitioning Limits: How full is too full to partition? orangesky Linux - Hardware 1 12-05-2009 06:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration