LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 03-04-2012, 02:29 PM   #1
williepabon
Member
 
Registered: May 2007
Location: Florida, USA
Distribution: Ubuntu
Posts: 96

Rep: Reputation: 0
Tool to verify health of the OS


Is there a tool or a command that I can use to verify that my Linux installation is healthy? I want to know if there is a tool that compares the system files installed in my hard drive with the standard distribution files for my version (that may be located either on a CD or online) to check if there are corrupted, missing or wrong version files, and offers the option to repair and/or replace the files that are at fault. Such a thing exists? Thanks.

PS as of 3/16/2012
This subject has developed to more specific areas. See the following threads for expanded information.


Ubuntu forum:
http://ubuntuforums.org/showthread.php?t=1929190&page=4

Ubuntu Launchpad:
https://answers.launchpad.net/ubuntu...uestion/190306

Last edited by williepabon; 03-16-2012 at 03:23 PM. Reason: New develpments
 
Old 03-04-2012, 03:02 PM   #2
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
This is a rather broad question. There are a lot of tools for checking different things built into the kernel.

What is it you are looking for in particular?
 
Old 03-04-2012, 06:25 PM   #3
williepabon
Member
 
Registered: May 2007
Location: Florida, USA
Distribution: Ubuntu
Posts: 96

Original Poster
Rep: Reputation: 0
Question

Quote:
Originally Posted by widget View Post
This is a rather broad question. There are a lot of tools for checking different things built into the kernel.

What is it you are looking for in particular?
Thanks for answering. Well, I'm looking for something similar to the the Windows XP system file checker, that compares all the system files on the hard drive with the ones used on the original installation disk to check if they are corrupted or of a different version, and automatically corrects the problem. You see, a few weeks ago I increased the memory of my pc (which I think shouldn't have any bearing on this) and after that, the USB ports run very slow. Incidentally, my Ubuntu OS (10.04)is residing on an external drive (USB). So, Ubuntu runs extremely slow. So, I'm looking for a tool that could be able to detect corrupted or damaged drivers (suspect the USB drivers?)and repair or replace those with the correct ones. I don't want to loose my data, configurations and applications, so, I'm exploring all possibilities before re-installing the OS. Thanks.
 
Old 03-04-2012, 07:30 PM   #4
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
File system checks are run every so many boots under most, if not all, Linux distros. The tool used is e2fsck.

File corruption as in MS does not really occure in Linux. Completely different file system and theory for developing it.

To use e2fsck you need to run it from your Live CD as it needs run on an unmounted file system.

You can get information on this tool by running;
Code:
man e2fsck
There is also testdisk, this is a package in your repo. Once again needs run from an install on another drive or a Live Session. You can install things on a live session just goes on your ram and is gone when you reboot. Runs fine as long as your ram is not overloaded.

You should start a different thread for the USB problem.

Drivers, by the way, are not that fragile in Linux either.

Reinstallation is, at times the fastest thing to do. It is, however, rarely needed under Linux. You have unlimited access to your system files. Just about anything can be fixed.

If you are concerned about your ram there is the ram test in your grub menu. Takes a long time but does an excellent job. This is the memtest86 menu entry. I would reboot to it before going to bed and just let it do its thing.

Do not see any real way this can be related to your usb problem but I am certainly not an expert on ram or usb problems.
 
Old 03-04-2012, 09:00 PM   #5
williepabon
Member
 
Registered: May 2007
Location: Florida, USA
Distribution: Ubuntu
Posts: 96

Original Poster
Rep: Reputation: 0
Question

You said:

"There is also testdisk, this is a package in your repo. Once again needs run from an install on another drive or a Live Session. You can install things on a live session just goes on your ram and is gone when you reboot. Runs fine as long as your ram is not overloaded."

Couldn't find it on the repos (Using Software Center).

I know that RAM is not an issue because I checked it with the utility that exists on my Windows system. By the way, If I boot my system with Ubuntu 10.10 or 11.10 I don't have a USB speed problem.

Yes, I started a separate thread for the USB problem, but I haven't received a solution yet. This is the link:

http://www.linuxquestions.org/questi...y-slow-931625/

As I said, if I can solve this without re-installing the OS, I would prefer. I don't have enough experience in Linux to do it without damaging my configurations. This OS (10.04) has been working flawlessly for more than two years, until now. Your help is appreciated.
wp
 
Old 03-04-2012, 11:39 PM   #6
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
Well I think you should probably use a linux utility to check your ram.

Folks that fix MS for a living use Linux tools because they actually work.

