| [SOLVED] i think i just screwed up big-time my root partition is too small (251M), and keeps filling up. this results in 'no space left on device' messages whenever i try to update or upgrade.
i'm on a powerpc system, and have not been able to find a compatible version of parted or other partition software to resize it.
as a temporary solution, it was suggested that i delete some of the largest files from the root partition.
as recommended, i ran
du -x | sort -nr > DUs
to make a file called DUs containing the largest files in the root partition, so i could look at what to delete.
i found that ./lib/modules contained a lot of stuff, and decided to delete some of that.
i deleted about 50Mbs, and ran apt-get update and dist-upgrade. i still got messages saying there was no space left on device.
so i needed to delete more. i didn't take the chance on deleting ./boot, since i figured it would probably contain something important.
(i have no idea what the difference is between the actual /boot, /lib, /etc and so on folders and their dotted counterparts: ./boot, ./lib, ./etc and so on.)
here's what happened:
first i looked at what i could delete:
mac:/# more DUs
121898 .
90046 ./boot
8779 ./lib
6085 ./etc
5196 ./root
4358 ./root/.thumbnails
4323 ./bin
4269 ./root/.thumbnails/normal
3853 ./lib64
3575 ./sbin
1129 ./lib/iptables
978 ./etc/htdig
460 ./lib/security
449 ./etc/X11
439 ./etc/texmf
386 ./etc/kde3
342 ./etc/ssl
329 ./etc/ssl/certs
298 ./root/.vlc
297 ./root/.vlc/cache
252 ./etc/init.d
244 ./etc/udev
240 ./root/.kde
236 ./root/.kde/share
196 ./etc/X11/app-defaults
166 ./etc/exim4
155 ./lib/udev
153 ./root/.mcop
151 ./root/.mcop/trader-cache
136 ./etc/X11/xkb
134 ./etc/ssh
124 ./etc/apache2
122 ./root/.kde/share/config
120 ./etc/hotplug
118 ./etc/hotplug/usb
118 ./etc/defoma
112 ./etc/sane.d
108 ./root/.kde/share/apps
104 ./etc/udev/rules.d
102 ./etc/defoma/hints
102 ./etc/apache2/mods-available
99 ./etc/texmf/dvipdfm
95 ./etc/texmf/metafont
95 ./etc/php5
94 ./etc/texmf/metafont/misc
90 ./etc/exim4/conf.d
88 ./root/.thumbnails/large
81 ./lib/terminfo
74 ./etc/fonts
67 ./etc/X11/fonts
60 ./etc/postfix
58 ./etc/fonts/conf.avail
49 ./root/.kde/share/apps/konqsidebartng
49 ./etc/X11/fonts/Type1
49 ./etc/texmf/dvips
49 ./etc/gimp
48 ./root/.kde/share/apps/konqsidebartng/filemanagement
48 ./etc/gimp/2.0
48 ./etc/bash_completion.d
47 ./root/.kde/share/apps/konqsidebartng/filemanagement/entries
47 ./etc/texmf/tex
47 ./etc/texmf/dvips/config
46 ./etc/php5/cli
46 ./etc/php5/cgi
44 ./etc/sound
43 ./etc/texmf/tex/latex
this is what was inside the ./lib folder:
mac:/# ls ./lib
alsa libext2fs.so.2 libpopt.so.0.0.0
cpp libext2fs.so.2.4 libproc-3.2.7.so
firmware libgcc_s.so.1 libpthread-2.7.so
init libhistory.so.5 libpthread.so.0
iptables libhistory.so.5.2 libreadline.so.5
klibc-HSJGORevJnSP5uN4nO0c0so8H2Q.so libiw.so.29 libreadline.so.5.2
ld-2.7.so libkeyutils-1.2.so libresolv-2.7.so
ld.so.1 libkeyutils.so.1 libresolv.so.2
libacl.so.1 libm-2.7.so librt-2.7.so
libacl.so.1.1.0 libmemusage.so librt.so.1
libanl-2.7.so libm.so.6 libSegFault.so
libanl.so.1 libncurses.so.5 libselinux.so.1
libattr.so.1 libncurses.so.5.6 libsepol.so.1
libattr.so.1.1.0 libncursesw.so.5 libslang.so.2
libblkid.so.1 libncursesw.so.5.6 libslang.so.2.1.3
libblkid.so.1.0 libnsl-2.7.so libss.so.2
libBrokenLocale-2.7.so libnsl.so.1 libss.so.2.0
libBrokenLocale.so.1 libnss_compat-2.7.so libsysfs.so.2
libbz2.so.1 libnss_compat.so.2 libsysfs.so.2.0.1
libbz2.so.1.0 libnss_dns-2.7.so libthread_db-1.0.so
libbz2.so.1.0.4 libnss_dns.so.2 libthread_db.so.1
libc-2.7.so libnss_files-2.7.so libtic.so.5
libcap.so.1 libnss_files.so.2 libtic.so.5.6
libcap.so.1.10 libnss_hesiod-2.7.so libticw.so.5
libcfont.so.0 libnss_hesiod.so.2 libticw.so.5.6
libcfont.so.0.0.0 libnss_mdns4_minimal.so.2 libusb-0.1.so.4
libcidn-2.7.so libnss_mdns4.so.2 libusb-0.1.so.4.4.4
libcidn.so.1 libnss_mdns6_minimal.so.2 libutil-2.7.so
libcom_err.so.2 libnss_mdns6.so.2 libutil.so.1
libcom_err.so.2.1 libnss_mdns_minimal.so.2 libuuid.so.1
libconsole.so.0 libnss_mdns.so.2 libuuid.so.1.2
libconsole.so.0.0.0 libnss_nis-2.7.so libvolume_id.so.0
libcrypt-2.7.so libnss_nisplus-2.7.so libvolume_id.so.0.79.0
libcrypt.so.1 libnss_nisplus.so.2 libwrap.so.0
libc.so.6 libnss_nis.so.2 libwrap.so.0.7.6
libctutils.so.0 libpamc.so.0 linux-sound-base
libctutils.so.0.0.0 libpamc.so.0.81.0 lsb
libdevmapper.so.1.02 libpam_misc.so.0 oss-compat
libdevmapper.so.1.02.1 libpam_misc.so.0.81.2 powerpc-linux-gnu
libdl-2.7.so libpam.so.0 security
libdl.so.2 libpam.so.0.81.6 terminfo
libe2p.so.2 libpcprofile.so udev
libe2p.so.2.3 libpopt.so.0
then i decided to delete the entire contents of the ./lib folder, without making a backup of it first. clever, eh?
mac:/# rm -R ./lib/*
rm: cannot remove directory `./lib/init/rw': Device or resource busy
this made some rather essential commands stop working. i had some tense moments before i established that not everything was gone:
mac:/# ls ./lib
bash: /bin/ls: No such file or directory
mac:/# df -h
bash: /bin/df: No such file or directory
mac:/# echo *
bin boot cdrom dev DUs etc home -i initrd lib lib64 lost+found media mnt opt proc root sbin src srv sys tmp usr var
then i checked to see if i could find the ls command in /bin:
mac:/# cd bin/
mac:/bin# echo *
bash bunzip2 busybox bzcat bzcmp bzdiff bzegrep bzexe bzfgrep bzgrep bzip2 bzip2recover bzless bzmore cat chgrp chmod chown cp cpio date dd df dir dmesg dnsdomainname echo ed egrep false fgconsole fgrep fuser grep gunzip gzexe gzip hostname kill ln loadkeys login ls lsmod mkdir mknod mktemp more mount mountpoint mt mt-gnu mv nano nc nc.traditional netcat netstat pidof ping ping6 ps pwd rbash readlink rm rmdir rnano run-parts sed sh sleep stty su sync tailf tar tempfile touch true umount uname uncompress vdir which zcat zcmp zdiff zegrep zfgrep zforce zgrep zless zmore znew
as you can see, ls is still in /bin, but has stopped working. i tried to install it again, to see if that would work.
mac:/bin# aptitude install ls
bash: /usr/bin/aptitude: No such file or directory
mac:/bin# apt-get install ls
bash: /usr/bin/apt-get: No such file or directory
so it seems my system is ****ed, until i can refill my ./lib folder with stuff my system obviously needs to function.
any ideas on where i can get hold of such contents? |