Files System Problem

Asked by stephenopolus

I have an old Dell Laptop with 0.5 GB RAM and 40GB HD. The HD has 4 bad sectors.
I installed from the live CD where I chose to do a manual file system set up.
I allocated three partitions this way:

/ 2.5GB JFS
Swap Space 2.0GB default swap
/Home 36.0GB JFS

Ran fine until I tried to update. Gave me a low disk space error. Then I tried to install Adobe Acrobat Reader and now it indicates the File System Root is full.

Ran disk usage analyzer. It indicated:
/ 100% 2.3GB 19 items
    usr 75.5% 1.7GB 8 items
    var 14.0% 329.2MB 12 items
    lib 5.6% 132.7 MB 110 items
    home 2.9% 67.1MB 1 item
    boot 0.8% 18.8MB 9 items
    etc 0.3% 6.6MB 222items
    sbin 0.4% 8.9MB 144 items
    bin 0.3% 6.6MB 112 items
    dev 0.0% 460,0KB 17 items
    tmp 0.0% 68.0KB 10 items
    media 0.0% 0 bytes 1 item

Everything else is empty.

I booted today and this happened:

"Error Software Index is broken Use Synaptic or run Sudo apt-get install -f"

Synaptic would not run. So, instead I tried to install gparted and received this error:

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

Did this:

sudo dpkg --configure -a
Processing triggers for shared-mime-info ...
Unknown media type in type 'all/all'

Unknown media type in type 'all/allfiles'

Unknown media type in type 'uri/mms'

Unknown media type in type 'uri/mmst'

Unknown media type in type 'uri/mmsu'

Unknown media type in type 'uri/pnm'

Unknown media type in type 'uri/rtspt'

Unknown media type in type 'uri/rtspu'

Unknown media type in type 'fonts/package'

Unknown media type in type 'interface/x-winamp-skin'

