Trying to resize two disk partitions  [Solved]

Message
Author
User avatar
Falcon
Posts: 460
Joined: Mon Apr 22, 2019 9:34 pm

Trying to resize two disk partitions

#1 Post by Falcon »

I have an Acer desktop that has both Windows 7 and MX-21.3 installed on it. I want to increase the size of the Windows partition and decrease the size of the MX partition accordingly. I booted the computer with a Live-USB and then started the Gparted program.

I started the operation by moving the start of the MX partition to the right to free up about 25GB of space for the Windows partition to move into. By the way, I did not actually do the move operation, I just added it to the list of operations to be performed when the Execute function was used. As you can see in the picture below this operation would show about 25 GB of unallocated space after the Windows partition. When i selected the Windows partition and attempted to move the end of the partition to the right, I was unable to do so. When I select this unallocated space and click Partition, the only option that I get is New.

How do I go about making this space available for the Windows partition?

Thanks in advance.
[url=https://postimg.cc/9r7FYvhz][img]
You do not have the required permissions to view the files attached to this post.

User avatar
CharlesV
Global Moderator
Posts: 7069
Joined: Sun Jul 07, 2019 5:11 pm

Re: Trying to resize two disk partitions

#2 Post by CharlesV »

This sounds like your windows is set to fast startup, or it was not shutdown on shift shutdown.
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

User avatar
Falcon
Posts: 460
Joined: Mon Apr 22, 2019 9:34 pm

Re: Trying to resize two disk partitions

#3 Post by Falcon »

I'm not sure what this means. Sorry for my lack of knowledge on this.

User avatar
CharlesV
Global Moderator
Posts: 7069
Joined: Sun Jul 07, 2019 5:11 pm

Re: Trying to resize two disk partitions

#4 Post by CharlesV »

So, windows has a "feature" call quick boot (or Fast boot depending upon who you talk woo :-) ) .. it basically creates a kind of 'hybernation' that maintains a lock on devices and windows. This can totally do this kind of lock on a partition.

To disable Quick Boot (also known as Fast Startup) in Windows, press the Windows Key + R, type "powercfg.cpl" and hit Enter. In the Power Options window, click on "Choose what the power buttons do," then uncheck "Turn on fast startup" under Shutdown settings and save your changes.

Optionally.. you can hold down the shift key and shut windows down which will do a full shutdown instead of a partial hibernation.( partial hibernation is the default behavior.) This method ensures that the system fully resets / shutdown, and can help resolve certain issues. ( or in this case - if that IS the issue, you can then get around it.)
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

User avatar
Falcon
Posts: 460
Joined: Mon Apr 22, 2019 9:34 pm

Re: Trying to resize two disk partitions

#5 Post by Falcon »

Charles,

I'll check on this tomorrow and post what I find.

User avatar
m_pav
Developer
Posts: 1735
Joined: Sun Aug 06, 2006 3:02 pm

Re: Trying to resize two disk partitions

#6 Post by m_pav »

Let's deal with moving your Linux partitions starting location marker first. This will most likely break the GRUB loader because it will look for file markers in a specific storage address space that will no longer be available, however it's not a terminal break as GRUB can be reinstalled from a Live boot session after the fact.

If you use a single root partition which includes your homedir, then I suggest you do a backup first. On a SSD, moving a partition is not such a big deal because everything will be working in a vitual address space, the actual data does not need to move, but on a spinning platter, it's a different story. A move like this can take a very long time and hiccup at any point can mean a resinstall will be the simplest form of recovery.
Mike P

Regd Linux User #472293
(Daily) Lenovo T560, i7-6600U, 16GB, 2.0TB SSD, MX_ahs
(ManCave) AMD Ryzen 5 5600G, 32G, 8TB mixed, MX_ahs
(Spare)2017 Macbook Air 7,2, 8GB, 256GB SSD, MX_ahs

User avatar
Falcon
Posts: 460
Joined: Mon Apr 22, 2019 9:34 pm

Re: Trying to resize two disk partitions

#7 Post by Falcon »

I think that I may have thought of the problem before I went to bed last night. I haven't done anything with partitioning disks in a long time, but I remembered that partitions may be Primary or Extended. It occurred to me that the Windows partition was most likely a Primary partition, and I know that the MX partition is an Extended partition. I'm guessing that you can't expand a Primary partition into an Extended partition. So I fired up Gparted again and set up the following operations:

