Score:0

Resize ubuntu partition after removing windows on dual-boot

cn flag

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...

Nmath avatar
ng flag
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 avatar
ng flag
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.
oldfred avatar
cn flag
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
Radjabov avatar
cn flag
@Nmath ```sda1``` seems like i don't need it anymore. Because I already deleted the Windows. And What details should I provide exactly?
Radjabov avatar
cn flag
@oldfred The first method you mentioned sounds good. I will try this. Thank You
Nmath avatar
ng flag
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.
Radjabov avatar
cn flag
No I said that, I deleted the windows via OS-uninstaller tool. But thank you for your advice
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.