Processing triggers for man-db ...
Setting up libiodbc2 (3.52.6-4) ...
Processing triggers for hicolor-icon-theme ...
Setting up libgif4 (4.1.6-9) ...
Setting up libstreams0 (0.7.2-1) ...
Setting up docbook-xsl-doc-html (1.75.2-1) ...
Setting up hal-info (20091130-1) ...
Processing triggers for doc-base ...
Processing 31 changed 1 added doc-base file(s)...
Registering documents with scrollkeeper...
Setting up icoutils (0.29.1-0ubuntu1) ...
Setting up libqtcore4 (4:4.7.0-0ubuntu4.2) ...
Setting up libthreadweaver4 (4:4.5.1-0ubuntu8) ...
Setting up libmodplug1 (1:0.8.8.1-1ubuntu1) ...
Setting up libmpcdec6 (2:0.1~r459-1) ...
Setting up docbook-xsl (1.75.2+dfsg-5) ...
Setting up libhal1 (0.5.14-0ubuntu6) ...
Setting up libmng1 (1.0.10-1) ...
Setting up kdebase-runtime-data (4:4.5.1-0ubuntu3.1) ...
Setting up libaudio2 (1.9.2-3) ...
Setting up libssh-4 (0.4.5-1) ...
Setting up kdelibs5-data (4:4.5.1-0ubuntu8) ...
Setting up libxine1-bin (1.1.18.1-4ubuntu4) ...
Setting up tsconf (1.0-7build1) ...
Setting up libilmbase6 (1.0.1-3build2) ...
Setting up libclucene0ldbl (0.9.21b-2) ...
Setting up libqt4-xml (4:4.7.0-0ubuntu4.2) ...
Setting up libxcb-shape0 (1.6-1) ...
Setting up libxcb-xv0 (1.6-1) ...
Setting up libqca2 (2.0.2-1ubuntu2) ...
Setting up libxine1-misc-plugins (1.1.18.1-4ubuntu4) ...
Setting up libts-0.0-0 (1.0-7build1) ...
Setting up libhal-storage1 (0.5.14-0ubuntu6) ...
Setting up hal (0.5.14-0ubuntu6) ...
Setting up libdirectfb-1.2-9 (1.2.10.0-4ubuntu2) ...
Setting up libxine1-console (1.1.18.1-4ubuntu4) ...
Setting up libqt4-dbus (4:4.7.0-0ubuntu4.2) ...
Setting up libopenexr6 (1.6.1-4.1) ...
Setting up libstreamanalyzer0 (0.7.2-1) ...
Setting up libxine1-x (1.1.18.1-4ubuntu4) ...
Setting up libqtgui4 (4:4.7.0-0ubuntu4.2) ...
Setting up libqt4-svg (4:4.7.0-0ubuntu4.2) ...
Setting up libqt4-network (4:4.7.0-0ubuntu4.2) ...
Setting up libqt4-script (4:4.7.0-0ubuntu4.2) ...
Setting up libqt4-opengl (4:4.7.0-0ubuntu4.2) ...
Setting up libphonon4 (4:4.7.0really4.4.2-0ubuntu1) ...
Setting up libkdecore5 (4:4.5.1-0ubuntu8) ...
Setting up libxine1 (1.1.18.1-4ubuntu4) ...
Setting up phonon-backend-xine (4:4.7.0really4.4.2-0ubuntu1) ...
Setting up libdbusmenu-qt2 (0.6.4-0ubuntu1) ...
Setting up libpolkit-qt-1-0 (0.95.1-1ubuntu1) ...
Setting up libkdeui5 (4:4.5.1-0ubuntu8) ...
Setting up libkdnssd4 (4:4.5.1-0ubuntu8) ...
Setting up soprano-daemon (2.5.2+dfsg.1-0ubuntu1) ...
Setting up libkjsapi4 (4:4.5.1-0ubuntu8) ...
Setting up libkntlm4 (4:4.5.1-0ubuntu8) ...
Setting up libattica0 (0.1.4-1) ...
Setting up libsolid4 (4:4.5.1-0ubuntu8) ...
Setting up libkpty4 (4:4.5.1-0ubuntu8) ...
Setting up libsoprano4 (2.5.2+dfsg.1-0ubuntu1) ...
Setting up libkrosscore4 (4:4.5.1-0ubuntu8) ...
Setting up phonon (4:4.7.0really4.4.2-0ubuntu1) ...
Setting up libkdesu5 (4:4.5.1-0ubuntu8) ...
Setting up libkjsembed4 (4:4.5.1-0ubuntu8) ...
Setting up libnepomuk4 (4:4.5.1-0ubuntu8) ...
Setting up libkio5 (4:4.5.1-0ubuntu8) ...
Setting up libnepomukquery4a (4:4.5.1-0ubuntu8) ...
Setting up libknotifyconfig4 (4:4.5.1-0ubuntu8) ...
Setting up libknewstuff3-4 (4:4.5.1-0ubuntu8) ...
Setting up libkparts4 (4:4.5.1-0ubuntu8) ...
Setting up libqtwebkit4 (2.0.0-0ubuntu1) ...
Setting up libktexteditor4 (4:4.5.1-0ubuntu8) ...
Setting up libkhtml5 (4:4.5.1-0ubuntu8) ...
Setting up libkfile4 (4:4.5.1-0ubuntu8) ...
Setting up libkdewebkit5 (4:4.5.1-0ubuntu8) ...
Setting up libkmediaplayer4 (4:4.5.1-0ubuntu8) ...
Setting up libkrossui4 (4:4.5.1-0ubuntu8) ...
Setting up libkutils4 (4:4.5.1-0ubuntu8) ...
Setting up libplasma3 (4:4.5.1-0ubuntu8) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

The only thing I can think of is because JFS can't shrink it is not resizing the partitions to acomodate the need. But, I was under the impression that the / partition would not need to change size. That was the reason for placing it on a separate partition.

I am brand new to Linux so I am not sure if I installed correctly or there is something else wrong.

Thanks for your help!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu util-linux Edit question
Assignee:
No assignee Edit question
Solved by:
Ubfan
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

http://ubuntuforums.org/showthread.php?t=941322

I suggest you grab a new drive as the bad sectors will spread

Revision history for this message
stephenopolus (stephenopolus) said :
#2

Thanks for your reply actionparsnip!

I agree the drive will eventually fail.

However, I am just using this laptop for the internet browser right now. I am using another one for everything else. This project goal was to resurect a dead laptop without spending money on it.

The reasons I decided to go with Ubuntu are
1. So I would not have to replace the hardware immediately.
2. It is smaller than Windbloats. (This is key for my next question at the bottom of this message.)
3. The Live CD did an exelent job of allowing me to retrieve data I forgot I had. (Laptop broken for a good while,)
4. Oh, and it's free:-)

Anyway, for a followup question, is there a way to find the bad sectors and "partition" them off from the rest of the drive so they won't get used? I think this might slow down the drive failure, maybe. I know there are some drive tools that will do this but I don't have them yet and I don't know which ones will work with Linux compatible file systems. Anyone know what will do this?

Thanks again for your help.

Revision history for this message
Ubfan (ubfan1) said :
#3

