Want to delete Windows partition on a dual boot setup

The above is from an older post, but I wanted to give it it’s own topic so it’s a new question.

I’m looking to delete the Windows partition from a laptop with a dual-boot setup. According to a video I found on how to do this with Ubuntu (reference: A Guide to Switching to Linux | Ubuntu Edition - Part 6 (Removing Windows) - YouTube) using gparted.

I tried this so I installed gparted via the terminal on the installation flash drive of my Mint installer. Following the video instructions, I was able to choose to delete the Microsoft Reserve partition, but the Basic data partition could not be deleted because the trash icon was greyed I then discovered it needed to be unmounted (strange because I’m booted on the installation USB at the moment).

The next step was to choose the ext4 partition and resize it. The video showed the area able to be expanded from half the resize bar to the full area. My situation had the bar at the full available area without the means to expand. With the Windows partitions unmounted and “deleted” (knowing I haven’t committed to resizing yet), I’m not sure why I cannot resize. I did go back a step and see that the Windows partition could be reformatted as ext4, but then I choose to delete and it came up again as 28GB of unallocated space. The resize option for the ext4 Linux partition still cannot be expanded to take up the full space of the HD.


The photo above is the resize options available when I open the dialog. It should match the above setup.

Someone on chat group I’m part of wondered if it was a legacy system on the partition as that apparently can have an effect with gparted. This laptop is a brand new HP 14" machine, very basic, but would definitely have a current Windows 10 installation in it.

I have double-triple-checked and the Windows partitions are unmounted and “deleted”. Yet I do not get “unassigned” space to expand the Linux partition. I don’t understand this, and there’s no clue in the gparted interface.

I wondered about another option…I found your statement above about running Disks to delete the partitions. Okay, I went back to the live Linux boot and found that, and there are my partitions.

1 - EFI System, obvious no.
2 - Microsoft Reserved, yes
3 - Windows NFTS, yes
4 - Linux Filesystem, most definitely no
5 - Windows Recovery environment, yes

Would it really be as simple as selecting 2, 3, and 5 and choosing “-” to delete and then resizing partition 4 to the full area?

This is my “test” laptop that I used to set up Linux the first time. We learned how to do this on this small laptop before we did it on my wife’s HP Envy (successfully!), so I’m learning how to delete the partition here before I do it on the Envy “for real”.

2 Likes

I figured out why it wasn’t able to be resized. I didn’t think about unmounting the linux partition. I was associating unmounting with deletion. I unmounted the linux partition and now the full ability to change is there.

Now I will backup the data from the Linux partition and do a real attempt.

2 Likes

Generally, when you attempt to do anything on any filesystem, such as resizing, compressing, encrypting, drive-mirroring, checking, and repairing, you always need to unmount that partition or drive. This is why the Live USB is so important, as it allows the system to focus on a different partition and leave your main system one unlocked for you to work on.

1 Like

All part of the learning process. I successfully got it done last night on the “test laptop”. We’ll do the main HP Envy in the next couple days when my wife has verified that all her files are moved over to the Linux side, and we back up the Home folder on the external drive.

3 Likes

I just found this thread and it’s exactly what I need to do. I deleted the windows partition, but now how to I unmount it? Do I use the original linux USB I created for the first installation and boot from that?

Nancy
Here is the screen shot of GParted…I want to have Linux use the majority of space.

Hey, Nancy!
The way to go is to select your Linux partition and resize it to cover all the unalocated space that comes in before it. However, when you’re running your system, you can’t unmount the drive. You’ll need to boot from Mint’s Live USB and run GParted from there. Once you do, you can select your Linux Mint partition and under right-click or the Partition menu, you can choose to Resize/Move.
The image that will pop will be similar to the one below:
9823OS_14_02
At that point, you can drag the size of your partition to cover the full bar. Then hit the Resize/Move button to close the window. Then, on the main window, hit the check mark (the last icon on your top toolbar) to apply the changes. :slight_smile:

Thank you Vasileios! It worked perfectly.
Nancy

1 Like

That is great to hear! Great work! :slight_smile:

