Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: UEFI 12.04_AMD64 - Win7 dual boot problems

  1. #1
    Join Date
    May 2006
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    UEFI dual boot trouble: Win7x64 - Ubuntu 12.04 LTS amd64

    I'm trying to create a dual boot system. I bought new hardware with Win7 64bit (a UEFI capable BIOS but with a System Reserved boot partition) pre-installed. I repartitioned my drive (with gparted) and did a fresh install of Ubuntu desktop 12.04 amd64 LTS with the live CD.

    During installation I selected to install Grub into the MBR of sda (the alternative options sda1-sda9 made no sense to me). Now my computer still boots straigt into Windows. I've been reading up on UEFI-GTP for a day, but things are getting more fuzzy than clear. I'm new to UEFI and GPT, is there a simple and safe solution to make this dual boot work?

    I attached bootinfo-script results (ignore thumbdrive sdd) and grub entries from the install syslog file to this question. Any help would be much appreciated.

    Here's a quick overview of sda:
    Code:
    (parted) print 
    Model: ATA WDC WD10EADX-22T (scsi)
    Disk /dev/sda: 1000GB
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos
    
    Number  Start   End     Size    Type      File system     Flags
     1      1049kB  16.1GB  16.1GB  primary   ntfs            diag
     2      16.1GB  16.2GB  105MB   primary   ntfs            boot
     3      16.2GB  177GB   161GB   primary   ntfs
     4      177GB   1000GB  823GB   extended
     5      177GB   182GB   5046MB  logical   ntfs
     6      182GB   189GB   6443MB  logical   linux-swap(v1)
     7      189GB   242GB   53.7GB  logical   ext4
     8      242GB   247GB   5046MB  logical   ext4
     9      248GB   1000GB  753GB   logical   ntfs
    
    
    Drive: sda _____________________________________________________________________
    
    Disk /dev/sda: 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
    
    Partition  Boot  Start Sector    End Sector  # of Sectors  Id System
    
    /dev/sda1               2,048    31,459,327    31,457,280  27 Hidden NTFS (Recovery Environment)  [OEM recovery partition]
    /dev/sda2    *     31,459,328    31,664,127       204,800   7 NTFS / exFAT / HPFS                 [Appearantly the Win7x64 boot loader partition]
    /dev/sda3          31,664,128   346,236,927   314,572,800   7 NTFS / exFAT / HPFS                 [Win7x64 installation/system partition]
    /dev/sda4         346,236,928 1,953,523,711 1,607,286,784   5 Extended                            [Container for logical partitions]
    /dev/sda5         346,238,976   356,093,951     9,854,976   7 NTFS / exFAT / HPFS                 [Data partition]
    /dev/sda6         356,096,000   368,680,959    12,584,960  82 Linux swap / Solaris                [Linux swap partition]
    /dev/sda7         368,683,008   473,540,607   104,857,600  83 Linux                               [Ubuntu 12.04 root partition]
    /dev/sda8         473,542,656   483,397,631     9,854,976  83 Linux                               [Linux /home partition]
    /dev/sda9         483,399,680 1,953,523,711 1,470,124,032   7 NTFS / exFAT / HPFS                 [Data partition]
    I did some further digging and what happened here?
    Code:
    # gdisk /dev/sda
    GPT fdisk (gdisk) version 0.8.1
    
    Partition table scan:
      MBR: MBR only
      BSD: not present
      APM: not present
      GPT: not present
    
    
    ***************************************************************
    Found invalid GPT and valid MBR; converting MBR to GPT format.
    THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by typing 'q' if
    you don't want to convert your MBR partitions to GPT format!
    ***************************************************************
    Could this be the result of grub from the live CD trying to install itself in the MBR of sda?
    Should / can I fix this?

    Here's the solution.
    Attached Files Attached Files
    Last edited by martinr; June 16th, 2012 at 09:19 AM. Reason: Added link to solution
    To fail to prepare is to prepare to fail.

  2. #2
    Join Date
    May 2011
    Beans
    33

    Re: UEFI-GPT dual boot trouble: Win7x64 - Ubuntu 12.04 LTS amd64

    ATA WDC WD10EADX-22T (scsi) - 1TB - is a MBR disk. (Not a GPT disk).

    Your computer should have the option to switch between BIOS or UEFI firmware.
    -------------------------------------------------------
    If BIOS is selected then first disk listed in BIOS must be a MBR disk.
    Whatever code is placed in MBR it is loaded and executed after BIOS POST.
    a) if Windows based this code loads code from active partition boot record and executes it.
    b) If GRUB based this code looks for next stage of GRUB code located on disk based on partition offset, loads it and executes it.

    ----------------------------------------------------------------------------
    If UEFI is selected then a disk in the system must be a GPT disk holdind a GPT "System Partition" which contains OS specific EFI boot manager(Windows bootmgr.efi or efi boot manager from another OS)

    The firmware executes UEFI boot manager(contained in UEFI) which in turn loads either Windows boot manager or another boot manager (for example GRUB) if installed.
    UEFI does not use boot records (MasterBR, PartitionBR, VolumeBR).

    UEFI boot manager can also load and execute another OS specific efi boot manager from removable (CD, DVD, USB) EFI (installation) media (so you can install a specific OS on hard disk).
    --------------------------------------------------------------------------------
    Hope this small explanation on boot sequences for BIOS and EFI can help you further.

    I think your firmware must be switched to BIOS at the moment as you have a MBR disk with Windows 7 installed which is also booting OK.

    You have two options:
    1. Add Ubuntu installation to Windows boot menu.
    2. Run Ubuntu installation media and reinstall / repair grub to MBR. Reinstalling would also create a dual-boot menu (grub based) for Ubuntu and Windows 7.

    Adding Ubuntu to Windows 7 boot menu goes like this:
    1. copy file /boot/grub/boot.img (from Ubuntu) to a Windows folder say "c:\".
    2. create a boot sector loader (in BCD) with drive and path pointing to c: and "\boot.img". You could use Visual BCD Editor for creating boot sector loader and amending drive and path.

  3. #3
    Join Date
    May 2011
    Beans
    33

    Re: UEFI-GPT dual boot trouble: Win7x64 - Ubuntu 12.04 LTS amd64

    Can you post a screenshot of Windows 7 Disk Management to see how Windows 7 sees disk an partitions at the moment ?

  4. #4
    Join Date
    May 2006
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: UEFI 12.04_AMD64 - Win7 dual boot problems

    Thanks Darko,

    Your overview helps a lot.
    It seems I have a bit of both?!

    The contents of sda2 are:
    Code:
    /dev/sda2       100M   25M   76M  25% /media/SYSTEM RESERVED
    
    root@ubuntu:/media/SYSTEM RESERVED# ls
    Boot  bootmgr  BOOTSECT.BAK  System Volume Information
    Upon power up, I can select a boot device by pressing F12 and see an UEFI CDROM option or my HD (no Ubuntu of Grub). In the BIOS I haven't seen an MBR/EFI switch at all (I'll take a picture the next time I'm in there).

    On the MS forums I read that Win7x64 uses EFI + GPT to boot.

    Could it be that the 12.04 Live CD install have bluntly overwritten the MBR area? How could I check this?

    Before repartitioning I found this:
    Code:
    Model: ATA WDC WD10EADX-22T (scsi)
    Disk /dev/sda: 1953525168s
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos
    
    Number  Start       End          Size        Type     File system  Flags
     1      2048s       31459327s    31457280s   primary  ntfs         diag
     2      31459328s   31664127s    204800s     primary  ntfs         boot
     3      31664128s   992057343s   960393216s  primary  ntfs
     4      992057344s  1953521663s  961464320s  primary  ntfs
    After repartitioning and pre 12.04 install, I had this:
    Code:
    Model: ATA WDC WD10EADX-22T (scsi)
    Disk /dev/sda: 1953525168s
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos
    
    Number  Start       End          Size         Type      File system     Flags
     1      2048s       31459327s    31457280s    primary   ntfs            diag
     2      31459328s   31664127s    204800s      primary   ntfs            boot
     3      31664128s   346236927s   314572800s   primary   ntfs
     4      346236928s  1953523711s  1607286784s  extended
     5      346238976s  356093951s   9854976s     logical   ntfs
     6      356096000s  368680959s   12584960s    logical   linux-swap(v1)
     7      368683008s  473540607s   104857600s   logical   ext4
     8      473542656s  483397631s   9854976s     logical   ext4
     9      483399680s  1953523711s  1470124032s  logical   ntfs
    There is a firmware way of starting the recovery partition by pressing <ALT>+F10 during boot. This doesn't start grub either.
    Last edited by martinr; June 14th, 2012 at 03:36 PM.
    To fail to prepare is to prepare to fail.

  5. #5
    Join Date
    May 2006
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: UEFI-GPT dual boot trouble: Win7x64 - Ubuntu 12.04 LTS amd64

    Quote Originally Posted by darkomano View Post
    Can you post a screenshot of Windows 7 Disk Management to see how Windows 7 sees disk an partitions at the moment ?
    I will. (from memory I can remenber that it is not a dynamic disk and that I wasn't able to convert it to GPT).

    I'm currently working of this rig with a live CD, heavily apt-getted with diag tools, that's why I can't get into the BIOS or Win7x64 right now.

    I've done many dual boot installs in the past and blindly trusted on my good experience with Ubuntu, but now I've gotten a little worried of losing the #$%^ factory pre-installed stuff without recovery CDs nor documentation.

    Never a dull moment whilst boldly installing a new OS.
    To fail to prepare is to prepare to fail.

  6. #6
    Join Date
    May 2011
    Beans
    33

    Re: UEFI 12.04_AMD64 - Win7 dual boot problems

    There is a "System Reserved" partition which Microsoft/Windows 7/Vista creates on MBR disks - this partition is usually hidden and 100-200MB in size. It contains usually bootmgr and \boot folder with BCD store inside.

    This MBR "System Reserved" must not be confused with GPT System Partition !
    They have similar roles but a MBR partition is not a GPT partition !

    A MBR disk can have only MBR partitions.
    A GPT disk can have only GPT partitions.

  7. #7
    Join Date
    May 2006
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: UEFI-GPT dual boot trouble: Win7x64 - Ubuntu 12.04 LTS amd64

    According to Oldfred:
    Quote Originally Posted by oldfred View Post
    If you have the new UEFI type BIOS then you should with both Windows or Ubuntu get two choices from the install CD/DVD. One would be legacy/BIOS/MBR and the other UEFI/efi.

    You have to choose the same for both Windows & Ubuntu. Windows will only boot from gpt partitioned drives with UEFI, but Windows normally still is installed in old BIOS/MBR mode. So then you need to install Ubuntu in BIOS/MBR mode.

    Two things tell if UEFI. One is drive will be partitioned with gpt(GUID) not MBR(msdos). The other is the first partition should be the efi partition.

    Only if drive does not have Windows (Linux only) can you create a gpt partition scheme and boot with BIOS but then you also need an extra 1MB bios_grub partition.
    origin

    That would indicate that I have the BIOS/MBR boot sequence, but why didn't grub appear then, when it installed itself to the MBR of sda? I only had the choices: sda, sda1-sda9 (except sda4).

    Furthermore at boot time I can select the boot device with F12 and the only things I can see are:
    1. UEFI CD/DVD
    2. HD0
    3. CD/DVD


    Furthermore why is there a separate and active boot partition in sda2? Where windows seems to bootstrap from?

    The world used to be so simple.
    To fail to prepare is to prepare to fail.

  8. #8
    Join Date
    May 2006
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: UEFI 12.04_AMD64 - Win7 dual boot problems

    Quote Originally Posted by darkomano View Post
    There is a "System Reserved" partition which Microsoft/Windows 7/Vista creates on MBR disks - this partition is usually hidden and 100-200MB in size. It contains usually bootmgr and \boot folder with BCD store inside.

    This MBR "System Reserved" must not be confused with GPT System Partition !
    They have similar roles but a MBR partition is not a GPT partition !

    A MBR disk can have only MBR partitions.
    A GPT disk can have only GPT partitions.
    Okay, that should settle the matter that it is an MBR partition and hence the BIOS/MBR bootstrap method should be in effect.

    Then I still don't understand why I won't see grub appear? I configured it to install itself into the MBR of sda (note that sda2 is active).

    (Why did Win7x64 need a separate boot partition (sda2)??)
    To fail to prepare is to prepare to fail.

  9. #9
    Join Date
    May 2011
    Beans
    33

    Re: UEFI-GPT dual boot trouble: Win7x64 - Ubuntu 12.04 LTS amd64

    UEFI/GPT I think is still in development and not used very much. New computers come with UEFI but with possibilty to switch to BIOS.

    On forums you can get more help if you stick with BIOS/MBR. There are also much more guides addressing old BIOS/MBR dual boots.

    I am not sure there are many people understanding EFI/GPT and EFI dual booting really - I have not done EFI dual booting either.

    ----------------------------------------------------------------------
    Windows 7 creates the "System Reserved" partition to separate boot related files from the rest of OS for one main reason:
    Boot files cannot be encrypted !
    (and because the partition is hidden the boot files are better protected)

    You could encrypt the OS partition but the "boot" partition must stay unencrypted.
    Windows boot files must be on an "active" partition or you cannot boot.

    --------------------------------------
    One possible explanation for grub not being written to MBR is:
    Maybe there is an option in BIOS to protect MBR - a user should have the possibility to unprotect.
    Last edited by darkomano; June 14th, 2012 at 04:19 PM. Reason: added explanation for possible reason grub not appearing.

  10. #10
    Join Date
    May 2006
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: UEFI-GPT dual boot trouble: Win7x64 - Ubuntu 12.04 LTS amd64

    Quote Originally Posted by darkomano View Post
    UEFI/GPT I think is still in development and not used very much. New computers come with UEFI but with possibilty to switch to BIOS.

    On forums you can get more help if you stick with BIOS/MBR. There are also much more guides addressing old BIOS/MBR dual boots.

    I am not sure there are many people understanding EFI/GPT and EFI dual booting really - I have not done EFI dual booting either.

    ----------------------------------------------------------------------
    Windows 7 creates the "System Reserved" partition to separate boot related files from the rest of OS for one main reason:
    Boot files cannot be encrypted !
    (and because the partition is hidden the boot files are better protected)

    You could encrypt the OS partition but the "boot" partition must stay unencrypted.
    Windows boot files must be on an "active" partition or you cannot boot.

    --------------------------------------
    One possible explanation for grub not being written to MBR is:
    Maybe there is an option in BIOS to protect MBR - a user should have the possibility to unprotect.
    Of course, thanks!

    I've looked for that already, but I'll look again. For my understanding, there is only one MBR on a disk, isn't there?
    Does it matter for Grub that sda2 is active?

    How can I re-install GRUB in the MBR (resuming my broken dual boot installation)?
    Is there another way to start Grub? from Win7 for example? (It used to work with boot.ini files.)
    Last edited by martinr; June 14th, 2012 at 04:29 PM.
    To fail to prepare is to prepare to fail.

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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