You only gave your root partition (/) 2.5G! That is not enough, as you have discovered. Since the disk may not be usable much longer, Why not just take the default partitioning (a little swap, rest root). I think there is an option to check for bad blocks when installing -- if not, after installation, run fsck with the -c switch. Help on fsck is available with the "man" command (short for manual),so man fsck for help. That -c switch will run the badblocks program.

Revision history for this message
Ubfan (ubfan1) said :
#4

oops that should have been the e2fsck program, which takes -c to run the badblocks check.

Revision history for this message
stephenopolus (stephenopolus) said :
#5

Thanks Ubfan !I'll try that tomorrow!

To answer your questions...

I did a lot of reading in various forums to find out which file system would be best for my situation (1GHtz processor .5 GB ram and old shaky HD). The suggestion I found most often is JFS because it uses less processor time therefore increasing performance.

As for the hd, ext2 would have been the best because it doesn't journal. However, from the critiques I read ext2 was sort of unstable so I went with JFS hoping it would make my system run faster. BTW it is much faster than WindowsXP on NTFS.

As for the partitions a lot of people wrote that 2GB was way too much for the root partition. One person even recommended 256MB for root which I tried but Ubuntu said it needed 2.3GB. So, I thought I was giving it a little extra by giving it 2.5. From what I gathered I needed to put root (/) in a separate partition just to make a re-install easier since it only contains directories for the OS.

So, how big should the file system root be?

I found a lot of variation on schema suggestions but since I only have one drive I could only use a max of 5 partitions. So, I went with the most common and seemingly most straight forward one. A lot of folks recommend 3 partitions. A separate one for /, /Home, and /Swap.

I also found people saying that computers today don't need that much swap because they have lots of ram but since I am limited to 0.5GB I gave my /swap extra. (2GB)

I don't remember seeing an option for checking for bad blocks but I had to try the install about 6 times before I figured out how to get it to work. I am a newb with linux and trying not to be a noob:-)

Thanks again for your help.

P.S. Oh yeah! As for the health of the drive, I am able to use "Disk Utility" to read the SMART data. All the categories are listed either green (Good) or N/A except the one that tells about the 4 sectors. They are not listed under the "Uncorrectable Sector Count" rather under "Current Pending Sector Count". This tells that the sectors are "waiting to be remapped."

I'll let you know how the e2fsck -c command works tomorrow.

Revision history for this message
Best Ubfan (ubfan1) said :
#6

Oh, I think you confused /boot (which may be a small partition) with root (/), which is the rest of the file system. If your system has a really old BIOS, it will not successfully boot a kernel that is not within the first 1024 cylinders, so the trick to ensure the kernel placement was to make a small partition at the beginning of the disk to meet that limit, and mount it at the /boot directory. The separate /home will isolate you from some of the consequences of a system upgrade, but you will still have to deal with upgraded packages storing their old config files in your home directory. I find it better to just accept what the system creates for a user home, then mount a work directory there containing my files. I'n not familiar with JFS, so you might have to check around the man pages for the right checking program. I use ext2 all the time on my flash installs with no problems -- it should work fine on an old disk.

Revision history for this message
stephenopolus (stephenopolus) said :
#7

I had a thought as to what could have gone wrong:

If I use multiple partitions, will the install program automatically place the files, folders, and directories in the proper partition or do I have to do that manually?

The logic behind this question is: If Ubuntu can be burned onto and run from a cd then one part of it should not be filling up a 2GB partition. So, perhaps I installed it incorrectly.

Thanks for your help!

Revision history for this message
stephenopolus (stephenopolus) said :
#8

Oh and I still haven't found how to isolate the 4 bad sectors.

By the way, sorry for what is turning into a 2 pronged help question. If you like I can seperate the bad sector help into another thread :-)

Thanks again

Revision history for this message
Ubfan (ubfan1) said :
#9

If you designate the use of a partition at install time (/, /boot, /var, /usr, etc.) the installation will use it and install files to the partition, and see that it gets mounted at boot time. The installation files on the CD are compressed, and after installation they are uncompressed, so take more room. Also, log files build up, package download directories, temporary directories like /tmp are all part of the filesystem, so take room that is not allocated on the CD. With such a small disk, I'd give / everything except a little swap. If you have lots of little partitions, you will always be filling one up and wishing you had some of the wasted space from another to use. With SMART data available, you should be able to see the disk degradation occur, and you should always be backedup. The 4 sectors are not unreadable, just if they are written to , they will be replaced with others. Check again after the install, and see if they are still being reported. Again, look carefully for any "check for bad blocks" options at the partition setup time.

