Find the answer to your Linux question:
Results 1 to 10 of 10
I need a suggestion on setting up a dual boot menu for my setup. I have two hard drives one with WinXP and a second one with CentOS 5.3 installed. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2010
    Posts
    27

    [SOLVED] Dual boot setup 2 hard drives


    I need a suggestion on setting up a dual boot menu for my setup.

    I have two hard drives one with WinXP and a second one with CentOS 5.3 installed. I basically moved the hard drive from another identical machine to this one and so I want to setup a boot menu to access either windows or Linux. CentOS already has grub on it.

    What is the simplest method of setting up the dual boot menu? I would like something which is easy to administer which I can just ghost over either the Linux drive or Windows drive or disconnect either and have either boot just fine.

    I don't ask for much do I?

    If I have to go through a little process after ghosting over one or the other drives that would probably be ok. We get updated images for this machine and replace the image on the drives with new images, although Linux shouldn't be reimaged, just windows. So the Linux drive (2nd drive) should not be touched normally.

    Any advice would be greatly appreciated.

    Thanks,
    DemiSheep

  2. #2
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    Are you able to boot xp and/or CentOS?

    You can have the xp bootloader in the mbr of its drive, the CentOS grub file in the mbr of its drive and select either at boot by changing priority in the BIOS.

    If you have both drives attached at all times, you can put an entry in CentOS /boot/grub/menu.lst file for xp and select on boot. You would need the CentOS drive set to first boot priority in the BIOS.

    Probably be a good idea to boot CentOS or and Linux LiveCD and log in to a terminal as root to get partition information to post here with this command: fdisk -l (lower case Letter L).

  3. #3
    Just Joined!
    Join Date
    Jun 2010
    Posts
    27
    Yes I can boot either OS, currently we are switching between OS's by hitting F12 and selecting which drive to book the first (windows) or the second (linux). Both drives are connected at the same time. I can take either drive out and the other will boot just fine if I want or need to.

    I'll do the fdisk command and post the information tomorrow morning.

    Thanks,
    DemiSheep

  4. $spacer_open
    $spacer_close
  5. #4
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Just add an entry in grub.conf file of CentOS and set CentOS Hard disk as First Boot Device. Both Hard disks/OSes will be independent of each other and if you take any disk out, other will boot up fine.
    Add this code in /boot/grub/grub.conf file of CentOS
    Code:
    title Winddows XP
                 rootnoverify (hd1,0)
                 map (hd0) (hd1)
                 map (hd1) (hd0)
                 chainloader +1
    In case it doesn't work, post the output of fdisk -l command here.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  6. #5
    Just Joined!
    Join Date
    Jun 2010
    Posts
    27
    Here is the picture of the fdisk -l command.

    devils casper can you tell me what the 4 lines under the XP title actually do?

    rootnoverify (hd1,0)
    map (hd0) (hd1)
    map (hd1) (hd0)
    chainloader +1

    Thanks,
    Andre

  7. #6
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Above code call Windows Boot Loader. rootnoverfiy set path and chainloader +1 loads Windows Boot Loader.

    Windows Boot Loader doesn't work if it is installed in Secondary Hard disk. Windows Hard disk is secondary in your setup. We are using map code to cheat Windows boot loader. It swap device number assigned to Hard disks and Windows Boot Loader assume that it is residing in Primary Hard disk.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  8. #7
    Just Joined!
    Join Date
    Jun 2010
    Posts
    27
    I guess it would help if I actually added the picture.

    Sorry..

    It's not letting me post the link, it says I have to make 15 posts before I am allowed so I am trying to cut it up and you can paste it in your browswer.

    h t t p : / / i461.photobucket. com/albums/qq337/demisheep/fdiskl .jpg

    I added the lines to the grub.conf file and reversed the drives and it's now just booting into Linux. I see the grub menu like I usually do and it just says "starting CentOS" and counting down to actually starting to load it. I don't see any other options in the grub menu.

    Thanks,
    Andre

  9. #8
    Just Joined!
    Join Date
    Jun 2010
    Posts
    27
    Here is the grub.conf file:

    h t t p : / / i461.photobucket.com/albums/qq337/demisheep/grubconf.jpg

    remove spaces from the links to view them...

  10. #9
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    GRUB Menu is hidden by default and if you press Esc key, it will appear.
    Put # sign before hiddenmenu line in grub.conf file.
    Code:
    # hiddenmenu
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  11. #10
    Just Joined!
    Join Date
    Jun 2010
    Posts
    27
    Great I got it working. I just reversed the order, I put Windows on top so it would default to Windows and setup a timer for 3 minutes.

    Thanks for your help!

    DemiSheep

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •