Solved

Rescuing RedHat can't find /dev/hda?

Posted on 1997-08-31
7
561 Views
Last Modified: 2013-12-15

I have a Redhat4.2 installation that went bad immediately after an attempt
to install the ld.so.-2.0.4-1.i386.rpm from the contrib directory.

Symptoms:
 - immediately after the rpm -U, none of the usual system utilities were
      working, e.g., ls, cat, etc.  I attribute this to shared libraries
      becoming inaccessible.

 - trying to reboot hangs after the message:
VFS: Mounted root (ext2 filesystem) readonly.
      Again, I thought this might be consistent with mangled shared libraries
      since mount doesn't seem to be staticly linked.  I figured I'd
      boot with the rescue disk, mount the root file system and figure out
      some way to reinstall a happy version of ld.so and friends.

 - Booting from the redhat4.2 boot.img with 'rescue' argument leaves
me in a shell, but I can't mount the root fs.  In fact, I can't even
access /dev/hda.  When I look in /dev, there no files called /dev/hd*.
Thus,

#mkdir /tmp/root
#mount -t ext2fs /dev/hda1 /tmp/root
mount failed: No such device

I even tried 'mknod', e.g.,
#mknod /dev/hda b 3 0
#mknod /dev/hda1 b 3 1
#mount -t ext2fs /dev/hda1 /tmp/root
mount failed: No such device

As far as I can tell, /dev/hda is detected and correctly identified in
the boot process (i.e., there are a couple of lines indicated that it
found a device with the right size and manufacturer-string).

At this point, I have no idea what's wrong or how to proceed.  Any
suggestions would be appreciated.

Thanks,
John Salmon
 
0
Comment
Question by:jsalmon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 2

Accepted Solution

by:
nicademus earned 100 total points
ID: 1629505
With the Boot disk you have is there an option to parse extra commands to the kernel during booting?  if so, try the mount -t ext2fs /dev/hda1 /
If this does not work, try putting in this disk which you used to intall Redhat, this should have the option I spoke of also. if you are able to get in at any time try fsck /dev/hda1 to check the filesystem for errors.  This is all I can say at this time, I had exactly the same thing happen to me, some time ago, but it was on Slakware, and there seems to be a vast difference at times, and I forgot exactly how I regained my partition, but I believe it was by using the Install disk and not the Rescue/boot disk.

0
 

Author Comment

by:jsalmon
ID: 1629506
Sorry, I wasn't precise enough describing the disks I used.
I used the RedHat4.2 install disk (boot.img) and gave the
'rescue' command at the initial prompt.  It's also possible
to give other kernel arguments at this prompt.  Your message
wasn't clear about whether you're suggesting additional arguments
too?  There is no fsck in the path, and even fdisk /dev/hda1
complains about being Unable to open /dev/hda1.  Any other ideas?

0
 
LVL 2

Expert Comment

by:nicademus
ID: 1629507
I think that using the Install disk without using rescue should work, but using the extra params I gave before.

The fsck is a binary used to check the filesystem on which you had the problem, it should actually always boot up as a part of your boot-time process anyway, so the System knows it is stable enough to continue.
I shall experiment with my Red Hat Dist. and see what I can come up with, as far as parsing extra comments onto a working and then non-working /dev/hda1
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:jsalmon
ID: 1629508
I tried passing the mount -t ... args to the boot.img disk,
and got various error messages about unrecognized arguments.

Kernel arguments usually look something like root=/dev/hda1
and other arcana similar to the contents of lilo.conf.  In fact,
I tried the root=/dev/hda1 argument and didn't get anything new.

If you have any other ideas, let me know.  Thanks.

0
 
LVL 2

Expert Comment

by:nicademus
ID: 1629509
sorry not just at the moment...I'm working on it
0
 

Author Comment

by:jsalmon
ID: 1629510
Problem solved!  Thanks for trying.  I think my entire problem
was that I said '-t ext2fs' instead of '-t ext2'.  The latter
is the correct syntax and the former is  an error.  The version
of mount on the rescue disk gave the 'No such device' error
which sent me off in completely the wrong direction - and I
took you with me.  

In the mean time, I learned a couple of
things:  the 'YARD' "Yet another rescue disk" tools are pretty
nice, although they require some tweaking to work with PAM.
Also, the 'mount' command that you remembered from the rescue disk is a Slackware-specific feature.  RedHat just doesn't have
anything like that.

Cheers,
John
0
 
LVL 2

Expert Comment

by:nicademus
ID: 1629511
Yeah sorry, I realised earlier today that I had said to put mount -t etc. in the parsing, and realised I meant to say mount root=/dev/hda ro etc.  but since you have got it solved, happy Linuxing...=)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question