Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 756
  • Last Modified:

how to change the boot drive on CentOS

I am using CentOs
I have two drive connected to a CentOS box. One drive is a scsi drive that is connected on the board using a pci-x card for scsi HD. I have a sencond drive on an FC enclosure that is connected to the computer mobo with an HBA card. The box sees both HD. I was able to install a copy of CentOS on both HD. I want to boot from the FC enclosure. How can I change the boot record so that the box boots from the FC drive instead of the scsi drive?

I am using GRUB

I found this link, but,cannot get it to work.


2 Solutions
You need add another grub entry.

try using yast2 from root

#yast2 disk  -------- (yast2 ->system -> partitioner)

or manually

vim /boot/grub/menu.lst

You need add another grub entry.

try looking up the partition info using yast2 as root

#yast2 disk  -------- (yast2 ->system -> partitioner)

#yast2 bootloader ---- now add the grub entry using this tool.

or manually edit and add an entry

vim /boot/grub/menu.lst

Yast probably won't help you in this instance - it is a SUSE tool and does not come with CentOS.

You want to edit your /boot/grub/grub.conf file and add a stanza for the new drive.

It will look something like this (this was from a Centos server using LVM, but should be similar if not using LVM).  You need to edit the "root (hd0,0) section" and update the kernel reference.
title CentOS (2.6.18-92.1.22.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-92.1.22.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet crashkernel=128M@16M
        initrd /initrd-2.6.18-92.1.22.el5.img

Open in new window

Please post the contents of your (text file)


what is

fdisk -l /dev/raw_disk_device_of_boot_disk



of the toplevel of the boot disk?
and what is

fdisk -l /dev/raw_disk_device_of_alternate_boot_disk



of the toplevel the alternate boot disk.

(Note: you must replace raw_disk_device_of_boot_disk and raw_disk_device_of_alternate_boot_disk, often it will be sda and sdb)
vielkacarolina1239Author Commented:
thanks everybody. I was abled to set up the configuration and boot from the SAN. I am using qlogic hba. I went to the hba bios and enabled booting from SAN and specified the HD ID to boot from. The box new were to find the boot HD after doing this.

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now