{"id":2518,"date":"2024-12-17T17:00:46","date_gmt":"2024-12-17T17:00:46","guid":{"rendered":"https:\/\/galhano.com\/blog\/?p=2518"},"modified":"2026-01-20T10:39:16","modified_gmt":"2026-01-20T10:39:16","slug":"how-to-expand-the-windows-partition-when-the-recovery-one-is-in-the-way","status":"publish","type":"post","link":"http:\/\/galhano.com\/blog\/?p=2518","title":{"rendered":"How to expand the Windows partition when the Recovery one is in the way?"},"content":{"rendered":"\n<p>You don&#8217;t need to even reboot for this \ud83d\ude42<\/p>\n\n\n\n<p>Once you disabled the recovery partition, you can just launch <code>diskpart<\/code> and complete the changes.<\/p>\n\n\n\n<p>you&#8217;ll be able to<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>delete the recovery parttion<\/li>\n\n\n\n<li>extend your C: partition to a desired size<\/li>\n\n\n\n<li>recreate the recovery partition with the correct type<\/li>\n\n\n\n<li>format the recovery partition<\/li>\n<\/ol>\n\n\n\n<!--more-->\n\n\n\n<h3 class=\"wp-block-heading\">1. identify and delete recovery partition<\/h3>\n\n\n\n<p>so, first you need to disable it, that&#8217;s the already known command:<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">reagentc \/disable\n<\/pre>\n\n\n\n<p>with that done, launch <code>diskpart<\/code><\/p>\n\n\n\n<p>where you pick your OS drive by ID and the recovery partition <strong>by ID<\/strong>. And then you delete it. This is possible using the <code>override<\/code> keyword asking Windows to not consider that protected partition a protected protected partition for that short moment <em>where you delete it<\/em>.<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">list disk  #&lt; identify OS drive here, example below is 'disk 0'\nsel disk 0\nlist part  #&lt; identify recovery partitition here, example below is 'part 3'\nsel part 3\ndelete part override\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2. resize your C: partition<\/h3>\n\n\n\n<p>where you select your OS partition by ID and increase its size &#8211; while leaving space for the recovery partition&#8217;s recreation. The partition resize automatically triggers the filesystem resize.<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">list part #&lt; OS partition, C:\\ Drive letter is part 2 in example below\nsel part 2\nextend size=112000\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">3. create recovery partition<\/h3>\n\n\n\n<p>where you re-create the recovery partition for later use. if you (reader, not OP) has a UEFI system this command will DIFFER. See Microsoft <a href=\"https:\/\/support.microsoft.com\/en-us\/topic\/kb5028997-instructions-to-manually-resize-your-partition-to-install-the-winre-update-400faa27-9343-461c-ada9-24c8229763bf\">KB5028997<\/a> for details about that.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3.1 Basic Disks<\/h4>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">create partition primary size=1000 id=27\n<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">3.2 GPT Disks<\/h4>\n\n\n\n<p>On GPT disks, you&#8217;ll get an error about incorrect syntax for this. There use:<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">create partition primary size=1000 id=de94bba4-06d1-4d40-a16a-bfd50179d6ac\n<\/pre>\n\n\n\n<p>If this worked, the new partition is auto-selected and can be formatted. If it didn&#8217;t work, then please stop here and debug.<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">format quick fs=ntfs label=\"Windows RE tools\"\nexit\n<\/pre>\n\n\n\n<p>Note:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>You can then use the partition ID from @AdamKalisz&#8217;s comment below!<\/li>\n\n\n\n<li>The newly created partition is automatically selected by diskpart.<\/li>\n\n\n\n<li>You want a size of 1GB for the partition to avoid errors from windows Upgrade (that&#8217;s the <code>0x80070643<\/code> error code). It can hit the error condition when updating the recovery code (done via windows update).<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">4. enable recovery partition<\/h3>\n\n\n\n<p>now you can re-enable the new recovery partition<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">reagentc \/enable\n<\/pre>\n\n\n\n<p>That&#8217;s it. I had to do this a few days ago, and there&#8217;s really no need to have a downtime for this. You might still need to reboot for the update, but at least it&#8217;ll be at a time of your chosing.<\/p>\n\n\n\n<p>If the update error doesn&#8217;t go away, you might want to investigate windows update client issues.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">5. When your system never had a valid RE image<\/h3>\n\n\n\n<p>There&#8217;s also an edge case if there&#8217;s no valid copy of the recovery image on disk &#8211; there still can be a partition, but it might be invalid. I&#8217;ve also seen cases with 3 rescue partitions.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">5.1 Mounting a WIM image and extracting the WinRE boot image<\/h4>\n\n\n\n<p>In such cases, you <em>can<\/em> proceed &#8211; but: you might need to re-genererate the RE image. This works along the lines what is described here: <a href=\"https:\/\/www.elevenforum.com\/t\/deleted-windows-recovery-partition-how-to-make-a-new-one.11534\/\">https:\/\/www.elevenforum.com\/t\/deleted-windows-recovery-partition-how-to-make-a-new-one.11534\/<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">5.2 Working with readonly (DVD) media<\/h4>\n\n\n\n<p>Just note that you might need to change some flags for dism to work with a readonly image. i.e. I needed <code>dism \/mount-wim [...] \/readonly<\/code> and <code>dism \/unmount-wim [...] \/discard<\/code> when working from a dvd image, and then you also need to re-locate the RE path to your actual partition. just check it with <code>\/info<\/code> to be sure it&#8217;s in the right spot.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">5.3 Don&#8217;t lose the security patch!<\/h4>\n\n\n\n<p>Since MS updated the RE image in early 2024, you should also make sure that if you use a DVD source that you&#8217;ll use one that is recent enough to contain a &#8216;safe&#8217; <code>winre.wim<\/code> (*).<\/p>\n\n\n\n<p>(*Footnote: Yes, I know that is tricky or might be nigh impossible on editions like LTSC. I suppose maybe one can then reinstall the januar 24 patch, but I don&#8217;t know. I made a life choice to not do windows support decades ago and this is info as far as i&#8217;ll bend that rule)<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>thanks to Florian Heigl<\/p>\n\n\n\n<p><a href=\"https:\/\/superuser.com\/questions\/1354574\/how-to-expand-the-windows-partition-when-the-recovery-one-is-in-the-way\">https:\/\/superuser.com\/questions\/1354574\/how-to-expand-the-windows-partition-when-the-recovery-one-is-in-the-way<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>You don&#8217;t need to even reboot for this \ud83d\ude42 Once you disabled the recovery partition, you can just launch diskpart and complete the changes. you&#8217;ll be able to<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2518","post","type-post","status-publish","format-standard","hentry","category-uncategorized","author-admin"],"_links":{"self":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2518","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2518"}],"version-history":[{"count":2,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2518\/revisions"}],"predecessor-version":[{"id":2520,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2518\/revisions\/2520"}],"wp:attachment":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2518"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}