1

I have a dual boot Linux / Windows system, and I only allocated about 120 GB of the 2 TB drive for Windows, and now I want to make it bigger.

I have read similar posts such as https://askubuntu.com/questions/557751/gparted-move-extended-partition-on-the-left, https://askubuntu.com/questions/603436/gparted-how-to-move-partition-to-extend-the-size, https://askubuntu.com/questions/659797/gparted-cant-move-extended-partition-to-the-right, https://forum.manjaro.org/t/solved-cant-move-or-resize-partition-using-gparted/34393, https://ubuntuforums.org/showthread.php?t=1511037, Can't shrink or move linux partition "leftward" in gparted, ... but AFAIK these do not apply to my situation. I am booting with a "Live USB," and was able to shrink the Linux partition with no problem. The problem comes when I get an error from e2fsck while trying to move the first of two Windows partitions.

Here is the current partition setup of my hard drive, showing the large Linux partition on /dev/sda3 in dark blue, with the unallocated space to its right after I shrank the Linux parition:

gparted current status

What I wanted to do next was first move the small Windows partition (/dev/sda4, in dark blue, immediately to the right of the unallocated space) to the left, so that I could then expand the size of the main Windows partition (/dev/sda5, in green) to fill up the remaining unallocated space.

But this first step fails (after a warning that I should back up and that this could screw up the boot scheme) with an error from e2fsck:

gparted error

In case that image is too hard to read, here's the text:

Move /dev/sda4 to the left  00:00:00    ( ERROR )

calibrate /dev/sda4  00:00:00    ( SUCCESS )

path: /dev/sda4 (partition)
start: 3646980096
end: 3647012863
size: 32768 (16.00 MiB)
check file system on /dev/sda4 for errors and (if possible) fix them  00:00:00    ( ERROR )

e2fsck -f -y -v -C 0 '/dev/sda4'  00:00:00    ( ERROR )

ext2fs_check_desc: Corrupt group descriptor: bad block for block bitmap
e2fsck: Group descriptors look bad... trying backup blocks...
e2fsck: Invalid argument while using the backup blockse2fsck: going back to original superblock
Error reading block 15761408 (Invalid argument). Ignore error? yes

Force rewrite? yes

Superblock has an invalid journal (inode 8).
Clear? yes

*** journal has been deleted ***

Superblock has_journal flag is clear, but a journal is present.
Clear? yes

The filesystem size (according to the superblock) is 31457280 blocks
The physical size of the device is 4096 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort? yes

Error writing block 15761408 (Invalid argument). Ignore error? yes


windows: ***** FILE SYSTEM WAS MODIFIED *****
e2fsck 1.45.3 (14-Jul-2019)

The result of all this that this partition does not get moved. It says "file system was modified" but it doesn't actually seem to be modified. After this operation, the original partition scheme (shown in the first image) is what remains.

...At this point, I don't understand what the error means as far as what I should try next. BTW, Both the Windows system and Linux will still boot and they don't detect any errors.

Anyone have any ideas?

(Currently my ideas are:

  1. Wipe Windows. Since my Windows partition is only for playing games, and I can recover everything from Steam, etc. So just delete & wipe both Windows partitions, and re-install... but I'm not sure what violence I'd be doing to my boot record.
  2. Try adjusting the Windows partitions, not with GParted, but with a Windows-based tool.

)

4
  • I note that there are posts about moving an "MSR" partition, e.g. superuser.com/questions/1521685/…, which suggest that GParted should be able to handle this....were it not for the e2fsck error?
    – sh37211
    Commented Mar 11, 2020 at 17:39
  • 2
    Why is /dev/sda4, an MSR partition, showing up as ext4 in your image? That would let GParted run e2fsck on it --- but, that is not supposed to be done. It won't understand the MSR format (hence the errors?).
    – nik
    Commented Mar 11, 2020 at 17:52
  • 1
    The MSR is required ot be unformatted space (not ext4), so fsck or chkdsk cannot be run on it. And fsck is only for the ext family of formats. docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/… & Order on drive is important: msftres en.wikipedia.org/wiki/Microsoft_Reserved_Partition
    – oldfred
    Commented Mar 11, 2020 at 18:43
  • Great question @nik. The "windows" area of the disk was created by first shrinking a larger Linux partition, creating empty space. Then I used the Windows installer/wizard and let it do its thing with that empty space, i.e. formatting & creating (sub)partitions. Maybe the empty space got left as ext4 somehow and Windows didn't bother to change it?...not sure. But Windows has booted ok so I never noticed that.
    – sh37211
    Commented Mar 11, 2020 at 19:13

1 Answer 1

1

I moved Windows with GParted and could not get it to move the Microsoft Reserved Partition (msr) either. However you don't need to - you can delete and recreate it.

What you can do:

  • Delete the msr (/dev/sda4) and then create a new 16MiB partition (sda4 again) directly after sda3 and set File system as unformatted.
  • Move Windows (/dev/sda5) up against the new sda4.
  • Once GParted has finished change the type code for /dev/sda4 to 0C01 (code type for msr) - you can use gdisk for this:
[hali@arch] ~ $ sudo gdisk /dev/sda
GPT fdisk (gdisk) version 1.0.5

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): t
Partition number (1-9): 4
Current type is C01 (Microsoft reserved)
Hex code or GUID (L to show codes, Enter = C01): 0C01
Changed type of partition to 'Microsoft reserved'

Command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/sda.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully.
[hali@arch] ~ $
  • Boot into Windows and extend the C:\ drive into the free space.
1
  • 1
    Thanks for these great instructions! That worked! All my data's intact too. :-)
    – sh37211
    Commented Mar 12, 2020 at 0:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .