Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Rescuing RedHat can't find /dev/hda?

Posted on 1997-08-31
7
Medium Priority
?
570 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 200 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Question has a verified solution.

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

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
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 how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month5 days, 20 hours left to enroll

773 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