Page 8 of 10 FirstFirst ... 678910 LastLast
Results 71 to 80 of 96

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

  1. #71

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

    Quote Originally Posted by wkolar View Post
    Is there any reason to mount the ESP in /boot/efi? It has seemed that the auto-create grub2 bootentry for win7 is always wrong, and I will need to hand create a true bootentry in 40_custom (as per your instructions) anyway.
    It has nothing to do with the Windows boot entry. You need an ESP to put the Grub bootloader. What else do you propose? (Scroll up the thread about having Linux create another ESP).

    Quote Originally Posted by wkolar View Post
    One last question. Is it accepted that if/when the opensuse12.2 install creates or repartitions the disk, it will cause the win7 boot to fail? Is it because the 12.2 install creates a hybrid partition?
    Yes, because the Windows protective MBR is not fully compliant. But you fixed it before installing openSUSE. Thus it should not create an hybrid MBR. That's the point.

  2. #72
    Join Date
    Sep 2012
    Posts
    5,127

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

    Quote Originally Posted by wkolar View Post
    It has seemed that the auto-create grub2 bootentry for win7 is always wrong
    This is again something I cannot reproduce.

    The problem is that os-prober does not really support UEFI at this time (nor am I even sure if GRUB2 can load another UEFI program; need to check). So bootentry that are added are for legacy Windows bootloader that of course will not work when booted in native UEFI. But that means that for some reasons Windows has legacy bootloader as well. When I did native UEFI Windows 7 installation, no legacy bootloader was present (files/directories bootmgr and boot on Windows boot drive) so I am unable to follow this issue further.

  3. #73

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

    Quote Originally Posted by please_try_again View Post
    It has nothing to do with the Windows boot entry. You need an ESP to put the Grub bootloader. What else do you propose? (Scroll up the thread about having Linux create another ESP).
    I didn't quite understand about the 2nd ESP earlier. I did have the win7 ESP at sda1, and then I mounted /boot at sda4 (fat32) for linux, which I thought was a second ESP. That seemed to work fine for me, in that I could use UEFI system menu to boot the win7 bootmanager, or the opensuse grub2 manager. Initially I was mounting the win7 ESP sda1 at linux /boot/efi, but there didn't seem to be any need to do so. Since I was hand-editing the 40_custom to get the win7 bootloader, I didn't need to have win7 ESP sda1 mounted in linux. So I had 2 ESP's and they seemed to be independent and still worked. Is this bad form and out-of-spec? There should be just a single ESP, and make the opensuse12.2 install write into into the original win7 ESP at sda1? As you can tell I am still fuzzy about this.


    Quote Originally Posted by please_try_again View Post
    Yes, because the Windows protective MBR is not fully compliant. But you fixed it before installing openSUSE. Thus it should not create an hybrid MBR. That's the point.
    Thanks, I think I finally understand that point.

    Quote Originally Posted by arvidjaar View Post
    This is again something I cannot reproduce.

    The problem is that os-prober does not really support UEFI at this time (nor am I even sure if GRUB2 can load another UEFI program; need to check). So bootentry that are added are for legacy Windows bootloader that of course will not work when booted in native UEFI. But that means that for some reasons Windows has legacy bootloader as well. When I did native UEFI Windows 7 installation, no legacy bootloader was present (files/directories bootmgr and boot on Windows boot drive) so I am unable to follow this issue further.
    Thanks, that makes sense that it is a legacy entry and won't work on a uefi system.

    I am using my win7 sys recovery dvds I made from the original system. They only boot in native UEFI on my system, which always has UEFI boots before legacy boots. I suspect that the dvds are created to match the mode they are created in. I can't turn off UEFI to see if they would boot legacy. But I do remember seeing a "boot" dir on the win7 ESP. I will list the dirs on that original ESP to verify that this win7 install has both efi and legacy loaders. I will also try (out of curiousity) to see if they will boot on an older legacy sys that has no uefi; I suspect not.

  4. #74

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

    Quote Originally Posted by please_try_again View Post
    How about just:

    1. shrinking the Windows partition under Windows (if needed)
    2. Booting a Linux live system with gparted and creating Linux partitions (if it fixes the protective MBR)
    3. Installing openSUSE (from DVD) in expert mode ("Create partition setup") and selecting the partitions (don't forget to mount the ESP in /boot/efi!)

    ?
    I did not understand properly.
    Does this procedure works (hence, does it fix the problem)?
    I would be particularly happy with it, because I usually follow this steps to install Linux ...

  5. #75

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

    Quote Originally Posted by PiElle View Post
    I did not understand properly.
    Does this procedure works (hence, does it fix the problem)?
    I would be particularly happy with it, because I usually follow this steps to install Linux ...
    Maybe. Try and find! You should fix the MBR *before* installing openSUSE. Otherwise - according to @arvidjaar's test - openSUSE will create an hybrid MBR and then, Windows won't boot.

  6. #76

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

    Quote Originally Posted by wkolar View Post
    I didn't quite understand about the 2nd ESP earlier. I did have the win7 ESP at sda1, and then I mounted /boot at sda4 (fat32) for linux, which I thought was a second ESP.
    This is wrong.
    1. You don't need a separate /boot partition.
    2. It can not be fat32.



    Donc confuse /boot with the EFI system partition (which gets mounted in /boot/efi)

    Quote Originally Posted by wkolar View Post
    That seemed to work fine for me, in that I could use UEFI system menu to boot the win7 bootmanager, or the opensuse grub2 manager.
    Absolutely. UEFI has a boot manager 'embedded' (and it can read boot loaders from more than one ESP). You can perfectly use the UEFI interface to multi boot. Under Linux, you can also use the command efibootmgr to set the next OS to boot (once). Thus you don't even need a WIndows boot entry in Grub menu to reboot Windows (But don't worry you'll get one).

    Quote Originally Posted by wkolar View Post
    Initially I was mounting the win7 ESP sda1 at linux /boot/efi, but there didn't seem to be any need to do so.
    Yes, please do!

    Quote Originally Posted by wkolar View Post
    Since I was hand-editing the 40_custom to get the win7 bootloader, I didn't need to have win7 ESP sda1 mounted in linux.
    That's correct. But the problem is having a second ESP since - according to @arvidjaar again, it's going to bother Windows if you need to repare it.

    Quote Originally Posted by wkolar View Post
    So I had 2 ESP's and they seemed to be independent and still worked.
    Yes it works, but don't do that with Windows. Windows is the one being the problem, as always.

    Quote Originally Posted by wkolar View Post
    Is this bad form and out-of-spec? There should be just a single ESP, and make the opensuse12.2 install write into into the original win7 ESP at sda1?
    Correct. AFAIK that's what WIndows requires (but it is not out-of-spec). Linux doesn't care.

  7. #77

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

    Looking at updateGrub2, it should create a Windows boot entry - I'm sure I did something like that, but I wrote this script a while ago and haven't tested it under 12.2 (UEFI).

    Here's the function which creates chainloader entries (if they don't already exist):

    Code:
    function efi_chainload {
    # look for Linux bootloaders in the ESP on UEFI systems
    for GREFI in $(find /boot/efi/EFI -name "$GRID" -o -name "$W7ID" 2>/dev/null | sed "/$BLID/d;s|Microsoft/Boot|windows|") ; do
    	UUID=$($gprobe --target=fs_uuid $GREFI)
    	t=$(echo ${GREFI%/*} | sed 's|.*/\(.\)\(.*\)|\U\1\E\2|')
    	[ "$t" == "Windows" ] && T="$t x86_64 UEFI-GPT" || T="$t Grub"
    	grep -q "$T" /etc/grub.d/40_custom && continue
    	echo "chainloading $t ..."
    	printf "\nmenuentry \"%s\" {\n    insmod part_gpt\n    insmod fat\n    insmod search_fs_uuid\n    insmod chain\n    search --fs-uuid --no-floppy --set=root %s\n    chainloader (\${root})%s\n}\n" "$T" "$UUID" "${GREFI/\/boot\/efi/}" >> $custom
    done
    }
    Give it a try! (updategrub is in my repo).


    You understand that it can only work if the Windows boot loader is in the mounted ESP (meaning you're using the same ESP for Windows an Linux). Otherwise we'd need to get os-prober looking for other ESPs - which wouldn't be difficult actually.

  8. #78

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

    Quote Originally Posted by please_try_again View Post
    Looking at updateGrub2, it should create a Windows boot entry - I'm sure I did something like that, but I wrote this script a while ago and haven't tested it under 12.2 (UEFI).

    Here's the function which creates chainloader entries (if they don't already exist):

    Code:
    function efi_chainload {
    # look for Linux bootloaders in the ESP on UEFI systems
    for GREFI in $(find /boot/efi/EFI -name "$GRID" -o -name "$W7ID" 2>/dev/null | sed "/$BLID/d;s|Microsoft/Boot|windows|") ; do
        UUID=$($gprobe --target=fs_uuid $GREFI)
        t=$(echo ${GREFI%/*} | sed 's|.*/\(.\)\(.*\)|\U\1\E\2|')
        [ "$t" == "Windows" ] && T="$t x86_64 UEFI-GPT" || T="$t Grub"
        grep -q "$T" /etc/grub.d/40_custom && continue
        echo "chainloading $t ..."
        printf "\nmenuentry \"%s\" {\n    insmod part_gpt\n    insmod fat\n    insmod search_fs_uuid\n    insmod chain\n    search --fs-uuid --no-floppy --set=root %s\n    chainloader (\${root})%s\n}\n" "$T" "$UUID" "${GREFI/\/boot\/efi/}" >> $custom
    done
    }
    Give it a try! (updategrub is in my repo).


    You understand that it can only work if the Windows boot loader is in the mounted ESP (meaning you're using the same ESP for Windows an Linux). Otherwise we'd need to get os-prober looking for other ESPs - which wouldn't be difficult actually.

    Well, as I'm sure you expected, I have dual booting working fine with the simple procedure of shrinking win7, booting live cd to then use gparted to make the linux partitions I would need for opensuse (which gparted automatically corrected the protective mbr to be correct and accurate), and then installing opensuse12.2 into those new partitions. I mounted the win7 esp into /boot/efi without allowing a reformat, and 12.2 came up fine. I then hand-added the correct win7 bootentry into 40_custom, remade grub.cfg and it all just works. I am embarrassed to say that the above sentence is a poorly worded summary of your well-written docs on dual-booting uefi/gpt.

    All of my problems came from the original bogus win7 protective mbr, which cascaded when I used the opensuse12.2 installer to create my partitions (as I've done for years) and it made a hybrid mbr from the bogus mbr. Simply using gparted to partition first, which automatically made a correct protective mbr, made everything work nicely. I was just used to always partitioning in the installer, and just could not understand what went wrong, not sticking exactly to your good docs about dual booting uefi.

    I will load up your repo and try out your updater to get an automatic correct win7 bootentry. I first have to get the eth0 going since 12.2 doesn't have a driver. I had to do this on 12.1 on this machine, but that driver doesn't work with this 12.2, so I'll need to get another later version, then I'll try it out.

    Thanks for your help and patience and good docs, and also arvidjaar and all the others who responded.

  9. #79

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

    Quote Originally Posted by wkolar View Post
    Well, as I'm sure you expected, I have dual booting working fine with the simple procedure of shrinking win7, booting live cd to then use gparted to make the linux partitions I would need for opensuse (which gparted automatically corrected the protective mbr to be correct and accurate), and then installing opensuse12.2 into those new partitions. I mounted the win7 esp into /boot/efi without allowing a reformat, and 12.2 came up fine.
    Good news! So you confirm that the following method works:

    1. shrinking the Windows partition under Windows (if needed)
    2. Booting a Linux live system with gparted and creating Linux partitions (if it fixes the protective MBR)
    3. Installing openSUSE (from DVD) in expert mode ("Create partition setup") and selecting the partitions (don't forget to mount the ESP in /boot/efi!)

    Which live CD and gparted version did you use?
    Did openSUSE 12.2 setup offer a multiple choice of boot managers, i.e lilo, elilo, grub, grub2 grub2-efi? Was "grub2" greyed out? IMO, it should be disabled to avoid confusion (and problems). I forgot to add in the few steps above that you have to install grub2-efi of course and not grub2.

    Quote Originally Posted by wkolar View Post
    I then hand-added the correct win7 bootentry into 40_custom, remade grub.cfg and it all just works.
    .../...
    I will load up your repo and try out your updater to get an automatic correct win7 bootentry.
    You don't need it anymore, because what it would have done is create the win7 boot entry that you already have in 40_custom. If this entry exists, it would not write it again, unless it doesn't understand the one you created, in this case it would just add a second one. But you're welcome to test it. In this case:

    • Make sure updategrub is a symlink pointing to updateGrub2. It seems to be wrong on UEFI systems and points to updateLegacyGrub. If so, overwrite the symlink:
      Code:
      $ su -l
      # cd /usr/bin
      # ln -sf updateGrub2 updategrub
    • Run updategrub with the -d option to display the menu on standard output instead of writing grub.cfg
      Code:
      # updategrub -d

    And please, be aware that I have NOT tested this script myself under 12.2.

    Quote Originally Posted by wkolar View Post
    All of my problems came from the original bogus win7 protective mbr, which cascaded when I used the opensuse12.2 installer to create my partitions (as I've done for years) and it made a hybrid mbr from the bogus mbr.
    Actually, for years - and even years and years - I never used openSUSE installer - nor any other Linux distro setup - to create partitions (which means writing the partition table), on BIOS systems as well. I always suggest to create the partitions first and select/format them during setup - under openSUSE, in "expert mode", after selecting "Create partition setup" - which doesn't necessarily implies creating partitions but (optionally) formating the ones you select. When you format a partition, you just change its content (put a new file system in it) but not its geometry (start sector and size). So no change is written to partition tables. The problem here was similar.

    Quote Originally Posted by wkolar View Post
    Thanks for your help and patience and good docs, and also arvidjaar and all the others who responded.
    Yes, you can thank @arvidjaar. He's the guy who discovered what the problem was. The rest was easy.

    I would still say that it's a bug because, although WIndows protective MBR is not UEFI compliant, what sense does it make to change it into a hybrid MBR? You only need a hybrid MBR if you want to add non GPT aware OSes on an EFI booting machine (such as Windows XP or Legacy Grub based Linux on Apple hardware) , which is not the case here. IMO the openSUSE partitioner should just fix the protective MBR instead.

  10. #80
    Join Date
    Sep 2012
    Posts
    5,127

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

    Actually it became easy after @wkolar mentioned that partition table was changed

    Bug report is filed, but my understanding is, media images are not updated, so people will be hit by this issue at least during 12.2 lifetime.

Page 8 of 10 FirstFirst ... 678910 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
  •