Announcement

Collapse
No announcement yet.

Yet another XP/Kubuntu dual-boot thread

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

    Yet another XP/Kubuntu dual-boot thread

    Very odd goings-on with GRUB this morning. I can't get it to boot my Windows XP install.

    Formerly, I had two hard drives, one with Kubuntu 8.04.1 installed, one a Windows XP Pro. To get Win XP to boot from the GRUB menu, I had to do the drive mapping switcheroo, i.e. something like this:

    map (hd0) (hd1) # Map hd1 to hd0
    map (hd1) (hd0)
    rootnoverify (hd1,0) # rootnoverify ensures no attempt is made to mount windows
    makeactive
    chainloader +1
    in my menu.lst file.

    That no longer works. I get "Error 21: Selected disk does not exist" and am kicked back to the opening GRUB menu.

    I thought perhaps the new BIOS had wrecked the old drive mapping - that is, what GRUB sees as hd0, hd1, etc. So,I ran geometry commands with GRUB at Konsole to see what was where. Here's what I got:
    grub> geometry (hd0)
    drive 0x80: C/H/S = 20023/255/63, The number of sectors = 321672960, /dev/sda
    Partition num: 0, Filesystem type unknown, partition type 0x7
    Partition num: 1, Filesystem type unknown, partition type 0x7

    grub> geometry (hd1)
    drive 0x81: C/H/S = 7476/255/63, The number of sectors = 120103200, /dev/sdb
    Partition num: 0, Filesystem type is ext2fs, partition type 0x83
    Partition num: 1, Filesystem type unknown, partition type 0x82
    Partition num: 2, Filesystem type is ext2fs, partition type 0x83

    grub> geometry (hd2)

    Error 21: Selected disk does not exist
    I also tried *not* doing the switcheroo, since GRUB in the Konsole suggests my SATA drive, where Windows XP resides is, in fact, hd0.

    No dice there either. I got "Starting..." and then was kicked back to the GRUB startup menu once again. That's what you're supposed to get if you don't do the drive map swapping, but need to.

    I even tried mapping hd2 to hd0. Didn't work either, which it shouldn't - there is no hd2.

    I don't know what to try next.

    #2
    Re: Yet another XP/Kubuntu dual-boot thread

    Which drive is set in BIOS to be the first in boot order?
    => That drive will be seen by GRUB to be hd0.
    That fact might help you sort this out.
    Looks like that is the XP drive?
    If so, the boot entry for XP would be

    title XP
    root (hd0,0)
    chainloader +1

    AND ...

    The other tool would be to re-install GRUB from Kubuntu to the MBR of the first-BIOS boot drive hd0, as follows:
    Konsole
    sudo grub
    grub> root (hd1,0)
    grub> setup (hd0)
    grub> quit
    then re-boot to test it
    *** This assumes Kubuntu is on (hd1,0) (which is also where the GRUB files would be).
    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: Yet another XP/Kubuntu dual-boot thread

      Originally posted by Objekt
      Very odd goings-on with GRUB this morning. I can't get it to boot my Windows XP install.

      Formerly, I had two hard drives, one with Kubuntu 8.04.1 installed, one a Windows XP Pro. To get Win XP to boot from the GRUB menu, I had to do the drive mapping switcheroo, i.e. something like this:

      When you say formerly - does this mean that you have done anything regarding the disks and/or BIOS?

      I ask, because I have some experience regarding mixed IDE, RAID and SCSI can be. It look to me like there are combinations (essentially BIOS settings included SCSSI BIOS) that can be more or less impossible to get Grub to "undersatand." I don't know about SATA; it's just something that make me wonder.

      Another thing I have seen, is that some Grub updates just throw away the old files, no backup, and makes up somethiing by itself.

      Comment


        #4
        Re: Yet another XP/Kubuntu dual-boot thread

        Originally posted by nilsA
        Originally posted by Objekt
        Very odd goings-on with GRUB this morning. I can't get it to boot my Windows XP install.

        Formerly, I had two hard drives, one with Kubuntu 8.04.1 installed, one a Windows XP Pro. To get Win XP to boot from the GRUB menu, I had to do the drive mapping switcheroo, i.e. something like this:

        When you say formerly - does this mean that you have done anything regarding the disks and/or BIOS?

        I ask, because I have some experience regarding mixed IDE, RAID and SCSI can be. It look to me like there are combinations (essentially BIOS settings included SCSSI BIOS) that can be more or less impossible to get Grub to "undersatand." I don't know about SATA; it's just something that make me wonder.

        Another thing I have seen, is that some Grub updates just throw away the old files, no backup, and makes up somethiing by itself.
        Yes, I installed a new BIOS this morning. Hard drives are the same. I have one IDE hard drive holding my Linux install, all ext3 partitions. I have one SATA hard drive with two NTFS partitions, one of which is the Windows XP boot partition.

        Previously, I had these set up in BIOS to boot IDE first, then SATA. This meant that GRUB saw them in that order: IDE=hd0, SATA=hd1. So I had to do the "Map" command trick to get Windows XP to boot, since it insists on being on the "first" hard drive.

        I now have the boot order of the drives set the same as before, but the Windows volume won't boot. If I set it to boot first in BIOS, I get a "DISK BOOT ERROR, INSERT SYSTEM DISK" etc. message. There's no reason that should happen just from a BIOS update, but there it is.

        Maybe that's why GRUB can't boot it either?

        Anyway, I'm screwed as far as Windows goes. I can't even run the Recovery Console with the Windows XP installation disc. I get as far as the blue screen with gray menu bar at the bottom saying, "Starting Windows..." but it just sits there. This means I couldn't even reinstall Windows if I wanted to.

        Can you recommend a Linux-based tool for editing or fixing the MBR on the Windows XP install? I suspect that's where the problem lies. Probably, the new BIOS fried the MBR on that disk, so the system can't find the Windows XP install on it.

        Comment


          #5
          Re: Yet another XP/Kubuntu dual-boot thread

          So, if Linux is on hd0 and XP on hd1 (right?), then it should be:

          title XP
          root (hd1,0)
          map (hd1) (hd0)
          map (hd0) (hd1)
          chainloader +1

          AND do this also:

          Re-install GRUB from Kubuntu to the MBR of the first-BIOS boot drive hd0, as follows:
          Konsole
          sudo grub
          grub> root (hd0,0)
          grub> setup (hd0)
          grub> quit
          then re-boot to test it

          (I think I have this right now ... ? Kubuntu is at (hd0,0); XP at (hd1,0))

          XP should have its bootloader in the boot sector of the XP partition, and so a chainload usually works.



          ********EDIT:

          ... and we have BIOS set to boot from the Linux drive first.

          Only takes a few minutes to try this combination; that we you can rule it out. But if that doesn't work, then ... Hmmm ...?
          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

          Comment


            #6
            Re: Yet another XP/Kubuntu dual-boot thread

            My advice:

            First do what Qqmike suggests. He usually is right.

            Then, if things don't go well, you may want to play a little with the BIOS boot order. Grub is very, very picky here.

            I can see no reason for a BIOS upgrade to do anything to your disks?

            Comment


              #7
              Re: Yet another XP/Kubuntu dual-boot thread

              Originally posted by Qqmike
              Which drive is set in BIOS to be the first in boot order?
              => That drive will be seen by GRUB to be hd0.
              That fact might help you sort this out.
              Looks like that is the XP drive?
              If so, the boot entry for XP would be

              title XP
              root (hd0,0)
              chainloader +1

              AND ...

              The other tool would be to re-install GRUB from Kubuntu to the MBR of the first-BIOS boot drive hd0, as follows:
              Konsole
              sudo grub
              grub> root (hd1,0)
              grub> setup (hd0)
              When I try this, I get "Error 17: Cannot mount selected partition" after the "setup..." command.

              I changed the BIOS boot order back to have the IDE drive (with Kubuntu on it) be first, since I wasn't able to boot from the SATA drive (with Win XP on it) anyway.

              Comment


                #8
                Re: Yet another XP/Kubuntu dual-boot thread

                Reply #4 (the commands there) assumes that you have already set the BIOS boot order back to have the IDE drive (with Kubuntu on it) be first (BEFORE running those commands). Is that right?



                ****************Edit:
                Error 17 implies that BIOS (and therefore GRUB also) thinks that XP is on (hd0,0).
                Which implies you did * not * change BIOS to boot first from the Kubuntu drive.
                An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                Comment


                  #9
                  Re: Yet another XP/Kubuntu dual-boot thread

                  Except I did. The IDE drive is first in boot order in BIOS, SATA second. When I reboot, the GRUB menu comes up straight away. If I had the SATA drive with its non-working Win XP boot volume first, I would get the "DISK BOOT ERROR" etc. message, then GRUB would come up.

                  Comment


                    #10
                    Re: Yet another XP/Kubuntu dual-boot thread

                    Oh boy! We are sure turned around here!

                    What you posted in your last Reply is not what I posted in Reply #4.

                    ************EDIT: That is, in your Reply #6. Reply #6 is not what Reply #4 says to do.
                    ************

                    Here's what Reply #4 says to do:

                    So, if Linux is on hd0 (BIOS must be set to boot from the Kubuntu drive before doing the commands that follow), then:

                    title XP
                    root (hd1,0)
                    map (hd1) (hd0)
                    map (hd0) (hd1)
                    chainloader +1

                    AND do this also:

                    Re-install GRUB from Kubuntu to the MBR of the first-BIOS boot drive hd0, as follows:
                    Konsole
                    sudo grub
                    grub> root (hd0,0)
                    grub> setup (hd0)
                    grub> quit
                    then re-boot 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


                      #11
                      Re: Yet another XP/Kubuntu dual-boot thread

                      Please see edits to the above.
                      An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                      Comment


                        #12
                        Re: Yet another XP/Kubuntu dual-boot thread

                        Nope. I still get this (lifted directly from my Konsole):

                        grub> geometry (hd0)
                        drive 0x80: C/H/S = 20023/255/63, The number of sectors = 321672960, /dev/sda
                        Partition num: 0, Filesystem type unknown, partition type 0x7
                        Partition num: 1, Filesystem type unknown, partition type 0x7

                        grub> root (hd0,0)

                        grub> setup (hd0)

                        Error 17: Cannot mount selected partition
                        I'm not sure why GRUB says hd0 has an "unknown" filesystem. It should be able to see NTFS, shouldn't it?

                        I've also tried manually mounting the partition (partition 0 above) before going to Konsole, as it does not auto-mount, but GRUB gives the same results. I don't understand why GRUB needs to mount a partition that is already mounted, and can't mount a partition that isn't mounted.

                        Comment


                          #13
                          Re: Yet another XP/Kubuntu dual-boot thread

                          "I'm not sure why GRUB says hd0 has an "unknown" filesystem. It should be able to see NTFS, shouldn't it?"

                          Either your BIOS is really, really messed up, or we are not communicating, or both.

                          It's an "unknown filesystem" because it is XP!
                          But, it's not supposed to be XP. It's supposed to be Kubuntu (on (hd0,0)).
                          When you set BIOS to boot from Kubuntu drive, then hd0 is supposed to be the Kubuntu drive and Kubuntu is supposed to be on (hd0,0).
                          If you did, in fact, set BIOS to boot from the Kubuntu drive, then you did those commands (as you indicated), and you got Error 17, then there's some problem with how BIOS is seeing your drives. I've never seen a situation where the geometry command gives bad information, though.
                          This is a first for me; and that may very well be the case. There are some situations with mixed IDE & SATA drives that * apparently * are not solved by these methods. >> It is a fact, though, that the Kubuntu installer may get the drives confused when there is a mixture of IDEs and SATAs. But, as I said, AFTER installation is complete (even with a confused installer), I've not seen a situation where the geometry command failed to sort it all out and then the fix came using root -- setup -- quit (and/or by editing menu.lst using the (hdx,y)'s from geometry). We have a Kubuntu Veteran here who had a very tough case of mixed drives; however, we solved it quickly by using geometry to sort out the drives and then re-installed GRUB and/or edited menu.lst accordingly (I can't recall which right now).

                          Puzzling.

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

                          Comment


                            #14
                            Re: Yet another XP/Kubuntu dual-boot thread

                            Originally posted by Qqmike
                            We have a Kubuntu Veteran here who had a very tough case of mixed drives; however, we solved it quickly by using geometry to sort out the drives and then re-installed GRUB and/or edited menu.lst accordingly

                            I'm not a Kubuntu Vetran, but recently had you help me through a case of rather confused BIOS settings. In the end I had to:

                            (1) redo the BIOS settings so that I
                            (2) got a Grub menu when booting,
                            (3) from there decide what the geometry command told about how Grub saw my two disks,
                            (4) then find a combination of BIOS settings that made the Grub follow your command sequence,
                            and last (after repeating # 3 here),
                            (5) boot from a live CD in order to set the menu.lst entries for Kubuntu and Linux according to the disk numbers as found by Grub.

                            Somewhat confusing, but in the end it worked!

                            Comment


                              #15
                              Re: Yet another XP/Kubuntu dual-boot thread

                              nilsA, I'm about ready to yield to you!

                              First, though, after re-reading the thread, I'm still not convinced that he has set the BIOS right << for how he wishes to re-install GRUB >> (if you know what I mean).
                              Example: Set BIOS to boot from the Kubuntu drive and then re-install GRUB to the MBR of the Kubuntu drive => that exact combination sequence. (Or, the other way: set BIOS to boot from the XP drive, then re-install GRUB to the MBR of the XP drive.)
                              An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                              Comment

                              Working...
                              X