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 |
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? |
Quote:
|
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 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. |
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 |
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 Code:
sudo apt-get install testdisk And people wonder why I don't use ubuntu anymore. Geeze, I can't imagine. |
You said:
Quote:
I found testdisk with synaptic. How do I type the command for it to check the disk that is identified like /dev/sdb ? Thanks. |
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 Code:
sudo testdisk 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. |
Quote:
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 |
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. |
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.
|
Quote:
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/sdc2) 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/sdc3) 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 the hard drive: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 |
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? |
Quote:
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 |
Quote:
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 |
All times are GMT -5. The time now is 07:52 PM. |