LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 06-25-2003, 07:09 PM   #1
NVChopeful
LQ Newbie
 
Registered: Jun 2003
Location: UK
Distribution: Red Hat 7.2/9.0/Gentoo 2005/Ubuntu 8.049.0.4
Posts: 3

Rep: Reputation: 0
Unhappy Half Dead Penguin - Startup failure/Filesystem error


Linux novice with a half dead box:

RH7.2
Intel i386 PIII
1 X SCSI IBM HD(sda: sda1 sda2 sda3)
1 X Maxtor ATA HD (hdb)
Have got boot disk
Have got Install CD's
Haven't got backups (stupid i know))
Have looked at "E2fsck" man, checked out most relevant threads and FAQ's and I'm still confused

SCSI drive seems to be running ext3 file system - not sure about ATA drive tho'

The box hung when Mozilla died while logged in as root (stupid again) and nothing was doing to get it to shut down cleanly, so I had to switch off (it's got a firewall on as well and I can't telnet in and there's no SSH enabled)

On restart the box gets as far as the "Wecome to Red Hat Linux" text, then runs through the first few startup processes OK:

Mounts proc filesystem
unmounts initrd
Configuring kernal parameters
setting clock
loading default keymap
loading default font
Activating swap partitions
setting hostname
mounting USB filesystem
initializing USB controller

then I get the "Your system appears to have shutdown uncleanly" message and it goes into the file system check and returns:

"Checking root filesystem"
"/ contains a filesystem with errors, check forced"
"/:
Inode 802848 has illegal block(s)."

"UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY
(i.e., without -a or -p options)"

then I get "[FAILED] "

dropped into the shell, enter root password.
to prompt "(Repair filesystem)".

Tried to look at "/etc/fstab", get to "/etc" not "/fstab" - "cd" gets "Not a directory". Guess this means "/fstab" is dead?
Doing "CDFISK" gets:
"/dev/sda2 on / type ext3(rw)
usbdevfs on /proc/bus/usb type usbdevfs(rw)
none on /dev/pfs type devpfs (rw,gid=5,mode=620)
none on /dev/shm type tmpfs (rw)

Having really looked around at poss guidance(man's/threads on this group)
but still unsure and need to know:
can I apply some kind of fix that will recover the filesystem intact (and if that's realistic with my setup and lack of brain) or recreate.
if an ext3 filesystem has some really easy way of recovering and that applies to the box I've got to fix (unlikely I know 'cos I guess it would already have recovered by itself if it was going to).
can I use boot disk/repair file from install CD to get fix that will leave apps/configs as they were.

Help/pointers/suggections gratefully accepted. Im knackered and don't expect anyone to be looking much at this now, crashing out in about 30 mins. but e-mail alert on if someone takes pity.
 
Old 06-25-2003, 07:22 PM   #2
stony
Member
 
Registered: Jun 2003
Location: Europe / Germany / Saarland / Neunkirchen
Distribution: Debian (SID), Gentoo
Posts: 131

Rep: Reputation: 15
Hi,

do a

remount / -o mount,ro

after that check every device with fsck
f.e. for /dev/sda2 (/):

fdisk /dev/sda2

after that, i guess you get lots of questions that you answer with yes (Y) you do a

sync

and the system is syncin all drives, and then you do a

reboot

and the system should come up in a proper status again

hope i could help

cu
 
Old 06-25-2003, 07:56 PM   #3
NVChopeful
LQ Newbie
 
Registered: Jun 2003
Location: UK
Distribution: Red Hat 7.2/9.0/Gentoo 2005/Ubuntu 8.049.0.4
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for that Stony,
It looks like a good fix, but I'm not sure how to find out what all the device names are. Should there be some on the ATA drive (and will those all be "/something/hdb" ?, with exactly the same "/something" for each SD1 or hdb1 etc.
Just to check as well, is that fdisk or should it be fsck? Or do I need to use "E2fsck" instead. Sorry to be dim about this.

Thanks again,

AB
 
Old 06-26-2003, 06:16 AM   #4
stony
Member
 
Registered: Jun 2003
Location: Europe / Germany / Saarland / Neunkirchen
Distribution: Debian (SID), Gentoo
Posts: 131

Rep: Reputation: 15
Hi,

eeer, fdisk was a mistake of me =) ... you have to use fsck

and all other device names should be in /etc/fstab

cu
 
Old 06-26-2003, 06:20 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Tried to look at "/etc/fstab", get to "/etc" not "/fstab" - "cd" gets "Not a directory". Guess this means "/fstab" is dead?
no it means it is not a directory - it is a text file.

for a list of drives on your system: "fdisk -l"
 
Old 06-26-2003, 07:21 AM   #6
NVChopeful
LQ Newbie
 
Registered: Jun 2003
Location: UK
Distribution: Red Hat 7.2/9.0/Gentoo 2005/Ubuntu 8.049.0.4
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks again Stony and Acid,

I worked out the fsck/fdisk thing, and ended up using "E2fsck" with no flags, and fixing "/dev/sda1" and "/dev/sda2". I got a "bad blocks" (well not that but similar) for the affected INODE and there were loads of affected sectors - think it was sectors as I was a bit tired by then.

Took a chance, put my knackers on the line and said "Y" to all the suggested fixes and all was well. From a brief glimpse of one of the messages that popped up, it looked like a log file was the only casuality and so far everything looks OK. I'm still not sure if/what my IDE drive is doing (anything) under Linux, but at least I've got a chance to find out how to work this out now.

I really will get Samba going now, as my only bup device (OnStream ADR DP30 parallel port) is not Linux friendly so I'll have to to get it running across the network to a W2000 box and then network to it via that.

Any suggestions (and on whats good for a small network bup-BRU/Amanda look a bit over the top) or should I poke this one onto another thread/forum?

Thankyou both again,

AB
 
  


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
Dead SCSI devices / Media test Failure manudath Linux - Hardware 7 02-17-2005 10:10 AM
ttyS0 is half-dead!? TsaLLgood Linux - Hardware 2 09-22-2004 11:18 AM
My mobo is half dead.... Hammett Linux - Hardware 15 08-10-2004 03:21 PM
Recover Data in Dead ReiserFS Filesystem Schultz Linux - Newbie 4 10-15-2003 04:18 PM
filesystem failure that_girl Linux - General 5 09-18-2002 06:00 AM

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

All times are GMT -5. The time now is 09:58 AM.

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