LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   (kernel) update(s) failing - swap space? (https://www.linuxquestions.org/questions/linux-newbie-8/kernel-update-s-failing-swap-space-924818/)

Glaedr 01-20-2012 10:28 AM

(kernel) update(s) failing - swap space?
 
For a couple of days now my automatic security updates have been failing. So today, I tried updating through Yast, and got an error which said that a further 119mb were needed to install a particular update. I Googled the error and saw that it might be a CPU issue. I didn't have very much running - just Firefox and the file indexing thing that starts automatically when my laptop is booted. But I closed those just in case and retried. It didn't make any difference.

So I tried installing the other updates on their own to make sure it was that particular package that was causing the problem and it wasn't just a general error. Twice I got a message about rebooting / logging in again - which I did. But all of the same updates were still listed. So I Googled the problem again and found out how to update through Zypper.

This time, several packages were upgraded. But when it got to the kernel update again, it gave me a similar error to the one shown in Yast:

Installing: kernel-pae-2.6.37.6-0.11.1 [error]
Installation of kernel-pae-2.6.37.6-0.11.1 failed:
(with --nodeps --force) Error: Subprocess failed. Error: RPM failed: installing package kernel-pae-2.6.37.6-0.11.1.i586 needs 119MB on the / filesystem

I tried rpmdb --rebuilddb and then ran zypper update again. But no luck. I don't have anything else running - other than Firefox, just to post this. One page spoke about swap space possibly having to be expanded, but I can't find anything that specifies how to do this.

I use OpenSuse 11.4 and KDE. Can anyone please tell me how to do it, or suggest anything else to try?

Thanks in advance.

amani 01-20-2012 12:39 PM

Do you have enough diskspace for / ?

snowday 01-20-2012 01:08 PM

Disk space and RAM/swap are separate resources. The page you read is not relevant to your problem. You need to free up disk space by deleting files, emptying the trash, etc. (Or get a bigger hard drive I suppose.)

Glaedr 01-20-2012 02:25 PM

My diskspace is fine. I have almost 200GB free. Which is why I thought it must be referring to RAM. Sigh. :( The other updates added up to about 350MB too and they installed fine when Zypper got to them first.

suicidaleggroll 01-20-2012 02:36 PM

Could you post the output of "df -h"?

Glaedr 01-20-2012 02:41 PM

Filesystem Size Used Avail Use% Mounted on
rootfs 20G 19G 0 100% /
devtmpfs 988M 196K 988M 1% /dev
tmpfs 994M 184K 994M 1% /dev/shm
/dev/sda2 20G 19G 0 100% /
/dev/sda3 272G 77G 194G 29% /home


Do kernel updates install to rootfs or sda2? :(

snowday 01-20-2012 02:41 PM

You can use a Live CD and the Gparted partition editor to shrink /home and grow / (but make a backup first!!!).

Alternately you can delete some stuff in / that you don't need, like log files or package manager cache.

Are you comfortable with either of those ideas?

suicidaleggroll 01-20-2012 02:44 PM

Quote:

Originally Posted by Glaedr (Post 4580088)
My diskspace is fine. I have almost 200GB free.

Not in / you don't

Quote:

Originally Posted by Glaedr
/dev/sda2 20G 19G 0 100% /

You need to free up disk space

Glaedr 01-20-2012 02:53 PM

I'm sorry, I'm new to this and I'm a little confused. The error first came up before the other updates installed, and combined they were larger than this kernel update. Also, all my documents etc. are on the partition that does have almost 200GB of space. How do I get into the other files to make space, and how do I know what I can safely delete?

Edit:
Sorry, missed the first reply first time around. Is it really necessary to use a Livecd to edit partitions? I don't mind deleting things as long as I know what I'm safely able to delete.

snowday 01-20-2012 03:01 PM

You cannot resize a partition in use, just like you cannot change the tires while you are driving. :) So, you must use a Linux Live CD or USB with the Gparted partition editor (available in most distros). Do you still have the CD/USB you used to install Linux? If not, do you have a blank CD or spare USB thumb drive?

As to which files are safe to delete, I am not an OpenSUSE user, I don't want to give you bad advice, hopefully another member can assist you with that.

Glaedr 01-20-2012 03:08 PM

I do have a couple of Live CDs somewhere, including the OpenSuse CD I originally made. I was just hoping to get it fixed tonight and I have a file uploading for a friend. :p

Thanks for your help. :)

suicidaleggroll 01-20-2012 03:10 PM

I have OpenSUSE 11.4 on my home machine. I'm not sure what all you have installed to eat up that much space, my / partition is only using 6.7GB.

This command will take a while to run, but it will narrow down which directories are taking all of your disk space. You'll have to run it as root:
Code:

du -sh /*
Here is the output on my machine:
Code:

craig:/ # du -sh /*
8.6M    /bin
24M    /boot
224K    /dev
33M    /etc
819G    /home
168M    /lib
26M    /lib64
16K    /lost+found
8.0K    /media
8.0K    /mnt
110M    /opt
0      /proc
1.8M    /root
14M    /sbin
4.0K    /selinux
1.4M    /srv
0      /sys
0      /tmp
5.8G    /usr
328M    /var


Glaedr 01-20-2012 03:23 PM

Mine says:

9.5M /bin
70M /boot
380K /dev
50M /etc
77G /home
365M /lib
16K /lost+found
8.0K /media
4.0K /mnt
375M /opt
du: cannot access `/proc/13459/task/13459/fd/4': No such file or directory
du: cannot access `/proc/13459/task/13459/fdinfo/4': No such file or directory
du: cannot access `/proc/13459/fd/4': No such file or directory
du: cannot access `/proc/13459/fdinfo/4': No such file or directory
0 /proc
807M /root
13M /sbin
4.0K /selinux
2.6M /srv
0 /sys
670M /tmp
11G /usr
5.6G /var

I ran it as root, so I don't think the cannot access errors are a permissions thing. I don't remember installing anything through Yast/Zypper that was particularly big. I do have Photoshop installed with Wine, but I think Wine applications install on the same paritition as documents etc?

snowday 01-20-2012 03:28 PM

Your /var is a lot bigger than suicidaleggroll's. You can keep working your way down the directory tree with:

Code:

du -sh /var/*

Glaedr 01-20-2012 03:33 PM

That brings up:

175M /var/adm
4.9G /var/cache
4.0K /var/crash
8.0K /var/games
146M /var/lib
28K /var/lock
41M /var/log
0 /var/mail
16K /var/mpi-selector
4.0K /var/opt
284K /var/run
128K /var/spool
364M /var/tmp
4.0K /var/X11R6
12K /var/yp

So the cache needs clearing, I'm guessing. I did the same for /usr and got:

du -sh /usr/*
636M /usr/bin
12K /usr/etc
4.0K /usr/games
16K /usr/i586-suse-linux
207M /usr/include
5.2G /usr/lib
297M /usr/local
57M /usr/sbin
3.8G /usr/share
716M /usr/src
0 /usr/tmp
12K /usr/X11R6

Can I access these files through Dolphin/Konqueror?

suicidaleggroll 01-20-2012 03:37 PM

Your /var/cache is very large, here's my /var/


Code:

craig:~ # du -sh /var/*
4.0K    /var/X11R6
65M    /var/adm
107M    /var/cache
4.0K    /var/crash
4.0K    /var/db
8.0K    /var/games
98M    /var/lib
32K    /var/lock
37M    /var/log
0      /var/mail
16K    /var/mpi-selector
4.0K    /var/opt
212K    /var/run
1.6M    /var/spool
21M    /var/tmp
12K    /var/yp

If you trace that 4.x GB usage through /var/cache you should be able to figure out which service is responsible for it, then tell it to clean up the cache (eg: "zypper clean"). Once cleaned up, a lot of applications will let you change the cache location. If whoever is responsible lets you change the cache directory, I would move it somewhere in /home/ to get it onto the 300GB partition so you don't run into this in the future.

snowday 01-20-2012 03:40 PM

Quote:

Originally Posted by Glaedr (Post 4580151)
Can I access these files through Dolphin/Konqueror?

I do not advise that.

Deleteing system files (basically anything outside your /home) is not necessary under normal circumstances. Especially if you are not 100% sure what the file does and what the full implications will be. :)

Rather, I'm hoping you can drill down another level:

Code:

du -sh /var/cache/*
for more information.

I have a hunch you have a large cache of software packages. Hopefully an OpenSUSE user can explain how to clear these properly using the package manager. :)

If you want to free up some space in /usr, the way to do this is by uninstalling applications you don't need. However you will get a much better effort/reward ratio by clearing out your /var/cache first. :)

ps After you clean your zypper cache you will probably need to start your interrupted upgrade from the beginning again, hopefully you don't have a bandwidth cap or slow connection?

Glaedr 01-20-2012 03:46 PM

I've ended up with:

4.9G /var/cache/zypp

and

linux-p9bp:/home/laura # du -sh /var/cache/zypp/packages/*
119M /var/cache/zypp/packages/devel:languages:perl
36K /var/cache/zypp/packages/dvd
676M /var/cache/zypp/packages/Education
4.0K /var/cache/zypp/packages/InstallationImage
153M /var/cache/zypp/packages/KDE:Extra
1.2G /var/cache/zypp/packages/KDE:Unstable:SC
8.0K /var/cache/zypp/packages/libdvdcss repository
8.0K /var/cache/zypp/packages/multimedia:musescore
20K /var/cache/zypp/packages/openSUSE-11.4-11.4-0
12K /var/cache/zypp/packages/openSUSE:Factory:Contrib
36K /var/cache/zypp/packages/packman
1.1G /var/cache/zypp/packages/Packman Repository
4.0K /var/cache/zypp/packages/PK_TMP_DIR
8.4M /var/cache/zypp/packages/repo-non-oss
880M /var/cache/zypp/packages/repo-oss
735M /var/cache/zypp/packages/Updates-for-openSUSE-11.4-11.4-0

So it looks like it, yes. Odd, I didn't think I had very much installed. I'll have a dig through and see what I can get rid of. I still don't understand why the other updates went through too when they were larger.

snowday 01-20-2012 03:55 PM

Just dump the cache (I think maybe "zypper clean") and you will free 4.9gb instantly. These files are no longer necessary. :)

suicidaleggroll 01-20-2012 03:56 PM

Try running "zypper clean" as root, and then check the size of /var/cache/zypp again.

edit: too slow...

edit2: Once you clean it up, you can modify /etc/zypp/zypp.conf to move the cache directory onto your /home/ partition so it doesn't fill up "/" again.

Glaedr 01-20-2012 06:59 PM

Cache cleared, and updates completed. When I get some free time I'll also get rid of some unused packages. Thanks everyone! :)


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