LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-13-2020, 09:10 PM   #1
burning
Member
 
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 172

Rep: Reputation: Disabled
Mistakenly filled up 100% of /dev/root, can no longer start xsession as non-root user


I was installing packages from SBo when it said that I ran out of space halfway through. Running df, it said that 100% of my /dev/root has been used up. So i tried removing some of the packages I just installed but apparently that didn't bring it down by even 1% which is strange.

For some reason, I can start an x session as root but whenever I try to startx as a non-root user, it says it doesn't have enough space to make a log file;

Code:
usr/bin/startx: line 188: cannot create temp file for here-document: No space left on device
usr/bin/startx: line 205: cannot create temp file for here-document: No space left on device
usr/bin/startx: line 205: cannot create temp file for here-document: No space left on device
then later down the screen it reports:
Code:
The XKEYBOARD keymap compiler (xkbcomp) reports"
> Internal error:  Could not resolve keysym XF86FullScreen
> Error:           Cannot close "/tmp/server-0.xkm" properly  enough space?)
>                  Output file "/tmp/server-0.xkm" removed
Errors from xkbcomp are not fatal to the X server
XKB: Failed to compile keymap
Keyboard intitialization failed. This could be a missing or incorrect setup of xkeyboard (EE)
Fatal server error:
(EE) Failed to activate virtual core keyboard: 2(EE)
(EE)
 
Old 07-13-2020, 09:25 PM   #2
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware, Proxmox, Debian, CentOS
Posts: 1,637

Rep: Reputation: 971Reputation: 971Reputation: 971Reputation: 971Reputation: 971Reputation: 971Reputation: 971Reputation: 971
Boot to console (init 3). Log in. Purge /tmp.
 
4 members found this post helpful.
Old 07-13-2020, 11:24 PM   #3
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 7,240

Rep: Reputation: 4932Reputation: 4932Reputation: 4932Reputation: 4932Reputation: 4932Reputation: 4932Reputation: 4932Reputation: 4932Reputation: 4932Reputation: 4932Reputation: 4932
You can check what space is being used by the following command. Then you can go into each folder that is large and check those folders too.

