Find the answer to your Linux question:
Results 1 to 7 of 7
I am still in need of some direction with Grub. I have raid1 setup and working. I have grub installed on both drives within the raid set. This is how ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2004
    Location
    Indiana
    Posts
    19

    Grub again......


    I am still in need of some direction with Grub. I have raid1 setup and working. I have grub installed on both drives within the raid set. This is how I did it.

    =====

    Installing GRUB Onto Drives that have /boot Raid Partitions
    Type grub from prompt and will put you in grub's shell:
    #grub
    grub>
    grub>find /grub/stage1
    This will give you where all the grub setup files are located. On my raid1
    mirror system listed:
    (hd0,0)
    (hd1,0)
    Redhat specifically mounts your /boot partition as the root partition for
    grub and is redhat specific. What this is listing are the locations of root
    for grub which in fact is grub syntax for where the /boot partition is
    located.
    Sda=hd0 sdb=hd1 for scsi and hda=hd0 and hdb=hd1 for ide and the second
    number specifies the partition number and 0 is the starting number so this
    is specifying that it found grub setup files on sda1 and sdb1 scsi or hda1
    and hdb1 ide.
    Now you want to make sure that grub gets installed into the master boot
    record of your additional raid drives so that if id0 is gone then the next
    drive has a mbr loaded with grub ready to go. Systems will automatically go
    in drive order for both ide and scsi and use the first mbr and active
    partitions it finds so you can have multiple drives that have mbr's as well
    as active partitions and it won't affect your system booting at all.
    So using what was shown with the find above and already knowing that hd0
    already has grub in mbr, we then run:
    Grub>device (hd0) /dev/sdb (/dev/hdb for ide)
    Grub>root (hd0,0) and then:
    Grub>setup (hd0)
    Grub will then spit out all the commands it runs in the background of setup
    and will end with a successful embed command and then install command and
    end with .. succeeded on both of these commands and then Done returning to
    the grub> prompt.
    Notice that we made the second drive device 0. Why is that you ask?
    Because device 0 is going to be the one with mbr on the drive so passing
    these commands to grub temporarily puts the 2nd mirror drive as 0 and will
    put a bootable mbr on the drive and when you quit grub you still have the
    original mbr on sda and will still boot to it till it is missing from the
    system.
    You have then just succeeded in installing grub to the mbr of your other
    mirrored drive and marked the boot partition on it active as well. This
    will insure that if id0 fails that you can still boot to the os with id0
    pulled and not have to have an emergency boot floppy.

    =====

    That is the process I went through to install it to the second drive. On my system I have IDE and it is hda and hdd. It worked but didn't work. I am assuming that since doing this I have successfully installed grub on the second drive in the MBR? I am also assuming that by doing this I can now shutdown the PC and boot from either hda or hdd by unplugging one drive or the other? That doesn't seem to be true. I can boot from hda but not from hdd. Can anyone lend any suggestions as to where to look to figure out the problem? This is that last thing that I need to work before getting my box into production with raid1 redundancy. Thanks.

    Gary Manigault

  2. #2
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    So where do you get as far as booting goes? Do you get grub but it won't boot, or do you not get grub at all?
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  3. #3
    Just Joined!
    Join Date
    Jan 2004
    Location
    Indiana
    Posts
    19

    Status

    It only boots up to the bios and then hangs. It never gets to grub at all. When I issued the command that I sent in the earlier email it showed successful.

    Need more info let me know.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    Hrm...Try re-configuring your second drive from the grub prompt as you did the first time, though with hdd substitute wherever you used hdb before....
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  6. #5
    Linux Guru
    Join Date
    May 2004
    Location
    forums.gentoo.org
    Posts
    1,817
    Sorry if this is too obvious, but is the BIOS set to look for hdd? Can you boot from your second drive if you connect it to the cable for the first drive? Can you post your /boot/grub/grub.conf or ../menu.lst files?
    /IMHO
    //got nothin'
    ///this use to look better

  7. #6
    Just Joined!
    Join Date
    Jan 2004
    Location
    Indiana
    Posts
    19

    grub time

    I used hdd. Do you mean this time us hdb? Let me know.

    Quote Originally Posted by sarumont
    Hrm...Try re-configuring your second drive from the grub prompt as you did the first time, though with hdd substitute wherever you used hdb before....

  8. #7
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682

    Re: grub time

    Quote Originally Posted by gmanigault
    I used hdd. Do you mean this time us hdb? Let me know.

    Quote Originally Posted by sarumont
    Hrm...Try re-configuring your second drive from the grub prompt as you did the first time, though with hdd substitute wherever you used hdb before....
    Yeah...use whatever you changed the disk to.

    I would try this first, though:

    Quote Originally Posted by drakebasher
    Sorry if this is too obvious, but is the BIOS set to look for hdd? Can you boot from your second drive if you connect it to the cable for the first drive?
    I didn't even think about that.
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

Posting Permissions

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