Announcement

Collapse
No announcement yet.

[Solved] Windows 7 RC1 and Kubuntu 9.04 dualboot problems. Help setting up GRUB

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

    [Solved] Windows 7 RC1 and Kubuntu 9.04 dualboot problems. Help setting up GRUB

    I have been using Kubuntu for a month now, and are very happy with it, but sometimes it is neccesary to use windows (those pesky games)
    I do have both XP and Vista with orginal licenses but wanted to try W7, so I did a clean install of W7 first, made it work, then reinstalled Kubuntu 8.10 (that was the DVD image I had, planned to upgrade later)

    First of all a reboot did not show any GRUB menu, just booted into W7 automatically. But the systemdisk was resized like I wanted, so I knew that Kubuntu atleast had partitioned the disk.
    Then I did this:

    first just get to Ubuntu with your live CD.
    And then open a terminal and do this.

    1- sudo grub
    then you should have something like this
    the grub> (...).
    for (...) enter

    2- find /boot/grub/stage2

    now you should have grub root , meaning something with (hdx,y)
    ps: x,y are number , they can be 0,0 or 0,1

    3- root (hdx,y) (mine was hd1,5)
    x,y been the number you receive from the last command.

    4-setup (hd0)
    quit

    5- sudo shutdown "now" -r

    Then I got the GRUB, and booted Kubuntu, no problems.
    Rebooted to try W7, GRUB shows it as Vista, and I got the errormessage Cant find NTLDR, press CTRL+ALT+DEL to reboot.

    Two questions;
    I knew a installin W7 after Kubuntu would mess up the GRUB, but why did not my Kubuntu intallation fix a grub.
    How can I fix the W7 (probably wrong forum to ask )I guess GRUB messed up the partition, so that it tries to boot W7 from the wrong partition.

    #2
    Re: Windows 7 RC1 and Kubuntu 9.04 dualboot problems. Help setting up GRUB

    "...but why did not my Kubuntu intallation fix a grub."

    I don't know -- GRUB _should_ by default have been properly installed to the MBR (hd0) during installation (as you later had to do manually using root-setup).


    "How can I fix the W7 (probably wrong forum to ask Embarrassed )I guess GRUB messed up the partition, so that it tries to boot W7 from the wrong partition."

    You didn't tell us what happens when you do
    CTRL+ALT+DEL
    Does it then boot into W 7?


    Check the GRUB boot menu, /boot/grub/menu.lst, to be sure you have a boot entry for Windows 7. It should look like this:

    title Windows 7 (or Vista or whatever it's called)
    root (hd0,0)
    chainloader +1

    (this assumes 7 was installed to the FIRST partition of the drive (hd0,0))

    Note (sounds like you already know this GRUB stuff):
    For accessing/editing menu.lst:
    -- How To GRUB Methods - Toolkit
    http://kubuntuforums.net/forums/inde...opic=3081671.0


    The current best bible, maybe it will address new issues with Windows 7 (whcih I am reading CAN be quirky at times inhow it boots):
    Dual boot Vista Windows 7, Linux – The Definitive Guide: http://apcmag.com/dualboot

    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: Windows 7 RC1 and Kubuntu 9.04 dualboot problems. Help setting up GRUB

      okay, here is whats happening

      If I press ctrl+alt+del it reboots, and i end up in the grub menu again.

      this is the output from /boot/grub/menu.lst (the windows part of it.)

      # This entry automatically added by the Debian installer for a non-linux OS
      # on /dev/sdb1
      title Windows Vista (loader)
      rootnoverify (hd1,0)
      savedefault
      makeactive
      map (hd0) (hd1)
      map (hd1) (hd0)
      chainloader +1
      This is the output from fdisk -lu (sdb1 part)
      Disk /dev/sdb: 500.1 GB, 500107862016 bytes
      255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
      Units = sectors of 1 * 512 = 512 bytes
      Disk identifier: 0x000699e4

      Device Boot Start End Blocks Id System
      /dev/sdb1 * 2048 206847 102400 7 HPFS/NTFS
      Partition 1 does not end on cylinder boundary.
      /dev/sdb2 206848 428007197 213900175 7 HPFS/NTFS
      /dev/sdb3 428019795 976768064 274374135 5 Extended
      /dev/sdb5 953007993 976768064 11880036 82 Linux swap / Solaris
      /dev/sdb6 428019921 931657544 251818812 83 Linux
      /dev/sdb7 931657608 953007929 10675161 82 Linux swap / Solaris

      Partition table entries are not in disk order
      The guides was great, but I am still fairly new to linux, so when I see a lot of text I get overwhelmed (sorry)

      I have nothing worth saving on the dual boot disk (I have two other drives I unplug when I do stuff like this to avoid any "issues") So should I try to reinstall W7 and then Kubuntu? (sigh)

      [edit]
      I backed up menu.lst and took a chance and changed the grub setup to (hd0,0) and it worked like a charm. But can anyone explain me why that worked?

      I noticed that I had a NTFS partition on sda too btw, small one..

      Thanks Qqmike

      Comment


        #4
        Re: Windows 7 RC1 and Kubuntu 9.04 dualboot problems. Help setting up GRUB

        Originally posted by Frostbeard

        But can anyone explain me why that worked?
        I'll take an educated guess -- the "map" commands are reversing the order of the drives. So hd(1), the second drive, becomes "first" from the perspective of Windows, and it has a bootable first partition.

        Comment


          #5
          Re: [Solved] Windows 7 RC1 and Kubuntu 9.04 dualboot problems. Help setting up G

          Or,
          somehow, sdb is seen as hd0 and sda is seen as hd1 (as seen by BIOS and therefore also by GRUB).
          By chance, is one hard drive a SATA HDD and the other hard drive an IDE?
          That could do this.
          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: [Solved] Windows 7 RC1 and Kubuntu 9.04 dualboot problems. Help setting up GRUB

            Nope, none are IDE, I have 4 SATA slots and they are filled with 3x500GB and one optical drive.
            When installing W7 i removed two of the SATA drives (as stated to avoid confusion and horrible loss)

            I let w7 take the entire 500gb disk, and then resized it to aprox 250 when installing Kubuntu using the partition tool during installation.
            But it seems that w7 have made some more partitions, perhaps some hidden system thingy, or perhaps some bug during installation. It did take an awfull long time, and it hung on reboot several times forcing me to start the intallation anew. Perhaps something happened there that confused GRUB.

            I say good riddance to windows, and are really happy with Kubuntu which will be my main OS from now on.
            (When not gaming...)
            Thanks for all the replies.

            Comment


              #7
              Re: [Solved] Windows 7 RC1 and Kubuntu 9.04 dualboot problems. Help setting up G

              Yes, W 7 may have set up a small partition for something (recovery, whatever). That's usually not an issue, but it can sometimes bump the y-factor in (hdx,y).

              Also, if you disconnected two HDDs during installation of Kubuntu/GRUB, then reconnected them, then at boot time, the (hdx,y)'s seen during installation of Kubuntu may now be shuffled (changed) with the addition of two more HDDs.

              One guiding principle:
              In BIOS, we always set some HDD to be the first BIOS boot drive (usually after the CD/DVD drive). Now when any PC actually boots right now, then the drive from which it boots will be seen by GRUB as the hd0 drive. If you re-boot the PC, but enter BIOS and set it to boot from another of your drives, then THAT drive will be seen by GRUB as hd0 during the current booted session.

              That principle sometimes helps sort things out as far as hd0 goes.
              An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

              Comment


                #8
                Re: [Solved] Windows 7 RC1 and Kubuntu 9.04 dualboot problems. Help setting up GRUB

                Regarding the issue of the GRUB not loading once Windows 7 is installed - the easiest thing to do is download easyBCD in Windows, then use that to create a new entry in the boot manager for your linux partition. It will recognize it upon rebooting and give you the option of W7 or Linux. Adds another screen during the boot, but no problems.

                Comment


                  #9
                  Re: [Solved] Windows 7 RC1 and Kubuntu 9.04 dualboot problems. Help setting up G

                  @braden -- That's only if you want Windows bootloader to control the booting.


                  @ this topic:

                  A recent case appeared in this forum involving Windows 7. Windows 7 had set up a special recovery partition which also housed a Windows bootloader. Thus, in GRUB's boot menu, instead of pointing GRUB at the Windows 7 partition (in a chainloader statement), we had to point GRUB at the Windows 7 special recovery partition (in a chainloader statement). That is,
                  chainloader (hdx,y)+1
                  was used where (hdx,y) = the recovery partition (where the Windows 7 bootloader was).
                  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