What can I do with unallocated space that I can't assign to my main partition?

I recently removed WIndows from dual-boot using GParted. I resized my main partition (ext4) by some 100GB. I wanted to add more but I wasn’t able to. Now I have 200gb of unallocated space which I need. Can I make it an ext4 partition and use it alongside my main partition? I was thinking to store my media, VMs, etc on it.

You can’t move/resize a mounted partition, and your root is always mounted.
Boot a live media, start GParted from there, and resize that partition as you whish.
Alternately, you can create a new partition, format it and use it as you like: update your /etc/fstab to mount the new partition to a mount point you like.

4 Likes

You’re too quick for me. I was in the middle of typing this out. LOL …

Just checked, if there’s something I can chime in :smiley:
I wasn’t in a hurry.

It’s ok, you worded it better than I was going to anyway… :slight_smile:

1 Like

@kovacslt has the answer, but can I add my bit
No need to move it. Just put an ext4 filesystem on it , and mount that partition when you boot… use /etc/fstab as @kovacslt said.
I do exactly that… keep all my data out of the home directory in a separate mounted partition. It means I can multiboot several linuxes, and they can all use the same data partition.
Regards
Neville

2 Likes

That got my full attention. Can I get more on that? Like is it safe? Can I install Arch?

If it is not a problem, can you explain it more? I have no idea what fstab is.

That fstab is a file and it resides in /etc directory.
It describes devices, mount points, and mount options, and the system mounts those devices to the described mount points on boot.
You can’t edit that file with regular user rights, you need to be root to do it, so either login as root, or gain root privileges via sudo, either use sudo many times, like sudo command to run command with root rights, or issue the command sudo su (being lazy I prefer this method) so every command you run in terminal will run as root.
If you never edited /etc/fstab, be careful, as a wrong entry in that file can make the system unbootable (in this case most probably you can repair it with a “recovery” startup from GRUB, but surely with booting a live media, then edit from there etc/fstab and remove the wrong entry).

So be careful with editing fstab!

I’d do it as follows:

  1. Format that partition (I prefer ext4, but theoretically you can choose whatever filesystem, based on your needs)

  2. Create a mount point for it in your file system, where you want to access it: say you want it in /mnt/thenewpartition
    So create the mount point:
    mkdir /mnt/thenewpartition

  3. Add an entry to the fstab:
    You need the UUID, which blkid will tell you. Run blkid as root, it will list your partitions, I put here my output, as an example:

root@Nagygep:/home/laco# blkid
/dev/nvme0n1p1: UUID="8C13-E849" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="b6c984c6-2f7f-4670-8fbc-626577d74f0f"
/dev/nvme0n1p3: UUID="e1c72738-036c-46f9-9c02-c7e822c04d80" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="bb39c161-5db7-4ee1-82fe-9599e25f83a7"
/dev/nvme0n1p4: UUID="c761bc50-ff2d-40ab-981e-b91e6d9b5010" TYPE="swap" PARTUUID="815800ce-f3cc-412a-b122-a3bb12e31db7"
/dev/nvme0n1p5: UUID="342c4dbd-19cc-43d1-805c-97a6e6c1e41f" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="5d47d2f8-692b-4296-8068-60784567f31e"
/dev/sdc1: LABEL="home-ext" UUID="d3572f4a-c6bd-4301-9cb8-22573e497469" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="0314e9e5-01"
/dev/sdb1: UUID="1ae1c426-bf78-4e4b-9135-590230e0d664" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="3c0d1cbb-f61d-49fd-93cc-693e30576e5e"
/dev/sda1: UUID="6dba166c-a4c0-4ffa-a5ef-4526d69598ea" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="cbaa6288-eec7-4300-9f96-8ee67ccc1393"
/dev/sdd1: UUID="a2e45cce-4c0a-4871-a2b2-7e2ed9c4620d" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="944cef63-0044-4b70-aee8-bc9d7e298ef8"
root@Nagygep:/home/laco#

Identify your partition, and highlight the UUID of it, then press shift-ctrl-C (that copies that string from your terminal).

Run nano as root to edit the fstab:
nano /etc/fstab

Using nano, append an extra line, like this:
UUID=#####-#####-###-#### /mnt/thenewpartitionc ext4 defaults 0 2
(These are sane values for an ext4 formatted partition).
You can enter the UUID by pressing shift-ctrl-V, which inserts the contents of the clipboard into the terminal, in this case the new partitions UUID, as you copied it before…
Press ctrl-X, which exits nano, it will ask wether you want to save modifications.
Do save it.
Theoretically you could reboot right now, but I recommend to issue the command:
mount -a
That processes the fstab.
If you get an error message, check what it is, and don’t reboot, something is wrong with the fstab.
If you don’t get any error message, you’ll have the new partition in /mnt/thenewpartition directory.
(Probably you’ll have to modify acces rights on that partition if you want to write to it as regular user, but this is another question.)
(Of course it’s up to you how you name the mount point, and whichever filesystem you choose, but make sure you adapt my recype to your choices).

3 Likes

Thank you so much for the fast and helpful response! I will get to it right away.

1 Like

It is good to know about fstab and how it works, but you can add partitions without having to update fstab. I have 7 different partitions and only 4 partitions are defined in fstab and those 4 were done by the installed process of Linux. The 4 partitions on my system that are in fstab are “/” (root), swap, /boot/efi, and /home. I have no problems with the other 3 partitions, nor do I have to mount them.

Now if you move one of the partitions (not resize it) defined in fstab, then yes, you have to update fstab because the UUID name has changed.

What @kovacslt posted is good advice, but in my case it was optional.

4 Likes

Yes, it is safe to have multi Linuxes on one system / one HDD. I once had 4 or 5 different LInux OS’s on one hard drive. So yes, it works fine with one exception.

Some Linux OS’s Grub are not compatible with other Linux OS’s. There is a good discussion on multi-boot on this forum at;

5 Likes

Thank you very much!

1 Like

You could also take this opportunity to make a good backup of your data (or two). Then reinstall your chosen OS from scratch. You’ll get that new install smell and can use all of your disk.

3 Likes

Howard has answered this.
You need at least a separate root partition for each linux
You have to choose one linux to be the controller of grub, and issue all grub commands ( such as grub-install and update-grub) from within that one linux
When installing any non-grub-controlling-linux, you need to avoid the step which writes grub to your disk
Do some reading before you attempt this
Do full backups before you do any disk partitioning or new install.

3 Likes

Thank you for our advice! Do you know how to avoid installing grub when using the guided installation of arch?

I have not installed Arch… in most installers there is a question at the end about where to install grub, and one option should be to not install it.
If Arch is like Gentoo, ie you install it with a sequence of commands, then you simply dont issue the command to install grub.

I might add that if you do not install grub, Arch will not appear in the grub boot menu, until you go back to the distro that controls grub, and issue an update-grub command there.

5 Likes

Thank you!

1 Like