Solved

Rescuing RedHat can't find /dev/hda?

Posted on 1997-08-31
7
550 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

707 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

16 Experts available now in Live!

Get 1:1 Help Now