1) Delete the MX partition
2) Delete the Extended partition
3) Move the right end of the Windows partition into the Unallocated space.
4) Create a new Primary partition for MX in the Unallocated space.
5) Format to ext4

I didn't actually run the operations, only testing to see if it was possible to do them and Gparted seemed to think that everything would work. I'm guessing that if I had made the MX partition Primary when I created it, that I would have been able to do the resize without any issue. I'll have to reinstall MX again, but that shouldn't be too much of a problem, because I made a new LiveUSB before i started all this. I'll post the results when I get done.

User avatar
dreamer
Posts: 879
Joined: Sun Oct 15, 2017 11:34 am

Re: Trying to resize two disk partitions

#8 Post by dreamer »

Falcon wrote: Tue Apr 29, 2025 9:11 am I think that I may have thought of the problem before I went to bed last night. I haven't done anything with partitioning disks in a long time, but I remembered that partitions may be Primary or Extended. It occurred to me that the Windows partition was most likely a Primary partition, and I know that the MX partition is an Extended partition. I'm guessing that you can't expand a Primary partition into an Extended partition. So I fired up Gparted again and set up the following operations:

1) Delete the MX partition
2) Delete the Extended partition
3) Move the right end of the Windows partition into the Unallocated space.
4) Create a new Primary partition for MX in the Unallocated space.
5) Format to ext4

I didn't actually run the operations, only testing to see if it was possible to do them and Gparted seemed to think that everything would work. I'm guessing that if I had made the MX partition Primary when I created it, that I would have been able to do the resize without any issue. I'll have to reinstall MX again, but that shouldn't be too much of a problem, because I made a new LiveUSB before i started all this. I'll post the results when I get done.
The quote above would probably work (Gparted knows best). AFAIK you can only resize into unallocated space. You can't resize into existing partitions - you have to delete them or shrink them first to free up some unallocated space.

User avatar
Falcon
Posts: 460
Joined: Mon Apr 22, 2019 9:34 pm

Re: Trying to resize two disk partitions

#9 Post by Falcon »

Well, that didn't work so good. I set up Gparted with the operations above, and then clicked the Execute button. The first two operations completed successfully, but when the Resize operation for the Windows partition started, it generated an error. The message window only stated that there was an error, but no indication as to what the error was. I'm guessing that for some reason the partition is being blocked from moving into the unallocated space. I had deleted both the MX logical partition and the extended partition so that the unallocated space should be completely clear. I guess that I will need a brain bigger than mine to fix this one.

User avatar
Falcon
Posts: 460
Joined: Mon Apr 22, 2019 9:34 pm

Re: Trying to resize two disk partitions

#10 Post by Falcon »

Okay, upon looking into this a little more, I did manage to find a file that specifies the problem. Here is the section that defines the problem:

Grow /dev/sda3 from 71.67 GiB to 101.49 GiB 00:00:00 ( ERROR )

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

path: /dev/sda3 (partition)
start: 61024256
end: 211326975
size: 150302720 (71.67 GiB)
check file system on /dev/sda3 for errors and (if possible) fix them 00:00:00 ( ERROR )

ntfsresize -i -f -v '/dev/sda3' 00:00:00 ( ERROR )

ntfsresize v2017.3.23AR.3 (libntfs-3g)
Device name : /dev/sda3
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 76954989056 bytes (76955 MB)
Current device size: 76954992640 bytes (76955 MB)
Checking for bad sectors ...
Bad cluster: 0xcdd430 - 0xcdd430 (1)
ERROR: This software has detected that the disk has at least 1 bad sector.
****************************************************************************
* WARNING: The disk has bad sector. This means physical damage on the disk *
* surface caused by deterioration, manufacturing faults or other reason. *
* The reliability of the disk may stay stable or degrade fast. We suggest *
* making a full backup urgently by running 'ntfsclone --rescue ...' then *
* run 'chkdsk /f /r' on Windows and reboot it TWICE! Then you can resize *
* NTFS safely by additionally using the --bad-sectors option of ntfsresize.*
****************************************************************************

Gparted seems to think that the SSD has one or more bad sectors. Should I just log into Windows and do the operations suggested above? After deleting the MX partition, the computer doesn't boot. Do I just need to reinstall GRUB from the Live USB to get it running again?
Last edited by Falcon on Tue Apr 29, 2025 7:42 pm, edited 1 time in total.

Post Reply

Return to “Software / Configuration”