Resize Windows partitions for Tumbleweed

I was given an older computer with Windows 10 installed. When I installed Tumbleweed, I accepted the recommended partitioning. However , there is a lot of wasted space in the Windows partition and I would like to use it for Tumbleweed. Is there a simple/safe way to accomplish this? Gparted is the only tool that comes to mind and I’m not real adept at using it. The system runs fine as-is but I would prefer to make the space available for opensuse. Here is a look at the disk:

fdisk -l
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000DX001-SSHD
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 23547642-B9DF-43CB-B0DA-165D29294539
Device Start End Sectors Size Type
/dev/sda1 2048 534527 532480 260M EFI System
/dev/sda2 534528 796671 262144 128M Microsoft reserved
/dev/sda3 796672 1887537151 1886740480 899.7G Microsoft basic data
/dev/sda4 1887537152 1889585151 2048000 1000M Windows recovery environment
/dev/sda5 1889585152 1927538687 37953536 18.1G Linux filesystem
/dev/sda6 1927538688 1951014911 23476224 11.2G Linux filesystem
/dev/sda7 1951014912 1953525134 2510223 1.2G Linux swap

Boot into Windows and resize /dev/sda3 appropriately: Microsoft Support: How to re-partition without destroying the data? - Microsoft Support

Thank you for this link. I resized the Windows partition and now have 274GB of unallocated space. The Windows instructions say I can add to another partition if there is empty space at the end of the target partition. I don’t have that.

Where/how do I use that newly opened space? I was thinking of using it as the location of my /home partition or re-installing Tumbleweed and letting yast take care of this space.

Well depends on what you have in what order. You can only append to a partitions on the end of it. So if the space is in front of the partition you have to move the partition before you append. If you need more detailed help shoe fdisk -l (as root)

That’s how we’ve always partitioned our personal machines (desktops and laptops).

One partition for root, and one dedicated for /home. It’s advantageous to do that, if you ever boot up and the root partition gets corrupted, /home is still good.

You can format it for whatever filesystem type you prefer, then assign it as /home … of course you’ll want to copy everything from current /home over.

Yea my description is terse, but the overall “conversion” to a dedicated home partition isn’t complicated.

You can see the unallocated space is between sda3 and sda4. So, following what is said here, it cannot be appended to the linux install.

fdisk -l
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000DX001-SSHD
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 23547642-B9DF-43CB-B0DA-165D29294539

Device          Start        End    Sectors   Size Type
/dev/sda1        2048     534527     532480   260M EFI System
/dev/sda2      534528     796671     262144   128M Microsoft reserved
/dev/sda3      796672 1312665599 1311868928 625.5G Microsoft basic data
/dev/sda4  1887537152 1889585151    2048000  1000M Windows recovery environment
/dev/sda5  1889585152 1927538687   37953536  18.1G Linux filesystem
/dev/sda6  1927538688 1951014911   23476224  11.2G Linux filesystem
/dev/sda7  1951014912 1953525134    2510223   1.2G Linux swap

Do I move sectors or just reinstall opensuse? What is the best way to handle this?

You asked this originally :

If you have now decided you want to append the new free disk space to an existing partition, then a reinstall should be considered.

However, based on your original thought, in the quote above, you can use it as a /home just as it is now - no need to append.

So it comes down to
a) Is the newly acquired space sufficient enough to hold all the /home data for now and in the future - if yes, that’s the easiest, and will take minimal time and effort, maybe 15 or so minutes.

b) If you’re thinking is, “I absolutely have to have that new free space appended to a partition, so it will be contiguous”, then you will have a more involved effort.

There is no one “you must do it this way” answer :+1:

Where do you want to add space? assuming it is on sda6

1 Move sda4 up to after last sector of sda3
2 Move sda5 to after last sector of sda4
3 Move sda6 to after last sector of sda5
4 Expand sda6 to use free space.

Note if you reinstall the free space you made will have to be a separate partition because partitions must be continues

You should always plane out usage before you install.

I have been reviewing the advice given here and researched online. I don’t feel competent in moving the partitions around. There are few files I have to save. So, I can upload them temporarily. I think the safest thing (at my skill level) is to do a reinstall of Tumbleweed. But a question still remains.

