Solved

Rescuing RedHat can't find /dev/hda?

Posted on 1997-08-31
7
555 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PHP Apache application gives "Forbidden" message 5 57
How to have a cron job run until a condition is met 12 66
installing docker on ubuntu 6 29
Linux script delete files 3 35
Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
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…
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…

832 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