LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 03-13-2004, 01:53 PM   #1
nevrgood
LQ Newbie
 
Registered: Mar 2004
Location: Bloomington, IL
Distribution: Suse 8.0
Posts: 10

Rep: Reputation: 0
Question 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...
 
Old 03-13-2004, 03:08 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"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
 
Old 03-13-2004, 03:15 PM   #3
nevrgood
LQ Newbie
 
Registered: Mar 2004
Location: Bloomington, IL
Distribution: Suse 8.0
Posts: 10

Original Poster
Rep: Reputation: 0
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..
 
Old 03-13-2004, 03:31 PM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"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
 
Old 03-13-2004, 04:36 PM   #5
nevrgood
LQ Newbie
 
Registered: Mar 2004
Location: Bloomington, IL
Distribution: Suse 8.0
Posts: 10

Original Poster
Rep: Reputation: 0
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.
 
Old 03-13-2004, 06:08 PM   #6
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"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
 
Old 03-13-2004, 06:12 PM   #7
nevrgood
LQ Newbie
 
Registered: Mar 2004
Location: Bloomington, IL
Distribution: Suse 8.0
Posts: 10

Original Poster
Rep: Reputation: 0
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.
 
Old 03-16-2004, 01:35 AM   #8
nevrgood
LQ Newbie
 
Registered: Mar 2004
Location: Bloomington, IL
Distribution: Suse 8.0
Posts: 10

Original Poster
Rep: Reputation: 0
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...
 
Old 03-16-2004, 10:17 AM   #9
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
" 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

Last edited by jailbait; 03-16-2004 at 10:19 AM.
 
Old 03-16-2004, 03:54 PM   #10
nevrgood
LQ Newbie
 
Registered: Mar 2004
Location: Bloomington, IL
Distribution: Suse 8.0
Posts: 10

Original Poster
Rep: Reputation: 0
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??
 
Old 03-16-2004, 03:59 PM   #11
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
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.
 
Old 03-16-2004, 04:01 PM   #12
nevrgood
LQ Newbie
 
Registered: Mar 2004
Location: Bloomington, IL
Distribution: Suse 8.0
Posts: 10

Original Poster
Rep: Reputation: 0
Can you disable that through with the recovery disk, cause that's the only thing that works right now..
 
Old 03-17-2004, 01:51 PM   #13
nevrgood
LQ Newbie
 
Registered: Mar 2004
Location: Bloomington, IL
Distribution: Suse 8.0
Posts: 10

Original Poster
Rep: Reputation: 0
Do you think that if I upgraded to 9.0 it would help resolve this issue?
 
Old 03-17-2004, 04:04 PM   #14
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"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
 
  


Reply



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
data recovery? xushi Slackware 2 07-04-2005 05:02 PM
Recovery TheOracle Linux - Newbie 4 05-14-2005 02:05 PM
recovery ilnli General 1 02-23-2005 01:10 AM
Suse Install&ibm hidden partition recovery isipe Linux - Laptop and Netbook 1 11-08-2004 10:09 PM
Data Recovery plisken General 3 07-04-2004 01:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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