Testdisk is in your repo. Use a real package tool and it will be there I am sure. Unless this is something that Ubuntu has removed even from the repo. Testdisk is one of the tools that will actually repair MS boot sectors and put the MS boot loader on the MBR. Don't ask me how as I don't know. Don't allow MS security holes under our roof.

Try apt-get;
Code:
sudo apt-get synaptic
Will give you the best gui for package management that has been made so far.
Code:
sudo apt-get install testdisk
will install the bugger on your install. Or if used from a Live CD will install it on your live session.

And people wonder why I don't use ubuntu anymore. Geeze, I can't imagine.
 
Old 03-05-2012, 08:29 AM   #7
williepabon
Member
 
Registered: May 2007
Location: Florida, USA
Distribution: Ubuntu
Posts: 96

Original Poster
Rep: Reputation: 0
Question

You said:

Quote:
Originally Posted by widget View Post
Well I think you should probably use a linux utility to check your ram.

And people wonder why I don't use ubuntu anymore. Geeze, I can't imagine.
Sorry, maybe this is a dumb question. Do you say I should still check RAM using a Linux utility even though I have no ram or speed problems when I boot up with Ubuntu 10.10 or 11.10?

I found testdisk with synaptic. How do I type the command for it to check the disk that is identified like /dev/sdb ? Thanks.
 
Old 03-05-2012, 10:22 AM   #8
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
Do NOT run testdisk from your install. The drive must be unmounted or serious damage can occure. Use the live CD and install testdisk on it. It will run fine from there.

If you have 11.10 on a different drive (usb stick) from 10.04 then you can run test disk from there safely. Same goes for runing it to check the usb stick from your external. Running it from either of them would be fine for checking your MS which I gather is on a separate internal drive(s).

Testdisk and any other tools are powerful things and misuse of them can do some pretty serious damage.

On the other hand I had a problem caused by letting an installer over write a paritions (self inflicted wound) and used testdisk to recover it. It also listed partitions for recovery that I had over written on purpose at least 3 times. I recovered two of them just to see if it would work. It certainly did. That was a 2 partition install of Ubuntu 9.10-testing (before the release of 9.10) and the bugger booted right up.

Testdisk will through up an terminal type gui application and you can navigate it with the arrow keys to the disk(s) that your want to have it work on.

You should have a look at;
Code:
man testdisk
before running it. You can by going, in your terminal, to File select "open tab". This way you can keep the man page open on one tab and run;
Code:
sudo testdisk
on the other. This might be helpful in figuring out what you are doing.

You stated that this problem showed up after installing ram. While I agree that this is probably coincidental it would be something that I would want to know for sure.
 
Old 03-05-2012, 01:03 PM   #9
williepabon
Member
 
Registered: May 2007
Location: Florida, USA
Distribution: Ubuntu
Posts: 96

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by widget View Post
Do NOT run testdisk from your install. The drive must be unmounted or serious damage can occure. Use the live CD and install testdisk on it. It will run fine from there.

If you have 11.10 on a different drive (usb stick) from 10.04 then you can run test disk from there safely. Same goes for runing it to check the usb stick from your external. Running it from either of them would be fine for checking your MS which I gather is on a separate internal drive(s).

Testdisk and any other tools are powerful things and misuse of them can do some pretty serious damage.


>
You stated that this problem showed up after installing ram. While I agree that this is probably coincidental it would be something that I would want to know for sure.
widget:
I really appreciate you sharing your expertise on this subject, that has been somewhat frustrating for me. I'm kind of hesitant in using tools that in the hands of a novice (like I am) could do serious damage to the data an configurations on the disk. Right now, I'm not absolutely sure that the disk is damaged. When I boot from the hard drive, loading and saving is very slow, well below the USB standards. When the OS performs a disk test at boot up, it doesn't show any warning or problem that something is happening. The disk utility GUI says that the disk is healthy, even when I'm running from the hard drive, but running slow. When I run Ubuntu 10.10 from my memory stick and I have the hard drive also connected to a USB port, Ubuntu 10.10 recognizes it and and shows it healthy and running at full speed, read and writes run like a typical hard drive (see my thread on hardware).

I'm considering another alternative to address this problem, but will appreciate your opinion and advice to do it. Is it possible to re-install the OS without reformatting the disk? I mean, I want to do a re-install without affecting my /home folder. I need to keep everything that I have in that folder. Unfortunately (newbie error), I don't have the /home folder on a separate partition. Is it also possible to keep the applications that I have installed? If anything of what I asked is possible, please advise on how to do it. I have my Ubuntu 10.04.1 live install CD ready for this and, right now I'm performing a full backup of the disk (which is taking awfully long because of the problem).

