W10 reinstallation wih existing LEAP 15.1 on the same SSD Succesfully on GPT

Hello,
Long story short, my Windows 10 system in an SSD has been damaged due to a faulty RAM (sfc /scannow could not solve the problem and neither did W10 rescue/installation media to “repair boot”) and I had to re-install W10 without affecting the LEAP 15.1 installation in the same drive. I know that this is heavily discouraged by most people, but I have done this in the past weekend and the following are the conditions and precedure.

I will first describe the system:
Lenovo T480,
boot drive: M2 B+M key 2242 WD Blue 512GB SSD GPT
300MB /BOOT/EFI (OpenSUSE EFI)
100MB /BOOT/EFI (Windows secure boot)
300GB Windows C:
35GB unpartitioned (overprovisioning and upgrade)
150GB OpenSUSE /

data drive: SATA 2.5" WD Blue 2TB HDD GPT
500GB Windows D:
500GB OpenSUSE /home
1TB NTFS Shared data (mounted as E: in W10 and as /mnt/Shared_Data in /etc/fstab in LEAP 15.1)

I am going to go through what I did in the past 72 hours

  1. Use dd to clone the entire boot SSD into an external SSD in case something goes wrong.
  2. Created the latest W10 install drive on a 8GB USB flash drive using MS tool (https://www.microsoft.com/en-us/software-download/windows10) while booted from W10.
  3. After ensuring that BIOS is set to UEFI boot only, boot from the flash drive.
  4. After choosing the keyboard, use the “Custom installation” option.
  5. Carefully select and delete
    100MB /BOOT/EFI (Windows secure boot)
    300GB Windows C:
  6. Create a “New” 300GB partition after the 300MB LEAP EFI partition.
    W10 installer will warn that it will create additional partitions for the system to work. It creates:
    100MB W10 EFI partition in front of 300GB partition
    ~16MB System Reserved partition after the 300GB partition
    ~500MB System Restore partition after the 16MB partition.
    Here I am pretty sure if you do not have any unpartitioned space, W10 may try to squeeze its partitions on the HDD.
  7. Triple check everything, select the 300GB partition and hit “Next” and install.

After this, W10 EFI will have the highest priority on boot sequence and my install enabled encryptions on C: D: and E: drives.
As a result OpenSUSE fails to boot because: E drive fails to mount on /mnt/Shared_Data as indicated on fstab.
Also, Using LEAP’s Grub, W10 cannot be booted because C: is encrypted to Grub.

Disabling encryptions on all drives solved the problem.

For an odd reason from LEAP, bluetooth disappeared. Disabling in UEFI it then booting, then enabling in UEFI then booting made it to show up again.

So far everything seems good, and my issues with W10 is gone as well.

I don’t think what I’ve done is possible if the boot drive is MBR since W10 will over-ride the boot records but in UEFI, especially with a seperate EFI partition for LEAP seems to work in my advantage.

Has anyone else here had to just install Windows in a dual boot drive?

No. But, all my systems are multiboot (more than one). None are “dual boot” (exactly two). Multiboot subsumes “dual boot”.

All partitioning on my drives is done prior to beginning any OS installation. I’ve never installed Windows first. Windows will accept partitioning you desire or provide if what you desire or provide meets its requirements.

I would not allow multiple ESP partitions on a single drive. ESP was designed to facilitate multiboot. AFAICT, more than one ESP is a completely unnecessary complication.

If in your case if you decided to delete or upgrade one of yoru OSes, how is the non-exsisting OS managed in the single ESP partition? I will aim for that in my future installation.

I am also wondering, is there a way to control the “System Reserved” and “Recovery partition” of W10 installation better? I do want them, I just wish I could control their placement in the partition table and size them properly.

Either switch priorities with efibootmgr from a running installation before the delete/upgrade, or make a priority change using the BIOS either before or after the delete/upgrade, or use a rescue boot after the delete/change to run efibootmgr. The designers of the UEFI specifications were not dummies. :slight_smile:

Have you ever tried fully partitioning to your desires prior to beginning an installation?

On Windows 10, it seems to add the two, System Reserved and Restore partitions in addition to the partition for W10 system partition when I choose “New” to create the W10 partition. In short, on Windows 10, no. Using other installer such as provided by OpenSUSE, yes.

Also, regarding the ESP. W10 installer doesn’t even give me an option to put the WSB in the existing ESP. What about in that case?

I mean how can you even partition Windows System Reserved, WSB, System Recovery and and system outside of the W10 installation media?

https://paste.opensuse.org/19938401 is a log (stripped of information about the NVME system disk, and cruft) of how I just did it using the tool I always use for partition management. This shows the result using the indicated Linux tools:

# parted -l
Model: KINGSTON  RBU-SNS8152 (scsi)
Disk /dev/sda: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                        Flags
 1      1049kB  337MB   336MB                EFI System  (ESP)           boot, esp
 2      337MB   8725MB  8389MB               Linux Swap                  swap
 3      8725MB  25.5GB  16.8GB               Linux: openSUSE 15.2
 4      25.5GB  42.3GB  16.8GB               Linux: openSUSE Tumbleweed
 5      42.3GB  59.1GB  16.8GB               Linux: openSUSE 15.3
 6      59.1GB  160GB   101GB                Linux /home
 7      160GB   160GB   16.8MB               MS Reserved (MSR)           msftres
 8      160GB   252GB   92.3GB               Windows 10 System           msftdata

# fdisk -l /dev/sda
Disk /dev/sda: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Disk model:  RBU-SNS8152    
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 4096 bytes / 33553920 bytes
Disklabel type: gpt
Disk identifier: 5F029863-51BE-4DF5-827C-A048164637DD

Device         Start       End   Sectors  Size Type
/dev/sda1       2048    657407    655360  320M EFI System
/dev/sda2     657408  17041407  16384000  7.8G Linux swap
/dev/sda3   17041408  49809407  32768000 15.6G Linux filesystem
/dev/sda4   49809408  82577407  32768000 15.6G Linux filesystem
/dev/sda5   82577408 115345407  32768000 15.6G Linux filesystem
/dev/sda6  115345408 311953407 196608000 93.8G Linux filesystem
/dev/sda7  311953408 311986175     32768   16M Microsoft reserved
/dev/sda8  311986176 492210175 180224000   86G Microsoft basic data

This is an excerpt from the log’s tail providing similar information:

|ID |ux|Dr|Type, description|Format  |Related |VolumeLabel|OS2-LVM/BM / GPT / Crypt / additional in|  Size MiB |
+--</dev/sda     GPT disk  2>--------+--------+-----------< RBU-SNS8152        >-------------------+-----------+
|18 |  |  |Fsp + GPT hdr/pta|-- -- --|-- -- --|- - - - - -|Size 0x7de sectors                      |        1.0|
|18 | 1|  |EFI System  (ESP)|FAT32   |GPT/EFI |           |EFI System  (ESP)                       |      320.0|
|19 | 2|  |Linux Swap       |SWAP    |LinuxT1 |           |Linux Swap                              |     8000.0|
|20 | 3|  |Linux Data       |unknown |Linux   |           |Linux: openSUSE 15.2                    |    16000.0|
|21 | 4|  |Linux Data       |unknown |Linux   |           |Linux: openSUSE Tumbleweed              |    16000.0|
|22 | 5|  |Linux Data       |unknown |Linux   |           |Linux: openSUSE 15.3                    |    16000.0|
|23 | 6|  |Linux Data       |unknown |Linux   |           |Linux /home                             |    96000.0|
|24 | 7|  |MS Reserved (MSR)|        |Windows |           |MS Reserved (MSR)                       |       16.0|
|25 | 8|  |Windows BasicData|        |Windows |           |Windows 10 System                       |    88000.0|
|27 |  |  |Fsp + GPT pta/hdr|-- -- --|-- -- --|- - - - - -|Size 0x78aa8f sectors                   |     3861.3|

About WSB I know nothing, so left it out. I purposely left out a recovery partition, as I don’t expect to try a Windows installation on it, in part because I have no Windows license for any UEFI PC, also because Windows installation is a big time waster and I have more Windows installations than I care to have already, plus it needs to go back into my backups rotation. :stuck_out_tongue:

DFSee logs are an integral part of how I maintain inventory of my installed systems and disks.

By WSB, I mean “Windows Secure Boot”, usually W10 installation will try to create its own ESP. In else case it will over-write on the existing ESP breaking the EFI for other previously installed OSes. I am guessing that on your partition table, you’ve fully all of the SSD space so that the W10 installer cannot create a new Recovery partition.

I’m puzzled, how did you install W10 in the first place if not using the W10 installer?

In part, maybe yes. I’m no expert on determining the size required for a recovery partition. It is sometimes quite handy to have some freespace for a temporary partition/filesystem. The 3861.3 MiB freespace should be enough to hold the content of a 4G USB stick, which here checking I find to be 3840.0 MiB = 4026531840 bytes.

I’m puzzled, how did you install W10 in the first place if not using the W10 installer?
What makes you think that I did not? On my systems, partitioning and installation are very distinct processes, always occurring from different boots, and often from different PCs.

I thought you didn’t use the W10 installer since you don’t excpect to try it. Also, how do you get the W10 installation media to install Windows Secure Boot in the correct ESP without making a new one, or over-writing existing EFI for other systems?

The EFI boot partition has separate directories for each OS. When removing OS you would need to manually delete the one removed. Note also there are entries in the UEFI/BIOS for each OS that should also be manually removed.

If in case, if we have a single EFI boot partition, how can you prevent Windows 10 installer from either creating its own EFI boot partition or over-writing something in the existing partition?

Hi
OEM recovery partition with all the bloatware? Create an OEM recovery USB device or for the likes of DELL and Lenovo ask for a recovery USB (they are free), or just download the latest WinX from MS (I do that for every new release to upgrade).

Never tried moving it from sda2 since use efi for sda1 seems little point to move 16MB (This is a fixed amount of type 0c01)…

One of my last W10 reinstallation was motivated by Windows Recovery partition. As strange as it sounds, if I hard-shut down my laptop enough times, the laptop tries to boot from recovery partition and failed to boot. From there, it even failed to reboot regularly until CMOS battery have been reset. It’s a pre-logue to this thread really but I don’t think it really belongs in this forum. The short version is that for some of the very odd reason I need that recovery partition created by W10, not recovery USB drive or W10 install USB drive.

I used it when I needed to.

Also, how do you get the W10 installation media to install Windows Secure Boot in the correct ESP without making a new one, or over-writing existing EFI for other systems?
Windows’ installer hasn’t given me trouble in the past two decades. I create a partitioning setup it can accept, I boot its installer, I select the system partition it should use when it presents its interpretation of what it finds and asks which it should use, and it uses it, as well as any other partition where its boot file(s) must go if different. It’s not a whole lot different from any competent Gnu Linux installer. But, I’ve never attempted to use WSP, so have no knowledge of what if any difference that might make.

Hi
That’s a UEFI function of the installer which ever partition is of type ef00, (that goes for Windows, MacOS and linux (well only tested openSUSE and SLE)). I always pre-partition my installs, as in blow away anything windows related, boot rescue USB, partition (format ESP as well) and install in any order…

OH, here is what I have a few of from Lenovo…

https://forums.opensuse.org/attachment.php?attachmentid=899&stc=1

lenovo.jpg

Okay, to get this right, if you partition everything before booting with the installer (I would guess using Windows partitioner) with proper labels (System Reserved, Windows Recovery, Local_System) and appropriate FS and size, then when booted with the W10 installer and select your large NTFS partition to install W10 system, W10 installer typically assumes where each component belongs and installs W10 properly?

Malcolmlewis, do they give out Lenovo recovery drive still? My T480 didn’t and it is still under warranty. I guess I should ask them to send me one?

Hi
During the windows install select custom and point it to the preset partition you want windows on (if type 0700 it will auto select), then rock on with the install…

Yes, I have a few lying around (just blew away the recovery and use as a USB drive for linux installs :wink: ) Just go to the website, look for recovery media and put in the system serial number…