Announcement

Collapse
No announcement yet.

GRUB Detects Windows 7 on a Drive that Never Had Win7 Installed

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

    GRUB Detects Windows 7 on a Drive that Never Had Win7 Installed

    Ok so when I set up my system I unplugged all my HDDs except my SSD boot drive. Now when I boot with my HDDs plugged in I get a grey screen(GRUB?) on boot up that says Windows 7(loader) is available on sda1. When I fired up KDE Partition Manager I looked to see which drive was sda1. It was my 2TB WD Caviar Green SATA III. This drive has never had Win 7 installed on it, so I am confused why it claims Windows 7 is on there. :s
    OS: Kubuntu 12.10/Windows 8
    CPU: Intel Core i7 2600K
    Motherboard: Gigabyte GA-Z77X-UD5H
    Memory: 2x4GB Corsair Dominator
    Graphics Card: MSI R7770
    Monitor: Dell 2208WFP
    Mouse: Mionix NAOS 5000
    PSU: Corsair 520HX
    Case: Thermaltake Mozart TX
    Cooling: Thermalright TRUE Black Ultra-120 eXtreme CPU Heatsink Rev C
    Hard Drives: 1x180 GB Intel 330 SSD - 1xWD 1 TB Caviar Black - 1xWD 2 TB Caviar Green - 2xWD 3 TB Caviar Green

    #2
    Try "sudo update-grub2" in the terminal window. This should update your grub to your present setup. I'm not sure why it assigned sda1 for your Windows location, but when you change your hardware after installing Kubuntu you need to let grub know where everything is. The command update-grub2 will do this for you.

    Comment


      #3
      A couple questions...

      * What is the boot order listed in your BIOS?
      * Mind showing us the output of sudo fdisk -l /dev/sdX for each drive in your machine?

      Comment


        #4
        Thanks for the reply zapt-zero but looks like it still detects windows. Here is the output from updating GRUB:
        Generating grub.cfg ...
        Found linux image: /boot/vmlinuz-3.2.0-25-generic
        Found initrd image: /boot/initrd.img-3.2.0-25-generic
        Found linux image: /boot/vmlinuz-3.2.0-24-generic
        Found initrd image: /boot/initrd.img-3.2.0-24-generic
        Found linux image: /boot/vmlinuz-3.2.0-23-generic
        Found initrd image: /boot/initrd.img-3.2.0-23-generic
        Found memtest86+ image: /boot/memtest86+.bin
        Found Windows 7 (loader) on /dev/sda1
        Found Windows 7 (loader) on /dev/sdb1
        done
        OS: Kubuntu 12.10/Windows 8
        CPU: Intel Core i7 2600K
        Motherboard: Gigabyte GA-Z77X-UD5H
        Memory: 2x4GB Corsair Dominator
        Graphics Card: MSI R7770
        Monitor: Dell 2208WFP
        Mouse: Mionix NAOS 5000
        PSU: Corsair 520HX
        Case: Thermaltake Mozart TX
        Cooling: Thermalright TRUE Black Ultra-120 eXtreme CPU Heatsink Rev C
        Hard Drives: 1x180 GB Intel 330 SSD - 1xWD 1 TB Caviar Black - 1xWD 2 TB Caviar Green - 2xWD 3 TB Caviar Green

        Comment


          #5
          @Steve, the boot order should still have my SSD first but I would need to double check. Otherwise the drives are just in a random order.

          Here is the out put you asked for:
          xplorer4x4@xplorer4x4-MS-7673:~$ sudo fdisk -l /dev/sda

          Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
          255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
          Units = sectors of 1 * 512 = 512 bytes
          Sector size (logical/physical): 512 bytes / 4096 bytes
          I/O size (minimum/optimal): 4096 bytes / 4096 bytes
          Disk identifier: 0xbaf4ec2f

          Device Boot Start End Blocks Id System
          /dev/sda1 * 2048 3907026943 1953512448 7 HPFS/NTFS/exFAT


          xplorer4x4@xplorer4x4-MS-7673:~$ sudo fdisk -l /dev/sdb

          Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
          255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
          Units = sectors of 1 * 512 = 512 bytes
          Sector size (logical/physical): 512 bytes / 512 bytes
          I/O size (minimum/optimal): 512 bytes / 512 bytes
          Disk identifier: 0xa7ecdbea

          Device Boot Start End Blocks Id System
          /dev/sdb1 * 2048 1953520064 976759008+ 7 HPFS/NTFS/exFAT


          xplorer4x4@xplorer4x4-MS-7673:~$ sudo fdisk -l /dev/sdc

          Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
          255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
          Units = sectors of 1 * 512 = 512 bytes
          Sector size (logical/physical): 512 bytes / 512 bytes
          I/O size (minimum/optimal): 512 bytes / 512 bytes
          Disk identifier: 0x9875e922

          Device Boot Start End Blocks Id System
          /dev/sdc1 * 63 1953520064 976760001 7 HPFS/NTFS/exFAT


          xplorer4x4@xplorer4x4-MS-7673:~$ sudo fdisk -l /dev/sdd

          Disk /dev/sdd: 80.0 GB, 80026361856 bytes
          255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
          Units = sectors of 1 * 512 = 512 bytes
          Sector size (logical/physical): 512 bytes / 512 bytes
          I/O size (minimum/optimal): 512 bytes / 512 bytes
          Disk identifier: 0x0005ae33

          Device Boot Start End Blocks Id System
          /dev/sdd1 * 2048 139585535 69791744 83 Linux
          /dev/sdd2 139587582 156301311 8356865 5 Extended
          /dev/sdd5 139587584 156301311 8356864 82 Linux swap / Solaris

          xplorer4x4@xplorer4x4-MS-7673:~$
          Note that one HDD is not connected and my optical drive is not connected as I have to hot swap them(long story).
          Last edited by Snowhog; Jun 25, 2012, 09:58 PM.
          OS: Kubuntu 12.10/Windows 8
          CPU: Intel Core i7 2600K
          Motherboard: Gigabyte GA-Z77X-UD5H
          Memory: 2x4GB Corsair Dominator
          Graphics Card: MSI R7770
          Monitor: Dell 2208WFP
          Mouse: Mionix NAOS 5000
          PSU: Corsair 520HX
          Case: Thermaltake Mozart TX
          Cooling: Thermalright TRUE Black Ultra-120 eXtreme CPU Heatsink Rev C
          Hard Drives: 1x180 GB Intel 330 SSD - 1xWD 1 TB Caviar Black - 1xWD 2 TB Caviar Green - 2xWD 3 TB Caviar Green

          Comment


            #6
            I was hunting for a hidden restore partition possibly left over from a prior Windows install. But these are usually small and have an identifiable label; the output of your various fdisks shows nothing that looks like this.

            The name of the Windows boot loader is NTLDR. Can you find any such file anywhere on your drives?

            Comment


              #7
              Locate turned up nothing for NTLDR.
              OS: Kubuntu 12.10/Windows 8
              CPU: Intel Core i7 2600K
              Motherboard: Gigabyte GA-Z77X-UD5H
              Memory: 2x4GB Corsair Dominator
              Graphics Card: MSI R7770
              Monitor: Dell 2208WFP
              Mouse: Mionix NAOS 5000
              PSU: Corsair 520HX
              Case: Thermaltake Mozart TX
              Cooling: Thermalright TRUE Black Ultra-120 eXtreme CPU Heatsink Rev C
              Hard Drives: 1x180 GB Intel 330 SSD - 1xWD 1 TB Caviar Black - 1xWD 2 TB Caviar Green - 2xWD 3 TB Caviar Green

              Comment


                #8
                This is weird! Let's see your /boot/grub/grub.cfg ...

                Comment


                  #9
                  Coming right up:
                  http://pastebin.com/6duyWtDc
                  OS: Kubuntu 12.10/Windows 8
                  CPU: Intel Core i7 2600K
                  Motherboard: Gigabyte GA-Z77X-UD5H
                  Memory: 2x4GB Corsair Dominator
                  Graphics Card: MSI R7770
                  Monitor: Dell 2208WFP
                  Mouse: Mionix NAOS 5000
                  PSU: Corsair 520HX
                  Case: Thermaltake Mozart TX
                  Cooling: Thermalright TRUE Black Ultra-120 eXtreme CPU Heatsink Rev C
                  Hard Drives: 1x180 GB Intel 330 SSD - 1xWD 1 TB Caviar Black - 1xWD 2 TB Caviar Green - 2xWD 3 TB Caviar Green

                  Comment


                    #10
                    Last guess: those disks might have an MBR that contains the Windows stub boot loader. Possibly they came from the factory that way? Not sure, really.

                    If you're feeling especially venturesome, you can erase the bootstrap loader but retain the partition table with some creative use of dd:
                    Code:
                    sudo dd if=/dev/zero of=/dev/sda bs=446 count=1
                    The MBR is 512 bytes. The first 446 bytes hold the MBR bootstrap loader. The remaining 66 bytes contain the partition table, which you don't want to erase.

                    Comment


                      #11
                      Originally posted by SteveRiley View Post
                      If you're feeling especially venturesome,
                      How venturesome? lol I know there are some MBR tools out there. Would one of them possibly be able to provide more info about the boot sector? Isn;t it possible to write a whole new mbr with out risking the data?

                      Possibly they came from the factory that way?
                      It was a warranty replacement from WD after my old 2TB SATA II died..so that seems to be the only logical explanation imo. This drive as been used for data storage only since Day 1.
                      OS: Kubuntu 12.10/Windows 8
                      CPU: Intel Core i7 2600K
                      Motherboard: Gigabyte GA-Z77X-UD5H
                      Memory: 2x4GB Corsair Dominator
                      Graphics Card: MSI R7770
                      Monitor: Dell 2208WFP
                      Mouse: Mionix NAOS 5000
                      PSU: Corsair 520HX
                      Case: Thermaltake Mozart TX
                      Cooling: Thermalright TRUE Black Ultra-120 eXtreme CPU Heatsink Rev C
                      Hard Drives: 1x180 GB Intel 330 SSD - 1xWD 1 TB Caviar Black - 1xWD 2 TB Caviar Green - 2xWD 3 TB Caviar Green

                      Comment


                        #12
                        Here's the structure of an MBR:



                        As you can see, it has two principal parts: the bootstrap loader and the partition table. Since you aren't booting from either of those hard drives, the bootstrap loader portion should be empty. dd-ing zeros into the first 446 bytes will take care of that. The partition table itself is preserved.

                        The beauty of dd is its power: you could always back up the entire MBR first, in case something goes wrong:
                        Code:
                        sudo dd if=/dev/sda of=save.mbr bs=512 count=1
                        You can then take a look at it:
                        Code:
                        od -xa save.mbr
                        Then, should you need to, you can restore it:
                        Code:
                        sudo dd if=save.mbr of=/dev/sda bs=512 count=1
                        I did a bit of Googling, and it looks like these techniques have been used to solve what appears to be your specific problem. See "MBR Tricks with Linux".
                        Last edited by SteveRiley; Jun 24, 2012, 10:46 PM.

                        Comment


                          #13
                          Well I took your advice and zeroed out the portion of the mbr...and rebooted..and it still presented me with GRUB showing 2 instances of Windows 7 Loader...sda and sdb. I do not recall if sdb showed up last time or not. sdb has never had windows on it either..:s
                          Last edited by Xplorer4x4; Jun 24, 2012, 11:57 PM.
                          OS: Kubuntu 12.10/Windows 8
                          CPU: Intel Core i7 2600K
                          Motherboard: Gigabyte GA-Z77X-UD5H
                          Memory: 2x4GB Corsair Dominator
                          Graphics Card: MSI R7770
                          Monitor: Dell 2208WFP
                          Mouse: Mionix NAOS 5000
                          PSU: Corsair 520HX
                          Case: Thermaltake Mozart TX
                          Cooling: Thermalright TRUE Black Ultra-120 eXtreme CPU Heatsink Rev C
                          Hard Drives: 1x180 GB Intel 330 SSD - 1xWD 1 TB Caviar Black - 1xWD 2 TB Caviar Green - 2xWD 3 TB Caviar Green

                          Comment


                            #14
                            Did you run
                            Code:
                            sudo update-grub
                            before you rebooted?

                            Comment


                              #15
                              Nope but I dont think it matters, I can reboot just to be sure but..
                              xplorer4x4@xplorer4x4-MS-7673:~$ sudo update-grub
                              Generating grub.cfg ...
                              Found linux image: /boot/vmlinuz-3.2.0-25-generic
                              Found initrd image: /boot/initrd.img-3.2.0-25-generic
                              Found linux image: /boot/vmlinuz-3.2.0-24-generic
                              Found initrd image: /boot/initrd.img-3.2.0-24-generic
                              Found linux image: /boot/vmlinuz-3.2.0-23-generic
                              Found initrd image: /boot/initrd.img-3.2.0-23-generic
                              Found memtest86+ image: /boot/memtest86+.bin
                              Found Windows 7 (loader) on /dev/sda1
                              Found Windows 7 (loader) on /dev/sdb1
                              done
                              BTW, thanks for all the help Steve.
                              Last edited by Xplorer4x4; Jun 25, 2012, 12:14 AM.
                              OS: Kubuntu 12.10/Windows 8
                              CPU: Intel Core i7 2600K
                              Motherboard: Gigabyte GA-Z77X-UD5H
                              Memory: 2x4GB Corsair Dominator
                              Graphics Card: MSI R7770
                              Monitor: Dell 2208WFP
                              Mouse: Mionix NAOS 5000
                              PSU: Corsair 520HX
                              Case: Thermaltake Mozart TX
                              Cooling: Thermalright TRUE Black Ultra-120 eXtreme CPU Heatsink Rev C
                              Hard Drives: 1x180 GB Intel 330 SSD - 1xWD 1 TB Caviar Black - 1xWD 2 TB Caviar Green - 2xWD 3 TB Caviar Green

                              Comment

                              Working...
                              X