Thanks again for taking your time to help me out on this.
wp
 
Old 03-05-2012, 02:18 PM   #10
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
I just doubt that this is really a soft ware problem at all. Really sounds like hardware to me.

You say the usb stick works fine but the usb external drive does not. If there was a usb problem software/firmware wise it would effect both.

Have you swapped to 2 around? That would give some indication if it is the external drive/cable or the usb port itself.

Have you tried a different cable? There are a lot of things that can effect these things.

I ran Ubuntu testing from my external. Have not had trouble with speed but I did have trouble getting clean reads for the drive at times. This was always due to poor usb connection.

Sometimes I have problems with my 2 usb CD and DVD drives. No disk detected. Always a cable problem.

Reinstallation and keeping your data is always somewhat risky.

I believe that the 10.04 installer will allow you to install on an existing partition with out formatting. This will overwrite your system files. There is the possibility of loosing your data.

This is not as good as having a separate / partition and formatting it. There is some chance, not much, that some old files may survive.

If you are backing up I would reinstall on 2 partitions and populate the new install with your old data.

I just can't see how this will help you. Is data transmission up to speed if you dump something from the usb stick to the external? How is the data transmission if you access the files on the external from the stick and grab a file? I would think that only if both of those are good there is any credibility to the bad install theory. If both are bad you are back to bad hardware with either the external drive, the usb port or the cable to blame. If one is good and the other bad then it still indicates hardware but in a more interesting way and I would suspect the port or cable before the drive. The drive does have its own port though and that could be it.

Just saying that I would be checking a lot of things before reinstalling. The installation has to transfer that data via usb too.

If it does come down to hardware and it is the drive the sooner you know this the better. If the data is coming through clean you could get a different drive and just use gparted on your stick to copy paste the external install to a different drive if you have 3 usb ports. Seeing that I have 9 on here you probably do. You can get those little external usb multi ports too.
 
Old 03-05-2012, 10:01 PM   #11
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,968

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622
Linux may have such a scheme to diag the health of the OS. Some other OS's and maybe some tool in linux before has been created to have some protected file that contains the shal/md5 and some other file features to compare against. The problem is that hardened OS's like that have a protected drive to use.
 
Old 03-06-2012, 07:39 AM   #12
williepabon
Member
 
Registered: May 2007
Location: Florida, USA
Distribution: Ubuntu
Posts: 96

Original Poster
Rep: Reputation: 0
Question

Quote:
Originally Posted by widget View Post
I just doubt that this is really a soft ware problem at all. Really sounds like hardware to me.

I just can't see how this will help you. Is data transmission up to speed if you dump something from the usb stick to the external? How is the data transmission if you access the files on the external from the stick and grab a file? I would think that only if both of those are good there is any credibility to the bad install theory. If both are bad you are back to bad hardware with either the external drive, the usb port or the cable to blame. If one is good and the other bad then it still indicates hardware but in a more interesting way and I would suspect the port or cable before the drive. The drive does have its own port though and that could be it.

Just saying that I would be checking a lot of things before reinstalling. The installation has to transfer that data via usb too.
Widget:
Thanks for your comments. Following the possibility that you discuss above, last night I did the following experiment:

1) I connected my memory stick, the one that has Ubuntu 10.10, to one of the front USB ports (my pc is a Dell Precision 670) and ran the hdparm command, after booting, obviously. The results below.
williepabon@Precision-WorkStation-670:~$ sudo hdparm -tT /dev/sdc
[sudo] password for williepabon:

/dev/sdc:
Timing cached reads: 1774 MB in 2.00 seconds = 886.65 MB/sec
Timing buffered disk reads: 84 MB in 3.05 seconds = 27.56 MB/sec
2) Next, I removed the stick, connected to the same port the hard drive with Ubuntu 10.04 and booted. Then, ran the same command above. The results:
williepabon@WP-WrkStation:~$ sudo hdparm -tT /dev/sdc
[sudo] password for williepabon:

/dev/sdc:
Timing cached reads: 88 MB in 2.00 seconds = 43.97 MB/sec
Timing buffered disk reads: 4 MB in 3.81 seconds = 1.05 MB/sec
3) Next, I connected the memory stick with Ubuntu 10.10 to the same port above, booted from it and then connected the hard drive with Ubuntu 10.04 to another USB port. Then, ran the command above for both drives. The results,

USB port with memory stick:
williepabon@Precision-WorkStation-670:~$ sudo hdparm -tT /dev/sdc
[sudo] password for williepabon:

