Thomas Vogt’s IT Blog

knowledge is power …

Linux – Repair Bootloader / Change Boot device path

If a Linux sever is not booting anymore (e.g. HP Proliant server) and on screen the following message appears:

“boot from hard drive c: no operating system”

there is usually a problem with boot disk device path,  for example after changing configuration on Raid Controller or moving disks from one disk controller to another etc.

Solution

Boot into Rescue Mode

Just boot from a Linux Live CD/DVD (f.e. RHEL 6 installation DVD) an choose “Rescue Mode”, which gives you a root terminal after boot.

Mount disk devices

Mount all devices (including /dev device, otherwise you run into trouble later !)

Rescue# fdisk -l
Rescue# mount /dev/vg00/lv_root /mnt
Rescue# mount /dev/cciss/c0d0p1 /mnt/boot
Rescue# mount  -o bind /dev /mnt/dev

Chroot into mounted Root environment

Rescue# chroot /mnt

Hint: If you get an error like “/bin/sh: exec format error” you use the wrong LiveCD (e.g. x86 instead of x86_64)

Run Grub CLI

Rescue# grub

grub> root (hd0, 0)  -> hd0,0 is actually the first partition on first disk (e.g. /dev/cciss/c0d0p1, basically /boot partition)

grub> setup (hd0)

grub> quit

Change entries in /boot/grub/menu.lst

Last step is to set correct entries in bootloader config file.

vim /boot/grub/menu.lst

splashimage=(hd0,0)/grub/splash.xpm.gz

title Red Hat Enterprise Linux (2.6.32-220.el6.x86_64)
root (hd0,0)

Reboot Server

After the steps above you should be able to boot server again.

Rescue# reboot

Advertisements

December 21, 2011 - Posted by | Linux, RedHat

1 Comment »

  1. Hi, Thomas. I have an ask regarding to HP-UX. Is it possible to contact you personally somehow (e.g. e-mail)? Thanks.

    Comment by Alex | November 26, 2013 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: