LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Suse 8.0 Recovery (https://www.linuxquestions.org/questions/linux-newbie-8/suse-8-0-recovery-157186/)

nevrgood 03-13-2004 01:53 PM

Suse 8.0 Recovery
 
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...

jailbait 03-13-2004 03:08 PM

"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:

mkdir /gerbil
mount -t ext2 /dev/hda3 /gerbil
tail /gerbil/var/log/messages

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:
rm /gerbil/var/log/messages
touch /gerbil/var/log/messages


___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites

nevrgood 03-13-2004 03:15 PM

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?


You have no idea how much I appreciate the help..

jailbait 03-13-2004 03:31 PM

"OK, so first look at /etc/fstab and determine my file system type, then use the fsck command to check the file system. Correct?"

Yes.

"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.


___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites

nevrgood 03-13-2004 04:36 PM

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.

jailbait 03-13-2004 06:08 PM

"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.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites

nevrgood 03-13-2004 06:12 PM

OK, that gives me a much better idea of where to start. Again, thanks for all the help. I'll let you know how it goes.

nevrgood 03-16-2004 01:35 AM

Alright jailbait, I followed your instructions and fsck finds no corruptions, however it still locks up during normal boot. What is the next thing that I should check?

Thanks...

jailbait 03-16-2004 10:17 AM

" What is the next thing that I should check?"

I would check to see if you have used up all of the free space in your partitions. Boot the rescue disk, mount your SuSE partitions, and check them with the df command. For example:

mkdir /fox
mount -t ext2 /dev/hda1 /fox
df /fox

"however it still locks up during normal boot."

What messages do you get before the lockup?

Also use tail to check your error log.
mount -t ext2 /dev/hda1 /fox
tail /fox/var/log/messages

If you do not have access to the man pages for these commands you can find the man pages with Google. For example: search for man tail

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites

nevrgood 03-16-2004 03:54 PM

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??

Komakino 03-16-2004 03:59 PM

Can you disable hardware scan on boot? I mean if it's only scanning to see if you have new hardware installed, do you really need it to do that? If it's running Kudzu then that's what it's doing.

nevrgood 03-16-2004 04:01 PM

Can you disable that through with the recovery disk, cause that's the only thing that works right now..

nevrgood 03-17-2004 01:51 PM

Do you think that if I upgraded to 9.0 it would help resolve this issue?

jailbait 03-17-2004 04:04 PM

"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.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites


All times are GMT -5. The time now is 10:26 AM.