LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Troubleshooting linux startup (https://www.linuxquestions.org/questions/linux-newbie-8/troubleshooting-linux-startup-588348/)

Micik 09-30-2007 03:49 AM

Troubleshooting linux startup
 
Hello guys,
I'm having problems with linux redhat 6 machine I know it is very old distribution, but I'm not supposed to change it or anything similar. When I turn on the computer it pass POST OK, I see LILO:....... and similar, but simply I dont see list with services starting. On this machine is installed special graphical enviroment that is supposed to boot up, but instead I see only a dark screen.
Now I want to troubleshoot the problem, because I think it happened after power was down.
Can you explain me how to create boot and root disk for this purpose?
I know that I need to check disk and file system with fck.
Can you explain me procedure with more details and suggest appropriate link?
Thanks

emi_ramo 09-30-2007 08:57 AM

Hi there,
Probably you'll need a Linux CD system, as knoppix (http://www.knopper.net/knoppix-mirrors/index-en.html), to boot on your pc and install correctly LILO or GRUB on your hda/sda (MBR).

Micik 09-30-2007 09:36 AM

Thanks, but is there any other option?
What would you do if you find yourself in front of very old computer (1997) on which is installed linux redhat 6 and is not working correctly? Since There is one more computer with same configuration (they are operating terminals) I think I can make boot and root disks on computer that is working and try to boot computer that has problem. Problem is not due to MBR because I can see that LILO is passing OK, problem is that it doesn't start services...
Prblem appeared when this computer is shut down due to power failure....
I thought to use fsck to examine it...

Any suggestions?

PTrenholme 09-30-2007 10:05 AM

I think the prior suggestion was the best one: boot it from a "Live CD" or a "Rescue CD" and run fsck from there. (This assumes that the old PC has a CD drive from which it can be booted.) If you can find the RH6 distribution media, you could see if the install disk lets you do a "linux rescue" boot from the first prompt. (Current distributions do this, but I have no knowledge of RH6.) If that works, you should be able to umount the HD and run fsck.

There are many "Live" or "Rescue" CDs available, and almost any one can be used. Just Google "Rescue CD" or "Live CD" with Linux to find one.

Another thought: Can you change the LILO boot menu so you boot into level 3, with no GUI? That would get you to the command line but the HD would be active, so fsck would probably not work. But you might be able to identify the problem files, and, possibly, recover them.

Really, though, a "Rescue CD" and fsck is probably the best way to proceed if at all possible.

Final thought: You mention that this is one of two similar systems. Can you yank the HD from the "bad" one, connect it (as a second drive) to the "good" one, and run the diagnostic and recovery stuff from the "good" drive? (Note that you only want to connect the "bad" HD to the "good" system. Do not mount it.)

Micik 09-30-2007 10:56 AM

Thank you for the advice, I'll try to find live CD... I'm not sure whether to touch "good computer" because it's too old, and if in any case I make some mistake that will cause second one to fail also, I'd be in serious problems...

I planned only to make boot and root disks and to try fix things on "bad computer"
Here, at home I have a linux mandrake 10.1, and I cannot make boot disk because boot folder is more than 2 MB and cannot be copied on floppy disk...

PTrenholme 09-30-2007 06:38 PM

O.K., can you yank the "bad" computer's HD, bring it home to your home system, and use the Mandriva system to run fsck on it? That, at least, would eliminate the possibility of any problem with the "good" system.

Micik 10-01-2007 06:07 AM

Quote:

Originally Posted by PTrenholme (Post 2908743)
O.K., can you yank the "bad" computer's HD, bring it home to your home system, and use the Mandriva system to run fsck on it? That, at least, would eliminate the possibility of any problem with the "good" system.

Ok guys, here's exactly what is going on.
This computer has one hard drive which has three partitions
first 250 MB as main boot partition, second 250 Mb as backup boot partition and third on for file system about 7 GB.

When I switch on the computer it try to start, then try from backup boot and then finally error message: "Missing operating system".
I took out this hard drive and placed in newer, much faster computer as only hd drive, and started ubuntu 7.04 live CD. After ubuntu is started I tried to execute fsck -p /dev/sda1 and there i saw that super block is damaged and it suggested to me try e2fsck -b 8193 <device>m and I tried that with
e2fsck -b 8193 /dev/sda1, but no luck.
i wonder if Live CD at all can execute file checker and modify hard drive?

Do you have any other suggestions?
is there any other tool?

Do you know where i can find boot image for red hat floppy disk and maybe I can downloaded it from the Net and try that...
I don't know what to do....

emi_ramo 10-01-2007 07:45 AM

Hi,
I think the distro is not important. What is important that your HD is not mounted when you do fsck. Look accurately to this behaviour, because Live CDs use to mount HD automatically. And also try to do fsck to the backup partition copy. It's possible that your first partition is unrecoverable due to the phisical damage. And, finally, it's possible that your partition table is damaged: have you tried fdisk /dev/sda to see what is going on?

Ah! Another thing possible is that /dev/sda points to your fast&good PC HD. Isn't it the /dev/sdb or something similar?

If all of this is not a solution for you, may be you're not using correctly fsck. Use it with autorepair&don't ask (all yes) options.

Wishing it helps,
emi

Micik 10-01-2007 08:44 AM

Quote:

Originally Posted by emi_ramo (Post 2909264)
Hi,
I think the distro is not important. What is important that your HD is not mounted when you do fsck. Look accurately to this behaviour, because Live CDs use to mount HD automatically. And also try to do fsck to the backup partition copy. It's possible that your first partition is unrecoverable due to the phisical damage. And, finally, it's possible that your partition table is damaged: have you tried fdisk /dev/sda to see what is going on?

Ah! Another thing possible is that /dev/sda points to your fast&good PC HD. Isn't it the /dev/sdb or something similar?

If all of this is not a solution for you, may be you're not using correctly fsck. Use it with autorepair&don't ask (all yes) options.

Wishing it helps,
emi

Well, thanks for the reply, unfortunately on this particular computer is a special type of software that we use in our factory. I cannot risk and play with fdisk, and accidentally destroy everything.
HD is actuall a SCSi which has special adapter to IDE. First time I boot computer with this disk in it, it had sda1, sda3, sda5 if I remember right (only odd, strange!?!). Second time I boot with ubuntu live cd, I have found out that in /dev there are no sda nor sdb nor hda(b)...
Really strange...

One more thing, when I start ubuntu, and go to "Computer" ->Filesystem and in var/log for example, I think that these are not files on the hard drive, but these are ubuntu RAM drive files, right?
When I go to "Computer" in ubuntu GUI, I can see floppy, CDrom and Filesystem...
Since I'm not familiar with the linux very much, I don't know how to try to open file structure on hard drive to see if it is complete corrupted?

PTrenholme 10-01-2007 12:00 PM

A question: I'm not familiar with RH6, but the Fedora distributions (which are beta test platforms for RH distributions) have been using Logical Volumes for several years now. So, is it possible that your RH6 distribution has placed your non-boot partitions (swap, /, and /home) in a LV? If so, then running fsck on the raw LV will destroy the LV and render the data almost unrecoverable. The only way to run fsck on data in a LV is to start the device mapper, and then run fsck on
/dev/mapper/{$logical_volume_group}_{$logical_volume_name}.

I ask his question because the "Invalid block size" message a common result of running fsck on a raw LV partition. If you do a fdisk -l on a disk containing a LV partition, that partition will show a type "8e," not as a typical Linux partition of type "83."

Micik 10-01-2007 02:49 PM

Perhaps, it is possible...
I wanted to know if this approach with live cd can actually work in practice? Did you fix similar problems with live CD? Is fsck the only tool that is at my disposal? I've searched internet hoping to find boot disk image but no luck, I found a couple old links that don't worrk. On the other had, at home, I have mandrake linux 10.1 and when I try to follow procedure of making boot floppy, I end up wit messages how contents of boot directory is too big to fit on one floppy. It seems, I'm stuck...

PTrenholme 10-02-2007 07:42 AM

I notice that this thread is in the "Newbie" forum. Perhaps you should ask the moderator(s) to move it (the thread) to the Redhat forum where people more familiar with RH systems might be able to help.

That being said, the fdisk command (if run without root privileges) cannot make any changes in the HD, and, if it's run with the "list" option (vis.: fdisk -l), even if run with root privileges, will not make any changes o the disk.

As to the "Live CD" issue, yes, I have used that method to recover from a hard disk failure. In your case, I'd suggest that you get the Fedora 7 "Live CD" since the Fedora distribution is, as I mentioned, essentially a "beta" release of the newest RH distribution (without any propitiatory applications, of course). So it's reasonable to suppose that the Fedora 7 "Live CD" might work well with your RH 6.

You mentioned that the problem system is in a "factory," but didn't mention the type of "factory." Is it possible that the system had been "vibrated" by the operation of the "factory?" The most common cause of apparent hard dish failure is that the cable connecting the HD to the mother board has failed. And the most common cause of failure is that the cable connectors have become slightly oxidized or covered with a non-conducting film. The first thing to try with any apparent HD failure is to unplug the drive cables and plug the connectors back into the system. Physically removing and replacing the cables "scrapes" the contacts, removing any oxidation or film. (This problem is why cable contacts and pins are often gold-plated, but gold-plated connectors are more expensive than unplated connectors.) If that seems to fix the problem, then consider replacing the drive cables.

Micik 10-02-2007 02:15 PM

Thanks for the reply...
As I mentioned above, I already did something similar to what you suggest me. I took HD from one computer and placed to newer, faster computer in order to make Ubuntu live CD boot shorter...
Computer is placed in the control room and there are no any vibration or any kind of harsh enviroment.
I'll try to find Fedora live CD
Thanks for the help, I really appreciate your effort-


All times are GMT -5. The time now is 12:14 PM.