Reinstall a corrupted boot partition.

 
Issue
In a system where the "/boot" partition is a separate partition, when /boot is corrupted or be
formatted mistakenly, you can not boot the system but do not want to reinstall the whole
system.
 

Environment
• Red Hat Enterprise Linux, CentOS, Fedora/
• /boot partition is installed on the first partition of your first disk
• x86 architecture

Resolution

Reinstall /boot partition manually with the following steps:

1. Boot the system into rescue mode with the help of CD or DVD:
   At boot prompt, type "linux rescue".
This will start the rescue mode program.
You will be prompted for your keyboard and language requirements.
Enter these values as
you would during the installation of Red Hat Enterprise Linux.
Next, a screen will appear telling you that the program will now attempt to find a Red Hat
Enterprise Linux installation to rescue. Select "Continue" on this screen.

2. At the "sh-3.1" prompt, chroot to /mnt/sysimage:
# chroot /mnt/sysimage

3. Make sure the boot partition is labeled as described in /etc/fstab. (Assuming the boot partition is /dev/sda1):
# e2label /dev/sda1 /boot

4. Make sure the boot partition is mounted:
# mount /dev/sda1 /boot

5. Mount the CD to install the following rpms:
# mkdir /mnt/iso
# mount -o loop,ro /dev/hdc /mnt/iso
# cd /mnt/iso/Server
# rpm -Uvh --replacefiles --replacepkgs grub-0.97-13.i386.rpm
# rpm -Uvh --replacefiles --replacepkgs redhat-logos-4.9.16-1.noarch.rpm
# rpm -ivh --replacefiles --replacepkgs kernel-2.6.18-8.el5.i686.rpm

6. Install the GRUB:
# grub-install /dev/sda

7. If /boot/grub/grub.conf is lost, you need to create it manually. The following is a sample of
grub.conf, please make sure the the file "vmlinuz-2.6.18-8.el5" and "initrd-2.6.18-8.el5.img"
exist under the directory of /boot (which should be installed after step 4).

8. default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux (2.6.18-8.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-8.el5 ro root=LABEL=/
initrd /initrd-2.6.18-8.el5.img

9. Make a soft link to grub.conf:
# cd /boot/grub
# ln -s grub.conf menu.lst
Then reboot the system.

Comments

Problem with activating account

bc781ec37a760a6ffc97bac3f0a2a4b3 Hi Guys, I am newbie in the internet stuff and I dont know if I am writing on correct board on this website. I
have got problem with activating my account. I received email but when I click on the link it was not working, is this link is correct? http://www.rahulpahade.com/?ac72e5348d0d,

www.rahulpahade.com is very interesting

www.rahulpahade.com is very interesting

www.rahulpahade.com is very interesting

www.rahulpahade.com is very interesting

EqEjggYXNSswHqxifF

Look for a ISO (cd image) called SUPER GRUB DISK. Its a great uttiliy disk good for any linux user to have on hand when something goes bad or it is time for a change. It has a uttiliy to remove grub and redirect to a windows boot.A+ Computer technician.

Gundosmrb

CdPOlMTYRbgTnkVSOl

xhmXu5 vhcohrkkveso, [url=http://pbgmpfhndedw.com/]pbgmpfhndedw[/url], [link=http://qqxifnvklfrx.com/]qqxifnvklfrx[/link], http://rcaelgmubdkc.com/

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options