Code:
sudo du -hxd 1 / | sort -h
du is to show your disk usage. -h make the output human readable (using KB, MB, GB, etc). -x will keep it within the same partition (if you have other partitions mounted, it won't go into those). -d 1 will only show the folders within the directory you're specifying. The sort -h will sort things top to bottom using human readable formats.

If you look at my example, you can see that /var/, /usr/, and /tmp/ use a lot of space. /usr/ is pretty normal to take a lot of space, but /var/ and /tmp/ are usually filled with things that can be removed to clear up space. My /tmp/ has a TON of directories, so var is easier to look at. You can use these commands to narrow down and find what is taking up your space and potentially remove it.

Code:
jbhansen@craven-moorhead:~$ sudo du -hxd 1 / | sort -h
4.0K    /srv
12K     /share
16K     /lost+found
44K     /mnt
64K     /media
13M     /bin
21M     /lib64
23M     /sbin
77M     /etc
308M    /boot
3.5G    /opt
4.6G    /lib
7.0G    /root
31G     /var
67G     /usr
120G    /tmp
232G    /
jbhansen@craven-moorhead:~$ sudo du -hxd 1 /var | sort -h
4.0K    /var/data
4.0K    /var/empty
16K     /var/netatalk
16K     /var/state
24K     /var/lock
24K     /var/named
32K     /var/yp
40K     /var/db
44K     /var/man
212K    /var/run
3.3M    /var/spool
12M     /var/www
432M    /var/tmp
796M    /var/log
3.0G    /var/lib
6.7G    /var/cache
20G     /var/slapt-get
31G     /var
Many people have /tmp/SBo taking up a lot of space. I'd start with removing that.
 
2 members found this post helpful.
Old 07-14-2020, 05:13 AM   #4
burning
Member
 
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 172

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bassmadrigal View Post
You can check what space is being used by the following command. Then you can go into each folder that is large and check those folders too.

Many people have /tmp/SBo taking up a lot of space. I'd start with removing that.
Looks like /tmp was the main cause of the problem, purging it brought it straight down to 84%.

Output of df:
Code:
Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/root       20511356 16258148   3188248  84% /
devtmpfs         1540744        0   1540744   0% /dev
tmpfs              32768     1200     31568   4% /run
tmpfs            1541280    28032   1513248   2% /dev/shm
cgroup_root         8192        0      8192   0% /sys/fs/cgroup
/dev/sda1         487652    46094    411862  11% /boot
/dev/sda6      103081248 42650972  55171012  44% /home
none              102400        0    102400   0% /run/user/0
none              102400        4    102396   1% /run/user/1000
output of du -hxd 1 | sort -h :
Code:
4.0K   ./srv
16K   ./lost+found
20K   ./tmp
44K   ./mnt
64K   ./media
15M   ./bin
29M   ./sbin
35M   ./etc
77M   ./opt
89M   ./root
893M  ./lib
1.9G  ./var
13G   ./usr
16G   .
Output of du -hxd 1 /var | sort -h :
Code:
4.0K	/var/empty
12K	/var/kerberos
16K	/var/netatalk
20K	/var/state
24K	/var/named
32K	/var/lock
32K	/var/yp
36K	/var/db
48K	/var/man
232K	/var/spool
11M	/var/www
50M	/var/log
175M	/var/tmp
349M	/var/lib
1.3G	/var/cache
1.9G	/var
Output of du -hxd 1 /usr | sort -h :
Code:
4.0K	/usr/X11R6
12K	/usr/i586-slackware-linux
140K	/usr/local
1.8M	/usr/games
20M	/usr/info
68M	/usr/sbin
102M	/usr/man
390M	/usr/libexec
526M	/usr/include
1016M	/usr/bin
1.1G	/usr/src
1.4G	/usr/doc
4.1G	/usr/lib
4.1G	/usr/share
13G	/usr
Thanks, I think it was just /var taking up space. I thought I could have as much disk space as I do for /dev/root, I figured all the software I downloaded would've been in my home partition but I set up the partition scheme before I realized how the LFS works.
How can I increase my root partition size while decreasing my home partition by a few Gb each so I can have more room for future packages?
 
Old 07-14-2020, 05:40 AM   #5
kgha
Member
 
Registered: May 2018
Location: Sweden
Distribution: Slackware 64 -current multilib from AlienBob's LiveSlak MATE
Posts: 319

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by burning View Post
How can I increase my root partition size while decreasing my home partition by a few Gb each so I can have more room for future packages?
As I wrote in your other thread, GParted will do that for you. Shrink your /home partition, move swap partition and resize / so that it fills the available space created. You will get a warning that resizing the boot partition may break your install, but in practice it should work out fine, I've done this more than once without any issues (I suspect shrinking the boot partition can be more risky).
 
1 members found this post helpful.
Old 07-14-2020, 04:17 PM   #6
burning
Member
 
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 172

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by kgha View Post
As I wrote in your other thread, GParted will do that for you. Shrink your /home partition, move swap partition and resize / so that it fills the available space created. You will get a warning that resizing the boot partition may break your install, but in practice it should work out fine, I've done this more than once without any issues (I suspect shrinking the boot partition can be more risky).
Thanks! Though would I even need to mess with my boot partition? /dev/sda1 is my boot. sda5 is my root. If I shrink sda6 and resize sda5, I don't see how that'd effect sda1, my boot partition? Or does that have to do with moving my swap partition? Actually, what's the reasoning behind moving the swap partition (sda2) at all?
 
Old 07-14-2020, 06:36 PM   #7
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 7,240

Rep: Reputation: 4932Reputation: 4932Reputation: 4932Reputation: 4932Reputation: 4932Reputation: 4932Reputation: 4932Reputation: 4932Reputation: 4932Reputation: 4932Reputation: 4932
Quote:
Originally Posted by burning View Post
Thanks! Though would I even need to mess with my boot partition? /dev/sda1 is my boot. sda5 is my root. If I shrink sda6 and resize sda5, I don't see how that'd effect sda1, my boot partition? Or does that have to do with moving my swap partition? Actually, what's the reasoning behind moving the swap partition (sda2) at all?
Many people have /boot/ on their root partition. If it is a separate partition and you're not touching it, you'll likely not even see that warning.
 
1 members found this post helpful.
Old 07-15-2020, 01:56 PM   #8
burning
Member
 
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 172

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bassmadrigal View Post
Many people have /boot/ on their root partition. If it is a separate partition and you're not touching it, you'll likely not even see that warning.
Thanks.

IIRC the reason I made a separate boot partition was because I plan to at some point in future dual boot, adding a 2nd OS to my computer.
 
Old 07-15-2020, 02:09 PM   #9
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 2,939

Rep: Reputation: 3001Reputation: 3001Reputation: 3001Reputation: 3001Reputation: 3001Reputation: 3001Reputation: 3001Reputation: 3001Reputation: 3001Reputation: 3001Reputation: 3001
Quote:
Originally Posted by burning View Post
Thanks.

IIRC the reason I made a separate boot partition was because I plan to at some point in future dual boot, adding a 2nd OS to my computer.
It is possible to multi-boot even with "/boot" on the "/" (root) partition but UEFI type booting does require a separate "/boot" partition linked via "/etc/fstab" as you have it so it's by no means a bad idea to get used to it now.
 
1 members found this post helpful.
Old 07-15-2020, 03:19 PM   #10
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1.2 on Lenovo Thinkpad W520
Posts: 9,431

Rep: Reputation: Disabled
Quote:
Originally Posted by enorbet View Post
It is possible to multi-boot even with "/boot" on the "/" (root) partition but UEFI type booting does require a separate "/boot" partition linked via "/etc/fstab" as you have it so it's by no means a bad idea to get used to it now.
UEFI needs a separate partition of type EFI, not a separate /boot partition. In Slackware the EFI partition is mounted on /boot/efi but this is just a choice and /boot can be just a directory of the root partition, not a partition by itself. Actually the EFI partition needs to be mounted only when writing a file in it like an OS loader, and then it could be mounted manually on /mnt when needed, and not be listed in "/etc/fstab".

Last edited by Didier Spaier; 07-15-2020 at 03:23 PM.
 
Old 07-15-2020, 03:31 PM   #11
burning
Member
 
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 172

Original Poster
Rep: Reputation: Disabled
One thing I don't understand though; How come I could login as a root user and start an Xsession then? How come it only didn't have enough memory when trying to start an Xsession as a non-root user? Do root sessions not keep logs or something?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
"/" filesystem 100% filled mackowiakp Linux - Software 11 10-01-2019 09:06 AM
I mistakenly deleted my syslog file!! How can I ask Ubuntu to return and write to it? kobygold Linux - Newbie 18 12-24-2015 05:50 PM
[SOLVED] what are files .xsession-errors and .xsession-errors.old can they be deleted? cliffm Linux - Newbie 2 10-20-2012 11:30 AM
.xsession-errors filled my root partition now i cant boot suse10.0 64bit ianio Linux - Hardware 1 03-23-2006 04:40 AM
xsession-errors / I can no longer log in Cinematography Ubuntu 2 06-12-2005 12:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:24 PM.

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