Grub Problems

From Nocrashwiki

Grub Problems

That's where the editting of the init script and rebuilding the initrd comes in. The one you've got was probably built for you as part of the anaconda installation process. If your initrd script is called /boot/initrd-xxxxxxxxx.img, then you can unpack it with:

mkdir /tmp/initrd
cd /tmp/initrdgzip -
cd /boot/initrd-xxxxxxxxx.img | cpio -imd --quiet

then edit the init file at /tmp/initrd/init to change the entry with the old swap partition, then pack it up again with:

cd /tmp/initrd
find . | cpio -co | gzip -9 > /boot/initrd-xxxxxxxxx.img

It would probably be a good idea to back up the old initrd file before you start in case it all goes wrong


Fix the GRUB boot loader on your RAID drive(s). To fix a non-bootable system and ensure GRUB is installed on both drives, manually install GRUB as follows:

  • Reboot the machine from the original Linux CDROM
  • From the Linux boot menu, select ?Rescue a broken system?
  • Continue through the prompts until the screen ?Device to use as a root file system? appears
  • Press Alt-F2 to switch to a second console screen then press Enter to activate it.
  • Mount the md0 RAID device and use chroot and grub to install the bootloader onto both sda and sdb using the following commands:
mount /dev/md0 /mnt
chroot /mnt
grub
device (hd0) /dev/sda
root (hd0,0)
setup (hd0)
device (hd1) /dev/sdb
root (hd1,0)
setup (hd1)
quit
  • Reboot the system with command ?shutdown -r now?, remove the CDROM and allow the system to boot from the hard drive.