Announcement

Collapse
No announcement yet.

Unable to get GRUB installed properly.

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Unable to get GRUB installed properly.

    I just reinstalled Kubuntu 7.10. I changed my partitions around, they are setup as follows:

    /dev/hdc
    -- hdc1: ext3 Storage
    -- hdc2: swap Swap

    /dev/sdb
    -- sdb1: ext3 /
    -- sdb2: ext3 /home

    /dev/sda
    -- sda: Windows XP

    The install went fine, after it finished when I rebooted, I got an error loading grub, error 15, stage 1.5 or something along those lines.

    The drives are setup with hdc being hd0, sda being hd1 and sdb being hd2.

    So I checked my menu.lst file after booting from the live cd and it had Kubuntu set to boot from hd1, which is wrong, so i set it to hd2,0 which is correct. I saved the file.

    Then i ran the following:

    sudo grub
    root (hd2,0)
    setup (hd1)
    quit

    No errors there, everything looking good. So i restart, it comes up to the Grub loaded and all it says is:

    GRUB

    Thats it. I have no idea what to do now, i don't know why it isn't working, i'm going to post a link to my menu.lst file and maybe someone will know whats wrong.

    http://pastebin.com/m655094e3




    #2
    Re: Unable to get GRUB installed properly.

    In BIOS, the drive set as the first-in-order boot drive is seen as hd0.
    What drive do you have set as the first boot hard drive—the Windows or Kubuntu drive?

    Notice that you did
    setup (hd1)

    So, is hd1 your first BIOS boot drive? Your setup should read
    setup (hd0)
    and hd0 should be your first boot drive in BIOS (where GRUB is to be installed).

    I.e., Are you booting from the Windows drive or the Kubuntu drive?
    Which ever it is, that drive is hd0.

    If Windows is on a non-first hard drive, then you need the map dance as you have it in menu.lst.
    If Windows is on hd0, you do not need such a map dance.

    Sorry, I'm being interrupted here for some social-thing, but will check back. But I've told you enough that you can probably start to get this sorted out.

    One more thing:
    from a live Cd or whatever, the geomerty command tells you exactly how BIOS & GRUB see your drives:

    sudo grub
    grub> geometry (hd0)
    then do
    grub> geometry (hd1)
    then do
    grub> geometry (hd2)
    and make sure the hd0, hd1, and hd2 contain what you think they contain.
    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

    Comment


      #3
      Re: Unable to get GRUB installed properly.

      In the BIOS my first boot device is the DVD Writer, then my windows XP drive.

      I'm sorry I left out that I already ran the geomtry command and confirmed that hd0 is /dev/hdc,(Storage), hd1 is /dev/sda (Windows XP) and hd2 is /dev/sdb (Kubuntu)

      As far as I can tell everything is set up the way it is supposed to be. I'm guessing you might think that having the DVD-Writer as the first boot device might be the problem, but before I did the reinstall, it was the first boot device and I had no problems with GRUB, so that should rule that out.

      So to answer your questions:

      hd1 is my first BIOS boot "hard drive" as it is the windows drive and that is what i'm booting off of, but it is hd1 not hd0, reason being I have 2 SATA drives, one is Windows XP the other Kubuntu, then I have the Storage drive which is IDE, so it comes first for some stupid reason. then my Windows XP, then Kubuntu.

      I don't understand what you mean by map dance, so if you could elaborate please.

      Hope this makes sense.

      Thanks

      Comment


        #4
        Re: Unable to get GRUB installed properly.

        As you said, results of your geometry command are:
        windows: sda = hd1 boot drive BIOS first
        kubuntu: sdb = hd2
        storage: hdc = hd0

        Your DVD being first in BIOS is OK.

        If BIOS is set to boot off the Windows drive, then in menu.lst, it will be hd0.
        I wonder how you got the geometry results?
        I'll bet Kubuntu is hd1. (if not, then hd2)
        And Windows is (hd0,0).

        Why not try in menu.lst these:

        title Ubuntu 7.10, kernel 2.6.22-14-generic
        root (hd1,0)
        kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=96b27178-84f8-4375-bdea-2d71242d636f ro quiet splash
        initrd /boot/initrd.img-2.6.22-14-generic
        quiet

        BUT-- the UUID must be correct too!!! In that kernel statement, the UUID must correspond to the same drive that Kubuntu root is on (in this case).

        From a Live CD, you can get UUIDs using this command:
        ls /dev/disk/by-uuid/ -alh

        and use this for XP:

        title Windows NT/2000/XP
        root (hd0,0)
        savedefault
        makeactive
        # map (hd0) (hd1)
        # map (hd1) (hd0)
        chainloader +1

        Note that I commented out the two map commands (the “map dance”) using the # signs.

        (or, for Kubuntu, try root (hd2,0) again with Windows at (hd0,0))

        Sure won't hurt to try. It's got to be one of a small finite number of combinations.
        And the UUIDs must be correct.

        Edit menu.lst with a live CD, as root, and File > Save, File > Quit and eject the live Cd & reboot to test it.




        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

        Comment


          #5
          Re: Unable to get GRUB installed properly.

          Alright so I tried setting root to (hd1,0) and to (hd2,0) with Windows set to (hd0,0), I also verified that the UUID's are correct. Restarted and it didn't work.

          Still only getting the word GRUB on the screen and thats it.

          EDIT: I removed all the added information I had here since I solved the problem (it was originally a long post)

          The problem is apparently GRUB does not like to have a mix of SATA and PATA drives when being installed. So I pulled the cable on my Storage drive (PATA/IDE) and reinstalled GRUB, restarted and it worked. Restarted again and plugged the cable back into the Storage drive and everything is working fine now.

          It took me 8 and half hours to figure that out that sucked lol.

          Thanks for the help.

          Comment


            #6
            Re: Unable to get GRUB installed properly.

            “The problem is apparently GRUB does not like to have a mix of SATA and PATA drives when being installed. “

            You are exactly correct. That's why I was trying to sort it out enough to * re-install * GRUB to its proper place. When you have a mixture of IDE & SATA, the installer MAY get incorrect info regarding the drives. (Same happens when folks use the grub-install commands in Linux grub shell, using the device.map: that info is often incorrect!). The installation solution then is to do one of two things:
            (1) Disconnect the offending drive as you have done, then install; Or,
            (2) During installation of Kubuntu, carefully tell the installer exactly where to put GRUB (Don't say it! ). If you are not sure, then have the installer put GRUB somewhere safe (like in the root partition of Kubuntu). Then after installation, get in there (with live CD or perhaps, sometimes, using “c”), and re-install GRUB to the proper MBR, which is what we were trying to do here. BTW, don't pay too much attention to your device.map: your native GRUB—the one you see when you boot up—does not even look at device.map; it detects the drive properly from BIOS each time. Only the grub shell that runs as a program inside Kubuntu looks at device.map.


            What counts is that you got it! and hopefully this whole thread will help others. We have another resident expert on your problem here, too (dibl ) who has gone down this road as you have.


            Your 8.5 hours is not wasted--you fixed it, but most importantly, you could never learn all that you have without paying such dues!
            Congrats on the very good work

            An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

            Comment


              #7
              Re: Unable to get GRUB installed properly.

              I originally installed Xubuntu the first time around, and I couldn't remember if I had the PATA drive installed or not at that time, so i figured i'd just pull it anyways and see what happens. Easy fix none-the-less.

              Thanks for yer help.

              Comment

              Working...
              X