Sujet : Re: Fwd: shrink drive c: to install a new operating system
De : robin_listas (at) *nospam* es.invalid (Carlos E.R.)
Groupes : comp.os.linux.misc alt.comp.os.windows-10Date : 26. Dec 2024, 22:06:49
Autres entêtes
Message-ID : <94t04lxjce.ln2@Telcontar.valinor>
References : 1 2 3 4 5 6 7
User-Agent : Mozilla Thunderbird
On 2024-12-26 16:48, Paul wrote:
On Thu, 12/26/2024 8:30 AM, Carlos E.R. wrote:
On 2024-12-26 13:32, Chris Ahlstrom wrote:
Hmmm, I recently bought a mini PC with Win 11. I booted to Windows,
immediately used the built-in Disk Manager to shrink the Windows
partition. Then I installed Debian.
>
Pretty straightforward.
>
This is the best method. Do the shrinking as soon as you buy the machine. Or, at Windows install time.
>
1 2 3 4
+----+----+-----+----+------------+--------------------------+ - - - ---------+---------------+
|MBR |GPT | ESP |MSR | W11 C: | Recovery Partition 600MB | unallocated | secondary GPT |
+----+----+-----+----+------------+--------------------------+ - - - ---------+---------------+
^
+--------- Windows Disk Management does not show the MSR 16MB (a NoFS)
For a Linux user, one of the recommendations is to change
the EFI from 100MB FAT32 to 500MB FAT32.
But for gparted, the MSR acts as a "blocker", because gparted
expects to inspect any partition and check the partition file system integrity
and the MSR has no recognizable file system.
If you ignore that recommendation, the Linux install should still work.
It might have been someone at Ubuntu that recommended a 500MB ESP.
The Recovery Partition has SafeOS in it, a WinRE.wim file . On Windows 10,
the updates can fail on that, due to poor handling technique by Microsoft.
The Windows 11 updates are more coy about the mess, and I can see signs
for example, an update is queued to go into the 600MB partition, but
the attempt to update the item is failing (...quietly). If you bump the
Recovery Partition up to 1500MB, that leaves room for the worst case
handling behavior of the update.
The end result then, your disk could look like this (EFI not changed).
1 2 3 4 5
+----+----+-----+----+-------+-------------------------------------------=---------------+
|MBR |GPT | ESP |MSR | W11 C:| RP 1500MB | Debian slash | secondary GPT |
+----+----+-----+----+-------+-------------------------------------------=---------------+
a machine that ships with Windows 11 on it, the ACPI MSDM table should have
the license key. You would not have to buy another key. While older machines
had a COA sticker, the license key in ACPI MSDM is your proof of purchase.
License keys on the Internet are maybe $25. Some people have experimented
with the cheap keys, and the keys "have not tipped over". That's for stuff
like Home or Pro.
If you were Secure Booting (and who would be doing that!), you can do
the Windows Updates first, and have some certificate ending in 2011,
replaced with a certificate ending in 2023.
In an Administrator Powershell, you can run this and it should return True
if the necessary modification has been done. (The signed shim on a recent
Debian, is more likely to align with this 2023 thing.)
[System.Text.Encoding]::ASCII.GetString((Get-SecureBootUEFI db).bytes) -match ‘Windows UEFI CA 2023’
If you weren't secure Booting, it would not particularly matter.
If you perform activities such as "reset TPM to factory keys", then you
may end up installing another copy of Windows 11 (but only long enough
to re-install UEFI CA 2023). Then the excess Windows 11 partition could
be removed. That's what I did on the Secure Boot test machine to bring it
up to date, before pouring in the Linux.
*******
To reduce the size of Win11, you can
Admin terminal: powercfg /h off # Delete hiberfil.sys , can no longer hibernate
Admin terminal: sysdm.cpl Advanced : Performance (Settings) : Advanced : Virtual Memory (Change)
You can reduce the virtual memory using "Custom size 1024 1024"
On the next reboot, the pagefile.sys in the C: partition root area
should be 1024MB.
After this, you can shrink your C: partition down. move the Recovery Partition over,
and put Debian on the end.
Thanks, interesting writeup :-)
-- Cheers, Carlos.