Solved

Rescuing RedHat can't find /dev/hda?

Posted on 1997-08-31
7
551 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
  • 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

932 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now