I finally deleted Win10 and Manjaro from my HP laptop. Before doing so I installed Virtual Box and in VB installed Win 10 and Kali. Will be adding Mac soon. I have one more partition to remove but wanted to run it by you. It says root in GParted. I’m attaching a screenshot. The goal is to delete the 496GB partition then reclaim in into the 1.33TB partition. If I delete the root partition will I need to designate the 1.33TB partition as root? If so, how?

Hey @GrillerMiller!
If you look under the Mount Point column, the “root” isn’t even mounted, therefore you will not have any trouble removing it and expanding the partition that is actually mounted under the / (actual root) directory.

1 Like

Well, I did that and it only boots to grub with an error that the file doesn’t exist. I’ll boot with a live USB in a bit and see what’s up.

Give Boot Repair a shot to see if there’s something that can be quickly resolved. Otherwise, we’ll go into terminal level 3 and see if we can fix things manually. My guess is that it could be FSTAB-related (mapping of partitions according to their UID).

1 Like

I tried Boot Repair and got errors there then on reboot get the same grub error. Attaching pictures.


If worst case is wipe and reinstall, I’m ok with that. I will only need a few things from the Mint Home folder. Which I have access to as an attached device when booting from Live USB.

Thank you for taking the time to help with this Vasileios. It seems I should be able to do this by now but the old noodle doesn’t retain input like it once did.

Hey @GrillerMiller!
Let’s do one last attempt to see if we can fix this.
First, boot from your Linux Mint live USB. Once the boot menu appears, hit the E key on the first option and look for the line that says linux and includes (most likely) quiet splash. At the end of it, add the number 3 and hit F10 to boot into terminal.

Perhaps you can boot normally, but we’ll be changing root to your installation, so I’m not aware if there’s gonna be any glitches while you’re in a graphic environment.

Once you boot in, I’m not sure if it asks you for a root or user password. Normally the username is mint and a blank password. If that works, then start off with:

sudo su

Then, we’ll need to root into your current installation.

mkdir /mnt/boot
mkdir /mnt/boot/efi
mount /dev/nvme0n1p5 /mnt
mount /dev/nvme0n1p2 /mnt/boot/efi

That should place the two major partitions in the /mnt folder as mounts. Unlike Arch, where that is enough, Debian/Ubuntu-based distros need a few more.

mount -t proc proc /mnt/proc
mount -t sysfs sys /mnt/sys
mount -o bind /dev /mnt/dev
mount -t devpts pts /mnt/dev/pts

If any of those give you trouble, it’s safe to ignore it.

Now, all you’ll need to do is enter your installed system:

chroot /mnt

If it asks you for any credentials, use your normal username and password. Then use the sudo su again. Now, we’ll need to create the possibly missing initramfs files. First, we install the utility that handles this for us:

apt update && apt upgrade -y
apt install dracut
dracut --force

This will look for all the available kernels (and force the rebuild for those that already have their files present.

Last, we’ll reinstall Grub and update its configuration so that the boot gets repaired.

grub-install /dev/nvme0n1p2
update-grub

Once that step is done, it’s time for a clean up prior to reboot.

umount /mnt/dev/pts
umount /mnt/dev
umount /mnt/sys
umount /mnt/proc
umount -R /mnt

Now, you can safely do a:

reboot

And see if that helps. :slight_smile:

1 Like

Thank you very much and I’ll copy this for the future but at around noon my time I bit the bullet and started a fresh install. Tried LMDE first since it had worked so well lately on so many systems. However on the newer HP it didn’t work so well. Driver issues right out of the gate. So I went back to the Ubuntu based Mint with the latest drivers for newer computers and I’m almost done copying my data. Tomorrow will be app install day then it’ll be all done. Thanks again!!

1 Like

Win10 and Kali Linux running simultaneously on the HP laptop with a fresh install of Linux Mint Edge.


I have to revise my opinion on Virtual Box. I tried it on the 11 year old i7 MacBook Pro with 16G memory. It was sluggish. On this HP with it’s 8 core i5, 2T nvme and 64G RAM? No problem!

1 Like

A good amount of RAM and a good CPU with KVM/Virtualization capabilities always make the difference. Good job, @GrillerMiller!