Problem to Install Windows after Installing Leap

I installed openSUSE with Secure Boot disabled and CSM enabled. Now that I try to install Windows 10, if I proceed with CSM enabled, Windows installation complains about partition style being GPT. If I disable CSM (with or without enabling secure boot), Windows installation DVD won’t even boot.

Any ideas?

My partitions are:

sda1: /boot/efi formatted as fat32
sda2: /boot formatted as ext2
sda3: encrypted LVM used by openSUSE
sda4: currently unformatted but planned to be used by Windows 10

Did you boot the Win10 media in EFI mode??

Also you may need more then one partition for Win10 so best not to have the sda4 partition just leave free space

Did you check the use secure boot box when you installed openSUSE? It does not hurt even if secure boot is off and is needed if secure boot is ever turned on.

Note it is always been better to install Windows first since it does not play nice with other OS

Did you boot the Win10 media in EFI mode??

I boot the media with secure boot disabled and CSM enabled. So I think the answer is yes.

Did you check the use secure boot box when you installed openSUSE?

I can’t remember checking any box related to secure boot when installing openSUSE. So if it’s not the default option, then no. I hope this won’t mean a fresh install is needed.

Note it is always been better to install Windows first since it does not play nice with other OS

I really wish to install openSUSE first…

Sorry, I meant no!

Hi
It is possible, just need some pre-planning of the partitions, but in your current state, I think you may be looking at a re-install (but see if others chip in).

Do you have WinX OEM install media, or is WinX going to be an upgrade?

Please tell me how should I set up partitions for it to work? What is the correct procedure?

Yes, it’s an installation Media.

Hi
For a fresh install, first ensure system is set for UEFI boot (secure boot off or on, user choice), then boot from an openSUSE 13.2 live rescue CD on USB.

Once booted to the rescue system (in UEFI mode), check via the following command and clean out efi entries;


su -
efibootmgr -v

Depending on above output I clean out any entries, for example say 0001 is windows and 0002 is openSUSE;


efibootmgr -b 1 -B 1
efibootmgr -b 0 -B 0

This should clear all the efi entries ready for the fresh install.

Next, clean out the drive (this is destructive to the data as we are re-partitiong etc), say it has 3 partitions;


lsblk
wipefs -a /dev/sda3
wipefs -a /dev/sda2
wipefs -a /dev/sda1
wipefs -a /dev/sda

Now, use gdisk to create a gpt drive (I always clean out the mbr first)


gdisk /dev/sda
w
gdisk /dev/sda
x
z
gdisk /dev/sda
n
create 1, size 260MB type ef00 (this is for /boot/efi)
create 2, size 128MB type 0c01
create 3, size 40GB type 8300 (/)
create 4, size XGB type 8300 (/home)
create 5, size XGB, type 8200(swap)
create 6, size XGB, type 0700 (for windows)
w

The single characters are the key commands eg w(rite) e(x)pert etc.

I format /dev/sda1 for efi;


mkfs.vfat /dev/sda1

Then carry out the install, when installing openSUSE I ensure I rescan the disks in expert partitioner, set /dev/sda1 as /boot/efi (no format) and finish the install. Reboot, etc (eg disable the install USB so only uses the online repos).

Install windows, now all you need to ensure is use a custom install and then select (in the above example /dev/sda6) to install windows. I will/should just use sda1 and create it’s directories for the windows install.

Now if you BIOS UEFI can select boot order, then set openSUSE to boot first. Then once in openSUSE, fire up YaST bootloader and ensure os-prober check box is selected, save and this should add the windows entry. Also open a teminal and change to root user and check efi entries are all ok (the very first step above). The openSUSE entry should be 0000, if not you can change the boot order with the -o option.

Do you have 32 or 64 bit Windows?

I’m trying to install 64 bit version.

I would like to have an encrypted LVM for openSUSE, with seperate home and swap. Can you please modify the above code to reflect this?

Add a /boot about 500 meg add an encrypted LVM as big as you want for Linux and put swap / and /home in the LVM

Leave free space for Windows.

But it is always easiest to install Windows first and leave space for Linux

There are installation media that contain 64 bit Windows but only 32 bit EFI loader. Where your Windows image comes from?

Hi
OK, carried out on a test system to confirm all works, used a USB device with the openSUSE 13.2 rescue CD, openSUSE Leap 42.1 USB and Windows 8.1 USB install (created with rufus).

So all I did (thanks nrickert for your input) was create with gdisk the following partitions via the openSUSE 13.2 rescue system;


sda1 260M type ef00 <- /boot/efi
sda2 128M type 0c01 <- MS reserved
sda3 500M type 8300 <- /boot
sda4 200G type 8300 <- For LVM
sda5 97.2G type 0700 <- for Windows

Format sda1 as vfat, then setup the encrypted LVM;


cryptsetup -y -v luksFormat /dev/sda4
crypsetup luksOpen /dev/sda4 secure
yast2 disk

Then via YaST partitioner, rescan disk and then add the LVM and logical partitions as required, I used 40GB for /, 100GB for /data and 8GB for swap.

Shutdown, pop in the openSUSE Leap 42.1 USB and boot from that, when you get to the partitioner, use expert mode and re-scan the disk. At this point it should ask for the password to mount your encrypted LVM, add all your partitions as required, complete install and re-boot.

On boot at the Plymouth screen you get a popup for the password, boot should then carry on.

Here is the lsblk output after boot;


lsblk
NAME                              MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                                 8:0    0 298.1G  0 disk
├─sda1                              8:1    0   260M  0 part  /boot/efi
├─sda2                              8:2    0   128M  0 part
├─sda3                              8:3    0   500M  0 part  /boot
├─sda4                              8:4    0   200G  0 part
│ └─cr_ata-TOSHIBA_MK3275GSX_91Q7B2OZB-part4
                                  254:0    0   200G  0 crypt 
│   ├─secure-swap                 254:1    0     8G  0 lvm   [SWAP]
│   ├─secure-leap                 254:2    0    40G  0 lvm   /
│   └─secure-data                 254:3    0   100G  0 lvm   /data
└─sda5                              8:5    0  97.2G  0 part

In your case swap /data for /home.

Check efi boot entries for openSUSE;


ls /boot/efi/EFI/
boot  opensuse

efibootmgr -v
BootCurrent: 0001
Timeout: 2 seconds
BootOrder: 0001,0002,0000
Boot0000* USB HDD: PNY     USB 2.0 FD    ACPI(a0341d0,0)PCI(1d,0)USB(0,0)USB(1,0)HD(1,ec4,1d88,20ca2c8b)RC
Boot0001* opensuse-secureboot    HD(1,800,82000,9612be89-3e4c-48a7-80a5-58844d8960e0)File(\EFI\opensuse\shim.efi)
Boot0002* HDD: TOSHIBA MK3275GSX    ACPI(a0341d0,0)PCI(1f,2)03120a00000000000000HD(1,800,82000,9612be89-3e4c-48a7-80a5-58844d8960e0)RC

So now carry out a full shutdown (winkey+r and enter shutdown /s /t 5) and carry out the windows install and reboot, with any luck it should fire up grub (no windows entry yet), select the Leap install. If not you may need to press the key to get to the boot menu.

If it’s wiped the efi entry for openSUSE, no worries, fire up the 13.2 rescue device and re-add manually;


su -
efibootmgr -v
efibootmgr -c -L "opensuse-secureboot" -l "\\EFI\\opensuse\\shim.efi"

If grub starts, select openSUSE Leap, once booted run YaST bootloader and ensure the box is checked to probe for another OS, check save and then update the system.

Then you should be good to go…