[PlanetCCRMA] my computer is fubar

Fernando Pablo Lopez-Lezcano nando@ccrma.Stanford.EDU
Sat Oct 4 17:44:01 2003


> So, I'm running RH9 on i686.
> 
> I did a ccrma update yesterday and added firestarter- a firewall
> program.  Today I hooked up a printer and a keyboard(music) to it.
> When I booted up I get an error that my root filesystem has errors and
> there is 1 bad sector.

Ouch... not good news. 

> Then it says there is 1 duplicate block, shared with one file.
> 
> /var/log/gdm/:0.log.1
> 
> then it asks me if I want to fix the problem. It takes me though like
> 10 fixes where something is numbered wrong, like 21 instead of 22  or
> 3 instead of 4 and so on.  Finally it prompts me to fix it again and
> when I typ in yes it scrolls y down the screen and the screen flashes.

and then? Does it hang? It sounds like it is managing to fix the
problem. 

> I just edited my grub.cfg to only show the lowlatency and most
> up-to-date kernal's neither work. I figure it will probably just be
> cleaner to completely reformat, but I'd rather not till the semester
> ends.
> 
> Does anyone have any ideas?  Thanks,

WARNING: this is all from memory... handle with care, not liable if
anything bad (worse) happens. 

It looks like you did not turn off the computer properly (ie: it either
crashed hard or you turned it off without stopping linux) and/or your
hard disk developed a hardware problem. The result is the same, a
filesystem that is not "clean" and has to be checked for problems and
repaired before the system can boot. 

I have not gone through the repair process in a RedHat 9 box (yet?) so I
don't know what are you being prompted about (I imagine it is doing an
fsck but I don't know). It used to be that you would get a root prompt
and you have to run fsck manually. Is that what you are doing?

There are several options to recover. All of them eventually involve
doing a "fsck" of the broken partition (I imagine it is the root
partition) until all the filesystem problems are fixed. 

As this is potentially damaging to the filesystem (but you don't really
have many options) if you don't understand what you are doing then don't
do it :-)

One option is to use your RedHat install disk #1 to boot into "rescue
mode" and use the rescue fsck for checking your partitions (if you boot
from the cdrom and type "linux rescue" at the first prompt you will get
into rescue mode). I don't remember the details, sorry, I would have to
try to do it. 

If the system can boot "single user" you could also try that. To boot
"single user" add "single" to the boot line of the kernel you want to
boot into in /boot/grub/grub.conf. Reboot, you will eventually get a
root prompt (hopefully). At that point you have to know which partition
is the "root partition" where linux was installed. You can probably find
out if you don't know already by typing:
  fdisk -l /dev/hda
(assuming your main disk is ide and is the first)
After you know which partition is the root partition you should be able
to do:
  fsck /dev/hdxx
(where /dev/hdxx is your root partition)

Fix all problems (you may lose files, it all depends on how severe is
the damage). If you get the root prompt, run fsck again to make sure all
problems are fixed. After that you should be able to type "exit" and the
boot process will continue. 

Good luck!
-- Fernando