LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   How to install a grub boot loader in rescue mode (http://www.linuxquestions.org/questions/linux-server-73/how-to-install-a-grub-boot-loader-in-rescue-mode-4175470196/)

sagar666 07-19-2013 07:51 AM

How to install a grub boot loader in rescue mode
 
Hi folks,

some one deleted completely boot directory.I want to install grub boot loader and other deleted files and directory.

I tried boot from rescue mode using DVD ROM
1. I selected a linux rescue and
2. chroot /mnt/sysimage
3. I selected shell prompt and entered the command

#grub-install /dev/sda.
getting /sbin/grub: Not fount

and also i tried

#/sbin/grub-install /dev/sda
getting no such file or directory

please help me out

yancek 07-19-2013 08:33 AM

You forgot to indicate which distribution of Linux you are using and which version of Grub. If the Grub files were all deleted, you need to put them back. Boot the DVD of the system you have installed and copy the Grub files to /boot/grub. The are usually in the /lib/grub or /usr/lib/grub directory.

sagar666 07-19-2013 08:39 AM

Hi yancek,
1.RHEL 6
2.How to find grub version because i can't able to boot my computer

yancek 07-19-2013 12:19 PM

Quote:

How to find grub version because i can't able to boot my computer
I believe Red Hat still uses Grub Legacy. Do you have a Linux Live CD or Linux on a flash drive? If you do, boot it and create a mount point for your / filesystem partition, mount it and find the grub files. I don't use Red Hat so don't know where they would be. As I said above, they are usually in /lib/grub or /usr/lib/grub/ directory. You would then need to copy them to your /boot/grub directory. If you have a separate partition for boot, you will also need to create a mount point for it and mount it. I expect you will need to create your own grub.conf file unless you have a backup somewhere.

I don't know why you would get a 'no such file or directory' message for /sbin/grub or /sbin/grub-install although I would not expect either to work in your circumstance.


All times are GMT -5. The time now is 11:58 AM.