how to change the boot drive on CentOS

Posted on 2009-12-21
Last Modified: 2013-12-15
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.


Question by:vielkacarolina1239
    LVL 7

    Expert Comment

    You need add another grub entry.

    try using yast2 from root

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

    or manually

    vim /boot/grub/menu.lst

    LVL 7

    Expert Comment

    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

    LVL 5

    Accepted Solution

    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

    LVL 7

    Assisted Solution

    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)

    Author Closing Comment

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
    This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now