0

A long time ago I was using dual-boot and I reserved a 100gb partition for Ubuntu 20.04 LTS on a 1 tb hard disk. Now I have deleted windows via the OS-uninstaller tool and I want to merge the remaining partition to the partition with Ubuntu. There are a few files in the remaining section. Is there a way to merge the partition without formatting it?

# fdisk -l

Device Start End Sectors Size Type /dev/sda1 2048 1085439 1083392 529M Windows recovery environment /dev/sda2 1085440 1290239 204800 100M EFI System /dev/sda3 1290240 1757923327 1756633088 837,6G Linux filesystem /dev/sda6 1757923328 1953523711 195600384 93,3G Linux filesystem

Also can I format the partition where the Windows recovery environment is located?

NOTE: I cannot resize using GPARTED tool. I think, the reason is /dev/sda3 not free space. I'm not sure...

  • 1
    You're not going to be able to use sda1 on your root file system because EFI is between that partition and your Ubuntu root file system. I also do not see any other Windows partitions. The other two partitions are Linux filesystem. Either your details are unclear or they do not support the question you are trying to ask. It's hard to answer when your details do not match with the description in your question. – Nmath Dec 21 '21 at 21:40
  • And no, you cannot merge partitions keeping the data on both partitions. You should definitely have backups in any case but especially when you are making changes to operating systems, partitions, or file systems. Generally in these cases it's easier to format everything and reinstall. – Nmath Dec 21 '21 at 21:41
  • Two alternatives are to either move /home to new larger partition or just use it as a data partition. To move /home uses rsync- Be sure to use parameters to preserve ownership & permissions https://help.ubuntu.com/community/Partitioning/Home/Moving Link is for another drive, but it can be same drive. https://askubuntu.com/questions/1013677/storing-data-on-second-hdd-mounting & https://askubuntu.com/questions/1058756/installing-all-applications-on-a-ssd-disk-and-putting-all-files-on-hdd-disk – oldfred Dec 21 '21 at 21:45
  • @Nmath sda1 seems like i don't need it anymore. Because I already deleted the Windows. And What details should I provide exactly? – sabirrajabov Dec 21 '21 at 21:53
  • @oldfred The first method you mentioned sounds good. I will try this. Thank You – sabirrajabov Dec 21 '21 at 22:01
  • The details that don't add up are your narrative that somewhere on this drive is the partition where Windows was installed but your fdisk output does not show this partition. You can delete the sda1 partition but you won't be able to add it to your Ubuntu file system because the EFI partition is in the way. – Nmath Dec 21 '21 at 22:55
  • No I said that, I deleted the windows via OS-uninstaller tool. But thank you for your advice – sabirrajabov Dec 21 '21 at 23:02

0 Answers0