1

Since there is no unallocated memory available at present, I need to first create some unallocated memory from of one the partitions (/dev/nvme0n1p3, /dev/nvme0m1p4, /dev/nvme0n1p5, /dev/nvme0n1p8). Then, I need to make that memory available either at the beginning or end of the root partition (/dev/nvme0n1p7). After that, I have to extend / resize the root partition (as it is almost full).

Image of the disk partition using GParted

Now, how to perform all of the operations without losing any of the data or formatting whole system?

Sourav Ghosh
  • 401
  • 4
  • 13
  • The magic word is "Backup"... – mook765 Dec 28 '20 at 11:58
  • pLumo this does not answer my question specifically. I want to first resize the external partitions and then create unallocated memory, which needs to be moved near root partition. And I want to do this without losing my data or formating whole external partiions. – Minhunter Dec 28 '20 at 13:25
  • Takkat This also does not answer my question. More or less, their solution is to have a backup and then delete the portion adjacent to the root partition. But this is not what I wish to do. – Minhunter Dec 28 '20 at 13:34
  • mook765 Yeah, this is a solution, not not I want. First take a backup and then remodel the whole setup like installing a new OS. – Minhunter Dec 28 '20 at 13:35
  • Any of those that you resize you would need to move them after resizing them so that you can move the unallocated space to after of your root /dev/nvme0n1p7. Then you can resize your root partition. There is ALWAYS a risk of data loss when messing with partitions, so backups are strongly recommended. Your process will take time, but it can be done. This should be done also in a Live environment like a Live USB / DVD. Do not move the EFI or the Microsoft Resevered partitions as that could make it non-bootable. – Terrance Dec 28 '20 at 15:49
  • @Terrance, How to Resize your Ubuntu Partitions? mentions that Using GParted, if I move the start sector of the Ubuntu partition containing /boot directory – likely my primary Ubuntu partition – my OS may fail to boot. If I'm moving the start sector of my main Ubuntu partition, I’ll likely have to reinstall Grub 2 afterwards. – Minhunter Dec 28 '20 at 16:26
  • @Terrance, so, if I create a partition of unallocated memory before /dev/nvme0n1p8 (~20 GB) & extend the root partition (/dev/nvme0n1p7) from the end sector instead of start sector, will my OS fail to boot & if I have to reinstall the Grub 2?Also, if I create unallocated partitions at the start/end of /dev/nvme0n1p3 and /dev/nvme0n1p5, how to move these partitions at the end of root partition? Because, if I move these partitions, then the addresses of the root partition (or its start sector) and other partitions may change and I will find same issues of boot failure, etc. – Minhunter Dec 28 '20 at 16:29
  • If you take from /dev/nvme0n1p8 then move it (nvme0n1p8) to the end of the free space, that will create your free space between /dev/nvme0n1p7 and /dev/nvme0n1p8. Then all you would have to do is resize /dev/nvme0n1p7. No moving of /dev/nvme0n1p7 is required at that point. If the boot gets broken, which is always a possibility, there is a boot repair that can fix that for you. https://help.ubuntu.com/community/Boot-Repair But with only resizing my bet would be on boot actually still working after resize. – Terrance Dec 28 '20 at 18:04

0 Answers0