You are not logged in.
I wanted to have a separate common partition for Windows and Arch so Is there a way to repartition Arch's root partition ? I wanted to be sure before poking around on my own and possibly losing my data
Last edited by Flavoured-Goo (2020-09-20 20:28:04)
Offline
Sure, use partitioning tools. Of course, depending on what filesystem you used for the rootfs, you may not be able to shrink it.
If you want more specific advice, you're going to have to give us a lot more information about your setup.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Online
UEFI with GPT. The only linux partition I have is the primary root partition and a swap, the rest are Windows partitions, the primary root partition is a regular ext4 filesystem. Correct me if i'm wrong, i'm still learning, but partitioning my root partition would require it to be unmounted right?
Last edited by Flavoured-Goo (2020-09-20 12:42:59)
Offline
Altering the partition table can be done with filesystems mounted. For resizing an ext4 filesystem see `man 8 resize2fs`.
Last edited by loqs (2020-09-20 12:43:18)
Offline
Still not clear what you're trying to do:
I wanted to have a separate common partition for Windows and Arch
You already have a separate partition - one for Windows and one for Arch.
Is your intention to have a separate partition you can access from both Windows and Arch?
Important before doing anything. Always have a backup.
Last edited by d_fajardo (2020-09-20 12:43:36)
Offline
Yes a separate NTFS partition since it will be readable and writable by WIndows as well as Arch is what I'm trying to acheive. Hence I'm trying to repartition my rootfs to make that small NTFS partition
Offline
Have a look at 'man 8 resize2fs' as loqs suggested. According to that shrinking a partition requires that the partition is unmounted which means you have to do it on a chroot environment with an archiso.
Shrinking risks data loss so make sure you have a backup.
Offline
You could also acheive this without repartitioning. Just mount the windows partition, then - if you want to for convenience - bind mount the directory you intend to share.
1. Create %HOMEPATH%\shared or whatever you'd want it called on Windows
2. Mount the windows partition under /mnt/windows in linux
3. Bind mount /mnt/windows/path/to/shared to $HOME/shared in linux
This would resulted in a "shared" directory in your user's home in both windows and linux but without requiring any additional partition. As a side-benefit, you wouldn't need to pre-define a size limit for it as it would just use space on the existing windows partition.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
@Trilby I don't want to do anything on my windows partition as my is already pretty small in comparison to the linux one that has tons of free space. I'd much rather repartition the linux one to use up the free space
Offline
So correct me if i'm wrong I would need to first resize the rootfs with resize2fs while it's unmounted after which I then need to resize the partition with something like fdisk right? Also, would gparted alone be able to accomplish the same thing ?
Offline
After shrinking your rootfs (unmounted as you said), you will then have an unallocated space in the drive. Just format that drive and for what you're intending to do, with ntfs, so both Windows and arch can recognize it. You can use gparted.
Offline
Alright, will do. Thanks a lot everyone!! Solved!
Offline