Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
OK, I've searched the net over and again and have come up empty handed. I'm fairly new to Linux and have a big problem. I set up a postfix mail server about two years ago, flipped the switch and just let her run. The Suse box has been nearly unstoppable up until now. I tried getting my mail from work a couple days ago and found that the server wasn't responding. I went home and found it hung at the "Hardware scan on boot" portion of the boot process. There didn't seem to be a reason for the reboot; no power problems or anything. Now that's as far as she gets and then locks. I put in the recovery disk and ran fsck /dev/hda1 and all it says is that /dev/hda1 is either not a ext2 file system or my superblock is corrupt. To be honest, i'm not sure if that's even the boot partition. I looked in etc/fstab and it list hda, hsa1 and hda2. I assume that hda is the swao partition, but I don't know for sure. Now what?? I've never had any problems with this distro, but now that I do I find myself seriously lacking in know how. Any help would be greatly appreciated...
"I looked in etc/fstab and it list hda, hsa1 and hda2. I assume that hda is the swao partition, but I don't know for sure."
The second field in each /etc/fstab entry gives the directory that the partition is mounted on or else states that the partition is the swap partition. The third field in each /etc/fstab entry gives the file system type. You want to run the correct fsck type against every partition except swap, i.e. fsck -t ext3 /dev/hda1 or whatever.
You can use the recovery CD to check your logs. Suppose that you get to the point that / is mountable and / is on /dev/hda3. Then to read the last few entries in the log from the recovery CD you would do:
mount -t ext2 /dev/hda3 /gerbil
Also check the size of the log with:
ls -l /gerbil/var/log/messages
because it is possible that your log caused the crash by using up all of the free space in the partition. If your log is too big you can reset it with:
OK, so first look at /etc/fstab and determine my file system type, then use the fsck command to check the file system. Correct? Should I use the -p switch to correct any errors or is there a better way? I noticed that you used the -t switch in your example, what does it do?
"OK, so first look at /etc/fstab and determine my file system type, then use the fsck command to check the file system. Correct?"
"Should I use the -p switch to correct any errors or is there a better way?"
I have never used the -p option. I just let fsck try to fix everything that needs fixing. Without the -p option then fsck throws everything that it can't figure out into /lost+found under a number instead of a name. If fsck creates any numbered file in /lost+found then I open those files with an editor to see if I can figure out what they are and where they belong. There is a /lost+found for each partition so after you use fsck on a partition then mount that partition and take a look at the /lost+found.
" I noticed that you used the -t switch in your example, what does it do? "
The -t option is the filesystem type. You set this to the same value as the second field in the /etc/fstab entry. fsck does do things differently based on what file system type it thinks it is working with and you can screw up a file system even worse if fsck thinks that it is correcting the wrong file system type. The default is ext2 and so people sometimes screw up other file system types by telling fsck the partition is ext2 when it really is something else.
OK, that sounds simple enough. I was also wondering about the superblock. If that has to be replaced how would I know and how would I do it. And how do you rebuild the kernel? I'm trying to know what to do for any possible contingency. Also, how do you know what boot loader the system is setup with. I didn't see a /etc/lilo file, but I could have swore that's what I used when I put this box together.
"OK, that sounds simple enough. I was also wondering about the superblock. If that has to be replaced how would I know and how would I do it."
Every filesystem has redundent superblocks. If the first superblock is corrupt then fsck will look at the second superblock and so on. Once fsck finds a good superblock then it rebuilds the corrupt superblock(s). You do not have to do anything. fsck rebuilds superblocks automatically, although it may ask your permission before doing so.
"And how do you rebuild the kernel? I'm trying to know what to do for any possible contingency."
If fsck fixes your file system then the only things that you might have to rebuild are things that you find in /lost+found. Wait until you look at lost+found before worrying about replacing anything. The files that are likely to be screwed up, if any, are the ones that had I/O activity at the time of the crash. The kernel is not an active file except at boot.
"Also, how do you know what boot loader the system is setup with. I didn't see a /etc/lilo file, but I could have swore that's what I used when I put this box together."
The default bootloader for SuSE 8.0 is lilo. The configuration file for lilo is /etc/lilo.conf. Again, lilo is one of the less likely programs to be screwed up. In any case, there are so many files in Linux that it is better to wait and see what fsck does before working on fixing anything.
It says that I have only used 7% of the partition and there are no errors in the log.. It locks up during the "hardware scan on boot". I saw somewhere that some hardware may cause this. Even though nothing has been changed in this system for 2 years I took out some pci cards and when I pulled out the NIC it will boot all the way to the login screen. At the login screen when I try to login as root it refuses my password, but I haven't changed it. I bought a new NIC and replaced the old one, but it does the same thing. What next??
"Do you think that if I upgraded to 9.0 it would help resolve this issue?"
I think that if you do a reinstall that the problem will probably be fixed. Then, of course, you will probably never know what the problem was. As to upgrading to 9.0 that will fix the problem if it is a Linux bug. It is a pretty obscure bug if it only shows up once every two years.
Therefore I tend to learn toward a hardware problem that corrupted your hard drive.
If you have to reinstall then you might as well upgrade to 9.0 at the same time. Normally you would install the new system as a dual boot with the old system until the new system is stable. Since your old system doesn't work, I don't see any advantage to setting up a dual boot.
Since you are only using 7% of your partition you might repartition your hard drive so that it is possible to have two systems installed at once so that if you decide to try something else later you could install a second system alongside 9.0.