Page 5 of 10 FirstFirst ... 34567 ... LastLast
Results 41 to 50 of 96

Thread: Trouble dual booting 12.2 and Windows 7 on EFI enabled system

  1. #41

    Default Re: Trouble dual booting 12.2 and Windows 7 on EFI enabled system

    You could also try the following on a (booting) WIndows UEFI system with (wrong) protective MBR:

    • Boot a linux live system and save the MBR to file
      Code:
      # dd if=/dev/sda of=/tmp/mbr.win bs=512 count=1
    • Copy this file to an external medium
    • Install openSUSE (and it might create a hybrid MBR)
    • Boot openSUSE (it should work)
    • Save the new MBR to file
    • Restore Windows protective MBR
    • Boot Windows (it might work)
    • Boot openSUSE (Does it still boot?)


    One could also play with the two MBRs. Actually the old Legacy Grub could have worked around this problem thanks to the partnew command, which has been dropped in Grub2. This is the command I miss the most in Grub2. Something like that would have worked:

    Code:
    # Don't try the code below, as this command doesn't exist!!! 
    
    menuentry 'Windows' { 
    partnew (hd0,1)   0xee 1  4294967295 
    .....
    .....
    }
    
    menuentry 'openSUSE' { 
    partnew (hd0,1)   0xee 1  xxxx 
    ....
    ....
    }
    xxxx being the size of the EFI partition in hybrid MBR. Notice that the 32bit value in the MBR partition table refers to the size and NOT to the end sector (this could allow tricks, such as using a 4 TB hard disk on BIOS system with traditionnal MBR). The code above is of course pure science fiction. I'm using Grub2 numbering for the partition - should actually have been (hd0,0) - and the partnew command doesn't exist any more (bummer! I use it a lot).

  2. #42
    Join Date
    Sep 2012
    Posts
    4,976

    Default Re: Trouble dual booting 12.2 and Windows 7 on EFI enabled system

    Quote Originally Posted by please_try_again View Post
    Also gdisk has options to

    • create a new protective MBR

    Maybe one could just boot a linux live CD on a WIndows UEFI machine, install gdisk if it's not already there, backup the MBR + GPT, create a new ('correct') protective MBR, see if WIndows still boots.
    Yes, it does. I extensively tested different scenarios under VMware VM (yes, it can UEFI!) and using gdisk fixed it in all cases. I think you do not even need rescue DVD, you can just install gdisk under openSUSE and do it from there. I used System Rescue CD - it has native support for UEFI boot which is quit handy on systems without legacy boot support (like VMware VM )

    First time you boot after fixing protective MBR Windows will ask if you want to start in recovery mode. Do not do it under any conditions! Perform normal boot. Default openSUSE partitioning scheme creates second EFI System Partition instead of reusing existing one. If you accepted it, it makes Windows BCD* tools very unhappy. It is still possible to fix it after that, but it is another story.

    Rewriting protective MBR is one time action. I tested Windows Disk Management, and it does not touch protective MBR when adding new partitions. Also openSUSE parted will from now on treat it as standard, non-hybrid, GPT.

    I was about to write detailed article describing all steps with screenshots etc, but cannot find where I can create new article. May be I am not trusted enough to do it

    P.S. and of course you are advised to use gdisk before installing openSUSE. In this case you won't have any issues at all. In this case you will need rescue CD, openSUSE installation DVD won't do as it does not include gdisk.

  3. #43
    Join Date
    Sep 2012
    Posts
    4,976

    Default Re: Trouble dual booting 12.2 and Windows 7 on EFI enabled system


  4. #44

    Default Re: Trouble dual booting 12.2 and Windows 7 on EFI enabled system

    Quote Originally Posted by arvidjaar View Post
    I was about to write detailed article describing all steps with screenshots etc, but cannot find where I can create new article. May be I am not trusted enough to do it
    AFAIK I'm the only regular user to have this privilege. But let us do it together if you don't mind! It is worth it.

    Quote Originally Posted by arvidjaar View Post
    P.S. and of course you are advised to use gdisk before installing openSUSE. In this case you won't have any issues at all. In this case you will need rescue CD, openSUSE installation DVD won't do as it does not include gdisk.
    Could you post step by step instructions in this thread? Please keep in mind that people who don't know what we are talking about should be able to follow them!

    Quote Originally Posted by wkolar View Post
    I will try that test, loading windows and then booting a live cd to add a partition, and see how win7 handles it. But I can't do it until Monday. I appreciate all the good advice and info that I've seen here, and I neglected to thank y'all in my previous post. Thank you all.
    and @wkolar, could you please apply this method on real hardware and report here? If so, don't forget to specify which hardware you used (including UEFI BIOS version and revision).

  5. #45
    Join Date
    Sep 2012
    Posts
    4,976

    Default Re: Trouble dual booting 12.2 and Windows 7 on EFI enabled system

    Quote Originally Posted by please_try_again View Post
    Could you post step by step instructions in this thread? Please keep in mind that people who don't know what we are talking about should be able to follow them!
    Well ... to be honest, I think that people who don't know what we are talking about should wait until (if) fixed installation media will be available ... anyway, here you are. This is immediately after installing Windows 7 x86_64. During installation I opted to create 30GB partition (to leave space for Linux), Windows automatically created EFI System Partition and Microsoft System Reserved partition.

    1. Get SystemRecueCd (latest version); burn it on CD. Insert in CD/DVD driver. The following example is made with it. Home page: SystemRescueCd
    2. Use UEFI boot manager to boot from CD. This is system dependent, but you are likely to have something similar to below (here was supposed to be image, but I am limited to 4 images only ...)
    3. Select Boot Manager - EFI CD
      (here was supposed to be image but I am limited to 4 images only ...)
    4. Select default (first) boot menu, it is enough; we need just a couple of commands, no need to start fancy GUI for that.
    5. Verify partitions on your disk using fdisk. Only disks that have exactly one single partition of type ee (GPT) starting at sector 1 and ending at sector 4294967295 need following procedure applied! Do not touch other disks!
    6. Recheck using gdisk. It should show "GPT: present" and "MBR: protective". If anything different - do not touch this disk.
    7. Now use gdisk to rewrite protective MBR. Start gdisk, use 'x' to select advanced commands, use 'n' to rewrite MBR. May use 'o' to display it. Use 'w' to write it back.
    8. Reboot and install openSUSE 12.2.


    Actually, the same steps are needed to fix it if damage was already done. As mentioned, when asked by Windows whether to boot in repair mode it is better to boot normally.

  6. #46

    Default Re: Trouble dual booting 12.2 and Windows 7 on EFI enabled system

    Quote Originally Posted by arvidjaar View Post
    Well ... to be honest, I think that people who don't know what we are talking about should wait until (if) fixed installation media will be available ...
    But they won't. Thanks a lot, @arvidjaar. It is good stuff.

    Quote Originally Posted by arvidjaar View Post
    This is immediately after installing Windows 7 x86_64. During installation I opted to create 30GB partition (to leave space for Linux), Windows automatically created EFI System Partition and Microsoft System Reserved partition.
    Just a few more questions: what would you do on a system that comes with Windows preinstalled - hopefully with GPT? This is the most common case ... although the most common case I have seen until now was a legacy (MBR) installation despite UEFI hardware... but it might have changed already. Would you shrink the Windows partition under Windows using disk manager (or whatever it is called)? Would you leave this space blank and later let openSUSE create its partitions? Or would you create the partitions under Windows, leave them unformated and select them (after selecting "Create Partiton Setup") while installing openSUSE. In other words, who is going to write the GPT headers, Windows or Linux? And does it matter at all? (Remember that we don't know what we are doing! )

    Do Linux partitions created by openSUSE setup still have the same GUID as the Window data partition? See this example:

    Code:
    # lspart
    Dev  Boot Maj Min  Bsize/Start         Size    Fs                                    ID    Ver   Model/Mount
    
    sda         8   0        512 B       111.79 GiB                                     gpt    ata   ADATA_SSD_S510_120GB
    sda1        8   1         2048       204800  vfat  C12A7328-F81F-11D2-BA4B-00A0C93EC93B  FAT32 
    sda2        8   2       206848       262144     -  E3C9E316-0B5C-4DB8-817D-F92DF00215AE      - 
    sda3        8   3       468992    233971712  ntfs  EBD0A0A2-B9E5-4433-87C0-68B6B72699C7      - 
    
    sdb         8  16        512 B       111.79 GiB                                     gpt    ata   ADATA_SSD_S510_120GB
    sdb1        8  17         2048       319488  vfat  C12A7328-F81F-11D2-BA4B-00A0C93EC93B  FAT32   /boot/efi
    sdb2        8  18       321536      4208640  swap  0657FD6D-A4AB-43C4-84E5-0933C84B4F4F      2 
    sdb3        8  19      4530176     83892224  ext4  EBD0A0A2-B9E5-4433-87C0-68B6B72699C7    1.0   /export/nfs4, /
    sdb4        8  20     88422400    146018304  ext4  EBD0A0A2-B9E5-4433-87C0-68B6B72699C7    1.0   /home, /export/nfs4/home
    * lspart is a simple bash script available in my repo (http://forums.opensuse.org/english/o...ghlight=lspart)

  7. #47
    Join Date
    Sep 2012
    Posts
    4,976

    Default Re: Trouble dual booting 12.2 and Windows 7 on EFI enabled system

    Quote Originally Posted by please_try_again View Post
    Would you shrink the Windows partition under Windows using disk manager (or whatever it is called)?
    I would definitely use native Windows tools to manipulate Windows filesystems if it is possible.

    Would you leave this space blank and later let openSUSE create its partitions?
    Leaving space is simpler; you can let openSUSE to partition disk automatically. The only problem as I already mentioned several times is creation of second EFI system partition. I filed bug report for this.

    In other words, who is going to write the GPT headers, Windows or Linux? And does it matter at all?
    I do not see that it matters, as long as both are compliant. Of course, the very problem we discuss stems from the fact that Windows is not compliant here ...

    Do Linux partitions created by openSUSE setup still have the same GUID as the Window data partition?
    Yes. Although Wikipedia suggests that there is Linux specific partition GUID, parted (which is primary tool in case of openSUSE) still is using Windows basic data GUID.

  8. #48
    Join Date
    Sep 2012
    Posts
    4,976

    Default Re: Trouble dual booting 12.2 and Windows 7 on EFI enabled system

    Quote Originally Posted by please_try_again View Post
    although the most common case I have seen until now was a legacy (MBR) installation despite UEFI hardware...
    This may be part of problem, but it needs something that supports both legacy and UEFI boot to test. My example above was for native UEFI. But I think someone earlier mentioned Windows entries in grub2 menu. This suggests MBR Windows indeed, because os-prober does not even support UEFI system partition for now and have no way to add Windows to grub2 menu on native UEFI installation.

  9. #49

    Default Re: Trouble dual booting 12.2 and Windows 7 on EFI enabled system

    Quote Originally Posted by arvidjaar View Post
    Leaving space is simpler; you can let openSUSE to partition disk automatically.
    I would never do nor advise that. IMO being able to select and mount partitions yourself is the minimal requirement if you're going to multi boot. If people are not willing do to that, they should stick with a single operating system.

    Quote Originally Posted by arvidjaar View Post
    The only problem as I already mentioned several times is creation of second EFI system partition.
    I'm not aware of this problem. Do you mean that the automatic partitioning would create a second ESP? One more reason to create the partitions yourself ("Create partition setup") and mount the existing ESP in /boot/efi. But maybe that's not what you mean here. (?)

  10. #50
    Join Date
    Sep 2012
    Posts
    4,976

    Default Re: Trouble dual booting 12.2 and Windows 7 on EFI enabled system

    Quote Originally Posted by please_try_again View Post
    Do you mean that the automatic partitioning would create a second ESP?
    Yes, I do.

Page 5 of 10 FirstFirst ... 34567 ... LastLast

Posting Permissions

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