Recover Redhat Linux 4 Grub Boot loader [Minimal Bash-like line editing is supported]

yasiriqbal

New Member
Joined
Aug 30, 2020
Messages
3
Reaction score
1
Credits
32
Dear All,
I am trying to recover grub book loader on RHEL 4 update 2 through redhat 6 rescure disk. Redhat 4 installed on LVM disk. The rescue disk could not mount the local hardisk iamge in /mnt/sysimage. I have to manually mounted it through the command given below.

# lvm vgchange -a y volgroup1
# mount /dev/mapper/volgroup-rootvol
# chroot /mnt/sysimage
# grub-install /mnt/sysimage
after that command i recived the attached error. Pleae help me to solve this error.
 

Attachments

  • WhatsApp Image 2020-08-30 at 3.58.19 PM.jpeg
    WhatsApp Image 2020-08-30 at 3.58.19 PM.jpeg
    118.9 KB · Views: 349


Alexzee

Well-Known Member
Joined
Jun 1, 2019
Messages
3,182
Reaction score
1,621
Credits
18,231
Maybe try these links:


If that doesn't help the only other thing that comes to mind is the first google search I found.

Boot the system from an installation boot medium. Type linux rescue at the installation boot prompt to enter the rescue environment. Type chroot /mnt/sysimage to mount the root partition. Type /sbin/grub-install bootpart to reinstall the GRUB boot loader, where bootpart is the boot partition (typically, /dev/sda).
 

Alexzee

Well-Known Member
Joined
Jun 1, 2019
Messages
3,182
Reaction score
1,621
Credits
18,231
Question:

What were you doing before you got the message:

No suitable drive was found in the generated device map?
 
OP
Y

yasiriqbal

New Member
Joined
Aug 30, 2020
Messages
3
Reaction score
1
Credits
32
Dear,
I have already attached the error screen short. When i give the command grub-install /dev/dsa
it gives the error.
There are two partitions on the drive sda1 and sda2. sda1 is boot and sda2 is / which is LVM.
I have also tried the same steps using Centos 4.7 Rescue disk and it give me the error . (Fatal: old kernel)
Can you tell me one thing, i have to mount /dev/sda1 in /mnt/sysimage or /dev/sda2 in /mnt/sysimage.
 

Alexzee

Well-Known Member
Joined
Jun 1, 2019
Messages
3,182
Reaction score
1,621
Credits
18,231
Dear,
I have already attached the error screen short. When i give the command grub-install /dev/dsa
it gives the error.
There are two partitions on the drive sda1 and sda2. sda1 is boot and sda2 is / which is LVM.
I have also tried the same steps using Centos 4.7 Rescue disk and it give me the error . (Fatal: old kernel)
Can you tell me one thing, i have to mount /dev/sda1 in /mnt/sysimage or /dev/sda2 in /mnt/sysimage.
I understand that when you run the grub-install it returns the error.
What I need to know is what were you doing on the system before it stopped booting correctly?

***IF you are trying to re-install grub you would install it to /dev/sda. [The whole HDD]
**IF your trying to chroot into your system you would mount /dev/sda2.

Run the cmd as "root":
Type su - hit Enter than run the cmd.

grub-install /dev/sda

What rescue disk are you using?
 
Last edited:

Alexzee

Well-Known Member
Joined
Jun 1, 2019
Messages
3,182
Reaction score
1,621
Credits
18,231
Unless I am mistaken you have to be in rescue mode to fix things.

To boot into rescue mode, you must be able to boot the system using one of the following methods:
  • By booting the system from an installation boot CD-ROM.
  • By booting the system from other installation boot media, such as USB flash devices.
  • By booting the system from the Red Hat Enterprise Linux CD-ROM #1.

Read the section that says:
5.2.1. Reinstalling the Boot Loader

 
Last edited:
OP
Y

yasiriqbal

New Member
Joined
Aug 30, 2020
Messages
3
Reaction score
1
Credits
32
Dear,
One of my client gave send me a system and ask that it is not booting and giving the following error when boot it

GNU GRUB version 0,97 (638k lower / 1046464 upper MEMORY)
[Minimal BASH-like line editing is supported . For the first word . TAB lists possible command completions . Anywhere else TAB lists the possible completions of a device/filename.]

grub >

He said that Centos 4 update 2 was installed on the system and they want to recover that system.
I have used centos 7/6/4 rescue disk but no luck
 

Alexzee

Well-Known Member
Joined
Jun 1, 2019
Messages
3,182
Reaction score
1,621
Credits
18,231
-:::::-CentOS 4 is not longer supported-:::::-
That's likely the problem:-


Anyway; if you followed everything under "Reinstalling The Bootloader" in the link in post # 7 and typed this 'exactly':

1.) Boot the system from an installation boot medium.

2.) Type linux rescue at the installation boot prompt to enter the rescue environment.
3.) Type chroot /mnt/sysimage to mount the root partition.

4.) Type /sbin/grub-install /dev/hda to reinstall the GRUB boot loader, where /dev/hda is the boot partition.

5.) Review the /boot/grub/grub.conf file, as additional entries may be needed for GRUB to control additional operating systems.

6.) Reboot the system.

What's the output of this command as root?

fdisk -l <that's a small letter L>
 
Last edited:

Alexzee

Well-Known Member
Joined
Jun 1, 2019
Messages
3,182
Reaction score
1,621
Credits
18,231
If all you have is a black console with:

grub>

Have a look here:

If that doesn't fix it I'm not sure what will.

-:::-In the meantime, I would boot up the Live DVD of Centos that you have and try to copy all that you can for that system onto a external device of some sort.-:::-

Another idea is maybe something in that last update didn't go well.

When I was running Centos I had to re-install it twice as my memory serves me correctly because I couldn't figure out what went wrong after an update.
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
6,252
Reaction score
4,723
Credits
45,945
1. Why are you still running RHEL4? RHEL4 is EOL and hasn't had updates in a long time unless you bought ELS, which ended 3 years ago which is also a long time for not having installed updates.
2. I'd try and contact RHEL Support if it is an important system, since you are running RHEL you probably have a subscription for other systems?
 

Members online

No members online now.

Top