Revision history for this message
stephenopolus (stephenopolus) said :
#10

So far I have reinstalled three times using the manual partition option and have seen nothing on checking for bad sectors.

Also, the functionality of the partitioning program during install lacks the ability to add partitions inside an extended partition. I tried to use gparted while running the live cd but it would not let me size the "/" partition less than 17 GB. I was trying to use 10gb.

All in all I am beginning to get frustrated.

My goals are simple. Set up Ubuntu in a manner that:

1. Uses the least amount of processor power possible (hence the use of JFS)
2. Minimizes the number of read writes to the disk so it will last longer,
3. Allows me to do a reinstall without loss of configuration files or personal data
4. Allows me to easily clean the garbage left behind from updating and installing programs.
5. Allows me to block off any bad sectors on the aging disk.

From what I have read all over the internet it is possible to do this but I have yet to find the proper combination of tools (or proper command options) to do it with. Due to combination of limitations imposed by gparted and the install program this particular install has been like running through a maze, blindfolded.

Granted if I had a newer laptop this install program seems to work very well but in my case it is frustrating for a "newbie to Linux" person.

Sorry about the rant. You guys have put together what seems to be a very package in the Live CD and the OS in general. I am just getting frustrated at not being able to figure it out quickly. That part makes me feel like a dummy. :-)

Thanks again for all your help!

Revision history for this message
stephenopolus (stephenopolus) said :
#11

<edit last paragraph in message above> "... a very NICE package..."

Revision history for this message
Ubfan (ubfan1) said :
#12

Sorry I cannot offer any help with gparted, I use fdisk myself, but I would think you should be able to delete all partitions, and create 3 primary, an extended , and as many logical partitions as you want with either tool. Then at the install, just assign how the partitions are used (/, /boot, /home, etc.).

Revision history for this message
stephenopolus (stephenopolus) said :
#13

OK. I was wrong about the install prog now giving the ability to add partitions inside an extended partition. It does it automatically when you create logical partitions next to each other. However, you can't re-size them. That may be due to the problem of not being able to shrink jfs.

The problem is, from a newbie point of view it does this without indicating it is doing it. So for someone who has not used this before I had no idea it was working and could not check to see if it was working until I was able to run gparted from the live cd. This meant I had to set up the partitions, install the OS, reboot back into the live cd, start gparted to check my work, then reboot back into the installed OS to see if it was working properly. WOW! One little graphical change to the manual partitioning program inside the install program will fix the problem. Like gparted, just draw a container indicator around the logical partitions so we newbies can see it. Oh, and label it :-)

Cool! I gave useful feedback! Although, it is probably only useful to a minority of users.
<cheesy grin>

Anyway, I still did not see an option for fixing bad sectors in any of the 6 times I tried the install. But it did install and I have been able to download gparted from the Software Center, install and use it.

So, it seems like everything is working. I just hope I guestimated the correct partition sizes :-)

Now to find those questionable sectors and see if I can overwrite them or rope them off.
I'll mark this solved after I figure that out so if anyone has a tip for that, I am using jfs.

Thanks to ubfan for all the help!

Revision history for this message
stephenopolus (stephenopolus) said :
#14

OK I spent A LOT more time on this than I planned.

However, the laptop is running and I am able to use it. WooHoo!

My goal was to try to resurrect it with out spending money on it.
It worked thanks to Ubuntu Live CD and the help I received here. THANKS A BUNCH!

A summary of what I ended up doing is:

Partition Map:
/boot ext4 500MB (turned out to be 400MB too big 100-150MB is plenty for one OS)
swap swap 2GB (0.5GB ram so I left extra room here)
/extended 35GB
    / jfs 10GB
    /home jfs 10GB
    /var jfs 2GB
    /tmp jfs 5GB
    /opt jfs 10GB

I tried to fix it so disk cleanup would be easier but a friend of mine told me it wouldn't matter because I only have one HD. He said if I were on a file server this would be a pretty good set up but it is kind of overkill for a one drive laptop. However, he said he hadn't used Linux for several years and he hadn't used jfs.

As for the 4 oddball sectors, I have yet to find anything that will do the job I want done without paying as much money for the software as I would have for a new drive. So, since they are marked as "Waiting to be addressed" I am going to wait and see what happens when they are overwritten.
I have the luxury of doing that because I am not keeping any important data on this machine.

I do have a problem now with the network connection but I'll start a new thread for that :-)

Revision history for this message
stephenopolus (stephenopolus) said :
#15

Thanks Ubfan, that solved my question.