Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux Hosts
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > Your Distro > Debian Linux Help
Reload this Page [SOLVED] i think i just screwed up big-time
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Debian Linux Help Discussions related to Debian GNU/Linux.

Closed Thread
 
Thread Tools Display Modes
Old 05-31-2008   #1 (permalink)
memius
Just Joined!
 
Join Date: Oct 2006
Posts: 52
[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?
memius is offline  
Old 05-31-2008   #2 (permalink)
memius
Just Joined!
 
Join Date: Oct 2006
Posts: 52
oh, man!

i just realized the . didn't signify a hidden folder, it signified a folder in the same directiroy.

that means i deleted almost all the contenst of the actual /lib folder. ha ha. no wonder i'm in trouble.

any suggestions would be highly appriciated at this point!
memius is offline  
Old 05-31-2008   #3 (permalink)
jledhead
Linux Engineer
 
jledhead's Avatar
 
Join Date: Oct 2004
Location: North Carolina
Posts: 788
reinstall. this will at least also take care of your other problem, reinstall to a larger drive

if you haven't ran
Code:
apt-get clean
then you might be able to do
Code:
dpkg -i /var/cache/apt/archive/*
and cross your fingers
jledhead is offline  
Old 05-31-2008   #4 (permalink)
memius
Just Joined!
 
Join Date: Oct 2006
Posts: 52
that's not really the problem any longer. the problem now is that i have deleted my /lib folder, which means commands such as 'ls', 'df', 'mount', ect. no longer function.

the challenge now is to save all the stuff on my hard disk! reinstalling will not help me there.
memius is offline  
Old 05-31-2008   #5 (permalink)
Jonathan183
Linux Engineer
 
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,409
Can you boot from a live CD and either put all your data on a partition you intend just mounting or better still copy to an external drive or somewhere else safe while you do a fresh install?
Jonathan183 is offline  
Old 05-31-2008   #6 (permalink)
memius
Just Joined!
 
Join Date: Oct 2006
Posts: 52
i tried to mount my usb disk, but 'mount' doesn't work any more.

i also tried moving files to the usb disk through konqueror, but /dev/sda1 (or /dev/sda) won't show up ("doesn't exist"). is there another way to navigate to the usb disk?
memius is offline  
Old 05-31-2008   #7 (permalink)
Jonathan183
Linux Engineer
 
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,409
I really think the best way is boot from a live CD if you can, then you will be able to mount partitions on your internal hard drives and USB drive and copy things over.

Other options I can think of ... login from another machine to your serve and copy data that way or remove the hard drive and put it in another machine as a slave drive and copy data that way.
Jonathan183 is offline  
Old 05-31-2008   #8 (permalink)
memius
Just Joined!
 
Join Date: Oct 2006
Posts: 52
ok, thanks! the live cd option sounds good. i'll try to get hold of one.
memius is offline  
Old 05-31-2008   #9 (permalink)
Jonathan183
Linux Engineer
 
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,409
System rescue or Gentoo install CD should do what you want. System rescue should also have gparted for partition resize if you need it in future. You can get to them from the forum downloads page ... I'm sure there are lots of other CDs as well - but system rescue is probably handy to have anyway
Jonathan183 is offline  
Old 06-01-2008   #10 (permalink)
devils casper
Ghost
 
devils casper's Avatar
 
Join Date: Jun 2006
Location: Chandigarh, INDIA
Posts: 18,098
As we discussed in other thread, PartedMagic or GParted doesn't support PowerPC. I would suggest you to back up data and go for clean install. Allocate 2GB to root partition this time.

Recommended Partition Structure :
Quote:
/ -- 3-5GB
/home -- as much space as you can
SWAP -- 512MB - 1GB
__________________
New Users: Read This First
If you woke up breathing, Congratulations! You get another chance.

devils casper is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 03:15 PM.




© 2000 - 2008 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.0.0