You are not logged in.

#1 2020-07-02 17:12:30

mjd119
Member
Registered: 2020-05-07
Posts: 119

[SOLVED] Rearranging Partitions and Maintaining Dual Boot

I keep running out of space in my home directory. There's 50 GB of unallocated space I want to use for my home directory. I want to keep my home directory on the same drive as it is now (on my SSD) while maintaining my dual boot with Windows 10. I want to rearrange the partitions without having to reinstall Arch again if I can help it. I want to ensure that Windows and Arch will both remain bootable. At some point I am going to buy another SSD so I can keep each OS on a separate drive for simplicity, but I am trying to save money. This is what my SSD looks like on gparted:

fBKzEex.png

I have multiple drives on my machine, so I can temporarily copy and move partitions to another drive if needed. I just don't want to lose any data or make my Operating Systems unbootable. The partition with the "OS" label is my boot drive for Windows 10. I believe the partition with the "SYSTEM" label is the EFI boot partition for Windows 10.

Last edited by mjd119 (2020-07-04 01:32:11)

Offline

#2 2020-07-02 18:15:34

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,373

Re: [SOLVED] Rearranging Partitions and Maintaining Dual Boot

Before doing such kind of operations make a backup of your data.

Afaik you cannot logically move partitions past each other without some weird roundabouts that I don't feel are worth the tradeoff. I'd say remove the swap partition and your own efi partition (and maybe just generally switch to the one you have, run a grub-install or whatever you are using here beforehand and reuse the existing "Windows" ESP). Having done you can move the root partition next to the windows partition and then move and extend the home paritition. Recreate swap at the end if necessary. Adjust your fstab so that /efi points to the new ESP (and swap). All other things should be able to remain the same.

Last edited by V1del (2020-07-02 18:17:02)

Offline

#3 2020-07-02 18:42:12

frostschutz
Member
Registered: 2013-11-15
Posts: 1,652

Re: [SOLVED] Rearranging Partitions and Maintaining Dual Boot

You could simply create a partition in that 50GB space and use it as /home (copy stuff over with cp -a, update fstab). No rearrangements necessary and the old sda7 /home still exists just in case.

Once that works you can re-designate /dev/sda7 for some other purpose, e.g. your music collection or whatever, and have it mount under /home/user/Music if you like. (find some way to use those 10GB so they're not "lost").

If you really must shuffle partitions around, you should make a full backup of that SSD (full device, all partitions) like to a HDD, if you have 250GB free there. Resizing and rearranging with gparted is a risky operation and you can lose everything.

Also make sure to run this from a live cd. It's not possible otherwise.

Offline

#4 2020-07-03 13:47:54

mjd119
Member
Registered: 2020-05-07
Posts: 119

Re: [SOLVED] Rearranging Partitions and Maintaining Dual Boot

V1del wrote:

Before doing such kind of operations make a backup of your data.

Afaik you cannot logically move partitions past each other without some weird roundabouts that I don't feel are worth the tradeoff. I'd say remove the swap partition and your own efi partition (and maybe just generally switch to the one you have, run a grub-install or whatever you are using here beforehand and reuse the existing "Windows" ESP). Having done you can move the root partition next to the windows partition and then move and extend the home paritition. Recreate swap at the end if necessary. Adjust your fstab so that /efi points to the new ESP (and swap). All other things should be able to remain the same.

What do you mean by "reuse the existing Windows ESP?" Are you saying it should be moved? It seems like what would make the most sense is to delete the swap partition, delete the EFI partition (Arch boot partition mounted at /efi) and then move everything to the left. Those partitions can be easily recreated since I've done it before. To make things easier, I could avoid having to recreate any partitions by cloning the entire drive to one of my other hard drives (I have plenty of free space), wipe the drive, then copy the partitions over in my preferred order where resizing certain partitions is easiest (smallest partitions necessary for booting at the left end of the drive). I just want to make sure I don't lose any data, I accidentally overwrote my home directory for Debian once because I wasn't careful enough. I have access to Parted Magic and Minitool Partition Wizard for cloning and moving partitions.

Offline

#5 2020-07-03 14:02:04

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,373

Re: [SOLVED] Rearranging Partitions and Maintaining Dual Boot

If you are fine with recreating them go ahead, no i mean that you should use the Windows ESP (aka EFI partition) and install GRUB on there (don't touch the partition as a partition, leave it as is), but if you are fine with redoing your own ESP with just GRUB go ahead.

Offline

#6 2020-07-03 19:41:09

mjd119
Member
Registered: 2020-05-07
Posts: 119

Re: [SOLVED] Rearranging Partitions and Maintaining Dual Boot

V1del wrote:

If you are fine with recreating them go ahead, no i mean that you should use the Windows ESP (aka EFI partition) and install GRUB on there (don't touch the partition as a partition, leave it as is), but if you are fine with redoing your own ESP with just GRUB go ahead.

Wouldn't that screw up that partition? I created that for booting with Windows. You're saying it can be used for booting both? A separate one isn't needed?

Offline

#7 2020-07-03 20:05:35

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,373

Re: [SOLVED] Rearranging Partitions and Maintaining Dual Boot

That's what I'm saying. One of the good things of UEFI is that it actually allows by design, multiple operating systems/EFI binaries to coexist. Right now you have 250MB worth of disk space that doesn't really do anything, you can move the 4MB GRUB is currently using to the 100MB EFI partition that isn't doing anything with 80MB of it and get 250MB you can use on your /home. It's not really that big of a deal in the grand scheme of things, but it's something I would do in this case. In fact you seem to be lucky in so far that you have an EFI implementation that can actually handle multiple ESP partitions, there are many that do not.

As for screwing up no there's not much that can go wrong here, the GRUB files and Windows files have no intersection and do not conflict with each other.

Last edited by V1del (2020-07-03 20:23:17)

Offline

#8 2020-07-03 22:56:26

mjd119
Member
Registered: 2020-05-07
Posts: 119

Re: [SOLVED] Rearranging Partitions and Maintaining Dual Boot

I copied the home partition to the 50 GB block of unallocated space and deleted the original partition. I made a tarball of the home directory as a backup. I initially just copied the home partition and had trouble booting. I realized later that the partitions had identical UUIDs. I will probably delete my swap partition so I can resize my root partition and then just recreate the swap partition with the 12.96 GB of unallocated space.
7zOzPSg.png. I read through the wiki and right now I don't feel confident enough to delete the spare efi partition and reinstall grub right now. Marking this issue as solved.

Offline

#9 2020-07-04 00:28:38

WFV
Member
From: ☭USSA⛧⭒⭒⭒⭒
Registered: 2013-04-23
Posts: 290

Re: [SOLVED] Rearranging Partitions and Maintaining Dual Boot

With W10 updates sda1 might run out of room soon.


∞ hard times make the strong, the strong make good times, good times make the weak, the weak make hard times ∞

Offline

Board footer

Powered by FluxBB