Grub2 mapping drives


Results 1 to 8 of 8

Thread: Grub2 mapping drives

Threaded View

  1. #2
    Join Date
    Jun 2002
    Location
    Michigan
    Posts
    875
    Well after a lot more searching I finely found the answer.

    If the windows bootloader is on a entirely different harddrive than grub, it may be neccessary to trick windows into believing that it is in fact the first harddrive. This was passible in the old grub with map, and is now done with drivemap. Assume grub is on hd0 and windows on hd2, you need to add the following after set root
    Code:
    drivemap -s hd0 hd2
    So after editing my /etc/grub.d/09_Windows script it looks like this

    Code:
    #!/bin/sh -e
    echo "Adding Windows XP to GRUB 2 menu"
    cat << EOF
    menuentry "Windows xp" {
    set root=(hd1,1)
    drivemap -s hd0 hd1
    chainloader +1
    }
    EOF
    make sure after editing the script you run update-grub this will write the changes to grub.cfg located in /boot/grub/

    I should also note for anyone reading this later, Grub2 numbers partitions starting with 1 and NOT 0 as Legacy Grub used to. So instead of root (hd0,0) Grub2 would look like so
    Code:
    set root=(hd0,1)
    So I'm not sure who does it but this thread can be marked <SOLVED>
    thanks
    Last edited by saikee; 09-07-2010 at 03:47 AM.

Posting Permissions

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