Fdisk shows the newly unpartitioned space is between sda3 and sda4. The Windows Recovery Environment is sda4. df - l shows root is on sda5 and /home is sda6. So, the new space is between 2 Windows partitions. Will a reinstall create a partition in the empty space? Can Tumblweed exist with the Windows Recovery Environment in the middle of it? For ease of reference, I post this again.

df -l
Filesystem 1K-blocks Used Available Use% Mounted on
devtmpfs 4096 8 4088 1% /dev
tmpfs 4031168 97908 3933260 3% /dev/shm
tmpfs 1612468 1736 1610732 1% /run
/dev/sda5 18976768 15482436 2611436 86% /
/dev/sda5 18976768 15482436 2611436 86% /.snapshots
/dev/sda5 18976768 15482436 2611436 86% /boot/grub2/i386-pc
/dev/sda5 18976768 15482436 2611436 86% /boot/grub2/x86_64-efi
/dev/sda5 18976768 15482436 2611436 86% /opt
/dev/sda5 18976768 15482436 2611436 86% /usr/local
/dev/sda5 18976768 15482436 2611436 86% /var
/dev/sda5 18976768 15482436 2611436 86% /srv
/dev/sda5 18976768 15482436 2611436 86% /root
tmpfs 4031172 17640 4013532 1% /tmp
/dev/sda6 11727872 7906144 3821728 68% /home
/dev/sda1 262144 34584 227560 14% /boot/efi
tmpfs 806232 100 806132 1% /run/user/1000
/dev/sr0 210088 210088 0 100% /run/media/bill/openSUSE-Tumbleweed-NET-x86_6431

And this:

fdisk -l
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000DX001-SSHD
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 23547642-B9DF-43CB-B0DA-165D29294539

Device Start End Sectors Size Type
/dev/sda1 2048 534527 532480 260M EFI System
/dev/sda2 534528 796671 262144 128M Microsoft reserved
/dev/sda3 796672 1312665599 1311868928 625.5G Microsoft basic data
/dev/sda4 1887537152 1889585151 2048000 1000M Windows recovery environment
/dev/sda5 1889585152 1927538687 37953536 18.1G Linux filesystem
/dev/sda6 1927538688 1951014911 23476224 11.2G Linux filesystem
/dev/sda7 1951014912 1953525134 2510223 1.2G Linux swap

Shouldn’t be an issue with creating a partition in the new empty space.

I’ve had dual-boot laptops where the Windows Recovery partition remained as is. As a matter of fact, that’s the way your machine is configured NOW.


I am a bit confused about something. In a previous post of yours, you asked if you could use the newly acquired partition as /home.

You already have a dedicated partition for /home, which is sda6, and root is sda5.

Can you clarify why you asked about using the newly acquired partition for /home, when you already have a separate /home partition now?

It boils down to space usage. I do very little with Windows. The space it was using is wasted. I merely want to add more space to /home. I am working under the assumption that / has all the room it needs to operate properly. The 270+GB that went into the unallocated space will be more useful to me in Tumbleweed. Would it be better to add space in both places?

One possibility is converting to LVM which allows adding any available free space to a volume. Whether it is feasible in your case is hard to say and your habit of providing unreadable computer output does not make it easier.

A friend of mine bought a Samsung SSD 870 EVO 1TB which will replace the HDD of his notebook. He is a Windows guy. Thus I installed Windows 10 and later added Tumbleweed:

6700k:~ # fdisk -l /dev/sdc -o Device,Size,Type
Disk /dev/sdc: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: Samsung SSD 870 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 7D9FA4BA-4FAA-4A55-A7A8-96335ADF158B

Device       Size Type
/dev/sdc1    100M EFI System
/dev/sdc2     16M Microsoft reserved
/dev/sdc3  833.2G Microsoft basic data
/dev/sdc4    546M Windows recovery environment
/dev/sdc5   97.7G Linux filesystem

Partition table entries are not in disk order.
6700k:~ # 

The above partitioning warrants smooth maintenance and minimum hassle with disk partitioning of a dual boot system. A typical Linux user would shrink /dev/sdc3 to some 100G and create a btrfs file system on /dev/sdc5 extended to some 900G.

LVM adds some complexity which is not needed by most users relying on btrfs.

Tunbleweed hosts under frequent upgrading on some occasions experienced issues with lvm: dup to 20210708 results in unwanted device mapper Thus I disabled the units:

