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

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

how to change the boot drive on CentOS

Hi,
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.
http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/install-guide/s1-x86-bootloader.html

Thanks

0
vielkacarolina1239
Asked:
vielkacarolina1239
2 Solutions
 
askbCommented:
You need add another grub entry.

try using yast2 from root

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

or manually

vim /boot/grub/menu.lst

0
 
askbCommented:
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

0
 
CrunchedCommented:
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

0
 
hemmiCommented:
Please post the contents of your (text file)

/boot/grub/grub.conf

Also,
what is

fdisk -l /dev/raw_disk_device_of_boot_disk

and

ls

of the toplevel of the boot disk?
and what is

fdisk -l /dev/raw_disk_device_of_alternate_boot_disk

and

ls

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)
0
 
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.
0

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