/dev/sdc:
Timing cached reads: 1756 MB in 2.00 seconds = 878.40 MB/sec
Timing buffered disk reads: 84 MB in 3.05 seconds = 27.54 MB/sec
USB port with the hard drive:
williepabon@Precision-WorkStation-670:~$ sudo hdparm -tT /dev/sdd

/dev/sdd:
Timing cached reads: 1782 MB in 2.00 seconds = 891.32 MB/sec
Timing buffered disk reads: 94 MB in 3.04 seconds = 30.96 MB/sec
On condition (3) above, I transferred files both ways and I didn't experience any speed degradation. Everything ran at expected speeds. Speed degradation occurs only when I boot from the hard drive (10.04), no matter what USB port I connect it to. Please, advise. Thanks.
wp
 
Old 03-06-2012, 11:41 AM   #13
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
At least you don't appear to have a problem with the box itself. That is good.

I am having some trouble getting my head around the figures today. Yesterday was kind of rough and I just feel wrung out.

I like the approach you took looks interesting. I still wonder about the the usb cable but unless you have another cable that is hard to check.

At least you should have no trouble installing if that is what you do.

How may kernels do you have on the 10.04 install? I don't think I have ever installed any on Ubuntu. Debian takes some out of the kernel as it does not meet their standard for "free". You need to install it yourself if you want it (it is in the nonfree repo). What I am wondering is if you got an upgrade in the kernel for 10.04 recently.

I know there had to be some upgraded packages as 10.04.4 was released (last step release for 10.04). That not only catches the release up to all the upgrades since the last step release so that when you install from disk you don't have about a million packages to upgrade but also does any modification to 10.04 so that you can do a version upgrade directly from 10.04LTS to 12.04LTS without having to go through 10.04>10.10>11.04>11.10>12.04.

You should have in your screen menu a number of kernels unless you have been diligent in removing them. Even then most people leave at least one kernel besides the newest one just "in case".

Your menu should have 2 entries for each kernel. The default entry is the first kernel. The next entry is for recovery mode with that kernel.

The 3rd and 4th entries will be for the kernel before the the default one and so forth down the list.

Try booting to the 3rd menu entry and see if that makes a difference.

If it does that would indicate a firmware problem.

Do you have Ubuntu packports repo enabled?
 
Old 03-06-2012, 12:45 PM   #14
williepabon
Member
 
Registered: May 2007
Location: Florida, USA
Distribution: Ubuntu
Posts: 96

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by widget View Post
At least you don't appear to have a problem with the box itself. That is good.


How may kernels do you have on the 10.04 install? I don't think I have ever installed any on Ubuntu. Debian takes some out of the kernel as it does not meet their standard for "free". You need to install it yourself if you want it (it is in the nonfree repo). What I am wondering is if you got an upgrade in the kernel for 10.04 recently.

Do you have Ubuntu packports repo enabled?
Widget:
Thanks for answering. I haven't deleted none of the previous kernels since my original install, yet. So, I tried your suggestion of booting with a previous kernel to see if the problem shows up or disappears. I booted with the previous two kernels, but the problem still shows up with each of them. So, it seems that this problem is not a kernel issue. What are your thoughts on this?
wp
 
Old 03-06-2012, 01:19 PM   #15
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by williepabon
I know that RAM is not an issue because I checked it with the utility that exists on my Windows system. By the way, If I boot my system with Ubuntu 10.10 or 11.10 I don't have a USB speed problem.
[ Just a side note: you might consider changing the thread title to something like, "Read performance issue with Ubuntu 10.04". It took me awhile to figure out what is going on here, especially given a title about verifying OS "health". ]

It would interesting to see the results of the following, from both 10.04 and 10.10 (with appropriate drive attached):

Code:
$ sudo hdparm /dev/sdc

Last edited by anomie; 03-06-2012 at 01:20 PM.
 
  


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
LXer: GNOME Tweak Tool - A tool for changing specialised or advanced GNOME3 settings LXer Syndicated Linux News 0 10-12-2011 11:50 PM
Cross-tool 0.42: Tool-chain compilation process fail ueagle Linux From Scratch 2 03-26-2011 03:43 AM
LXer: GSmartControl - Useful Hard Disk Drive Health Inspection Tool For Linux LXer Syndicated Linux News 0 07-21-2010 02:40 PM
openssl ssl error code 14090086 verify the CA cert is ok / certificate verify failed acummings Slackware 14 02-27-2009 01:51 AM
LXer: Strategy & Management: Issues and innovations: Our health is your health LXer Syndicated Linux News 0 07-13-2006 05:33 PM

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

All times are GMT -5. The time now is 06:29 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