erlangen:~ # systemctl list-unit-files '*lvm*' '*multipath*'
UNIT FILE             STATE    PRESET 
lvm2-lvmpolld.service static   -      
lvm2-monitor.service  disabled enabled
lvm2-lvmpolld.socket  disabled enabled

3 unit files listed.
erlangen:~ # 

Building on the theme of me being a chicken, I decided the safest way for me to handle this issue was to re-install Tumbleweed, leaving Windows intact. Last year, I burned two disks; one each of the offline install and the network install. I thought it would be best to use an updated installer, even though both can access the latest files online.

When I tried to download the 4.2GB DVD offline install, the download failed because I ran out of room. So, I downloaded another copy of the net install. I first tried the update option (on the new disk as well as last year’s ) but failed in both cases. I next took last year’s DVD of an offline installer and began that.

It proceeded as expected. When I came to the partitioning options, I decided to look at each one without completing the install. The suggested partitioning would create an sda8, utilizing the unallocated space I created from the Windows partition. It would leave sda5 with all the linux files (except /home) intact. It would also leave sda6, which currently holds /home, intact as well. sda8 would contain the elements of both sda5 and sda6, essentially duplicating them on one partition.

As I said earlier, I did not complete the install. I merely looked at the options and aborted. The best option for me will be the Guided Partition one. There are several choices to be made. First, I will choose to leave the Windows partitions as they are. Next, I propose to eliminate the current linux partitions. I didn’t go far enough to see what would happen to them. My current setup has a separate /home and I expect it would be wise to repeat that. That brings me to another question: do I want /home to be xfs or btrfs? Can I expect the installer to combine sda5 and sda6, totaling just under 30GB? It would seem enough for everything but /home and make the new 272GB partition the place for /home.

To summarize: my plan is to use the Guided Partitioning, leave Windows partitions alone, eliminate all current linux partitions, create a separate /home partition (picking which file system?) and hope for the best! If btrfs is suggested, is it worthwhile doing snapshots?

Thanks to all for the input so far.

Dividing available disk space between / and /home will cause problems administrators using a single btrfs partition will never experience:

The problem is that you have a chunked up partition table. you could mount the area between Windows partitions as “myother” (or something) and link it in your home to expand the home space, if you don’t want to move partition so you have continues space. to install to.

I don’t understand (meaning its over my head!) your reference to unallocated space. I can empty sda5 & sda6 but that is not unallocated. Unless you mean if I delete the existing linux partitions they will become unallocated. If I use sda8, I can ignore the former install space (sda5 18GB and sda6 12GB) and that will give me a net gain of around 250GB.

All references seem to indicate I should choose btrfs, not XFS.

What would this look like? I’m picturing a empty /home folder except for a folder that is a link to “myother.” Or is it the yast-proposed install with everything going on sda8 and adding a “myother” folder there to use the space presently called sda5 & sda6?

  1. Space on the disk is used by partitions. There is also unused space between partitions.

  2. Within the btrfs partition you always have:

erlangen:~ # btrfs filesystem usage -T /
Overall:
    Device size:                   1.77TiB
    Device ALLOCATED:            520.07GiB
    Device UNALLOCATED:            1.26TiB
    Device missing:                  0.00B
    Device slack:                    0.00B
    USED:                        505.39GiB
    FREE (estimated):              1.27TiB      (min: 657.24GiB)
    Free (statfs, df):             1.27TiB
    Data ratio:                       1.00
    Metadata ratio:                   2.00
    Global reserve:              512.00MiB      (used: 0.00B)
    Multiple profiles:                  no

                  Data      Metadata System                            
Id Path           single    DUP      DUP      Unallocated Total   Slack
-- -------------- --------- -------- -------- ----------- ------- -----
 1 /dev/nvme0n1p2 512.01GiB  8.00GiB 64.00MiB     1.26TiB 1.77TiB     -
-- -------------- --------- -------- -------- ----------- ------- -----
   Total          512.01GiB  4.00GiB 32.00MiB     1.26TiB 1.77TiB 0.00B
   Used           501.58GiB  1.91GiB 80.00KiB                          
erlangen:~ # 

btrfs filesystem usage lists free and used space as well as allocated and unallocated space. Allocated space is always somewhat larger than used space.

You want to delete unneeded partitions and create a large chunk of unused space which you can use for the btrfs partition.

Yep.