Score:0

Re-partition Ubuntu Server in dual boot to use all the space

mq flag

I'm trying to re-partition Ubuntu Server.

I have a Windows 7 64 bit install and an Ubuntu Server 22.04.2 LTS install dual-booting.

I'm wanting to get rid of Windows 7 and re-partition the drive for Ubuntu Server to have the whole HDD (250gb).

Is there any way to do this?

Ubuntu Server currently has 100 GB of the drive.

oldfred avatar
cn flag
Windows typically is first install, so you have to move left & expand right. But move left is a bit more dangerous as any interruption totally corrupts data, as half moved. You must have good backups. An alternate is just to create another ext4 partition and use as /home or just for data.
catto24 avatar
mq flag
@oldfred that made no sense to me :/ also, how do i do that?
oldfred avatar
cn flag
[Move Home](https://help.ubuntu.com/community/Partitioning/Home/Moving) Link using ~/config/users-dirs.dirs https://askubuntu.com/questions/1462851/shared-home-folder-between-2-linux-os-trippled-booted-w-win11 & 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 I do this with desktop installs, and I do not install any snaps. So while links are a standard feature, some new configurations may not work. Must use live installer for changes.
Will avatar
id flag
In your position, to be honest, I think I’d do a clean install: tell the installer to use the entire drive, it’ll take care of the re-partition / deleting the old OSs. Given that you’d otherwise have to have robust backups in order to move your Ubuntu server partition to the left, it’s probably minimal extra effort just to do a fresh install.
Score:0
in flag

If you are not familiar with GParted “move left and expand right” will not make much sense. GParted is like the Windows Disk Management tool. It displays the partitions on a disk as rectangles spread across the screen in a horizontal row. Check it out on YouTube.

It sounds like the Windows partitions you don’t want are likely to be to the left hand end of that row. To achieve what you want you can use GParted to delete the Windows partitions, move the Ubuntu partition(s) from the right hand end of the row of rectangles to the left and finally expand the Ubuntu root partition to take up the unused space to the right hand end of the row.

All this has to be done from a live environment. You can download a GParted iso from the GParted website and create a bootable usb device from it. Then you can make the changes described above.

If you add the output of lsblk to your question we can clarify exactly the partitions to delete and those to move and expand.

Alternatively if you are using LVM with your 100GB partition all you need to do is delete the Windows partitions, create a new partition and add it to the LVM volume. The process to do this is described here https://www.tecmint.com/extend-and-reduce-lvms-in-linux/

I sit in a Tesla and translated this thread with Ai:

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.