Creating Hard Drive Partition for Home Folder

Ubuntu Support Template

Ubuntu Version:
25.10

Desktop Environment (if applicable):

Problem Description:
Hello I’m trying to create a partition on a secondary hard drive for my files while my primary just contains my OS and software and I’m not sure where to start other then going to disk utility.

Ive been surfing for an article on the matter but so far I haven’t found anything, please direct me to one if possible. Thank you :slight_smile:

Relevant System Information:
Using SAMSUNG 990 PRO Heatsink SSD 4TB on a brand new Asus ROG STRIX X870E-E GAMING WIFI ATX AM5 Motherboard

I’ve never used the Disk Utility so can’t help with that if you want to use it. Gparted is a partition manager which is generally on the Ubuntu install disk/usb. If you don’t have it installed on your current Ubuntu you can install from a terminal with: sudo apt install gparted. If you have never used a partition manager (gparted specifically) there is an online manual at the link below which explains in detail how to do everything.

https://gparted.org/display-doc.php%3Fname%3Dhelp-manual

If you want to create your /home partition on another device, you will need to have it permanently attached and have an entry in it in the /etc/fstab file. You can also easily find tutorials online on how to do this. You could start by reviewing the link below.

https://wiki.archlinux.org/title/Fstab

We can’t really give you any more specifics since we don’t know anything about your drives. You could run either command: sudo fdisk -l OR sudo parted -l and post the output here as it will list your drives/partitions.

1 Like

I use a partition on a 2nd drive for my data:

NAME   FSTYPE   MOUNTPOINT                            SIZE
sr0                                                  1024M
vda                                                    20G
├─vda1                                                  1M
└─vda2 ext4     /                                      20G
vdb                                                    25G
└─vdb1 ext4     /mnt/Common-Files                      25G

You just have to add a line in /etc/fstab so that the partition on the 2nd disk mounts on startup.

I use a subfolder of /mnt as the mountpoint, but it could mount in your home folder as well. The setup above is in a VM, but it’s done the same way on a real install. This mounted partition is not your home folder - that remains on the OS disk.

Added info:
I separate this mounted folder from the home folder, as it is used in a multiboot system for shared data between several OS. The OSes that share files here cannot share their home folder, as that contains configuration files for a particular OS.

The information below applies to a desktop configured with a login screen.


File: /etc/fstab ( last field must be 1 )

UUID={masked} 	/DB001_F2 	ext4 	{options_list)	0	1

I have the following two files for systemd to ensure my required second partition (/DB001_F2) is properly mounted before continuing with the remaining processes:


File: /etc/systemd/system/lightdm.service.d/override.conf

[Unit]
RequiresMountsFor=/DB001_F2

File: /etc/systemd/sysinit.target.d/override.conf

[Unit]
RequiresMountsFor=/DB001_F2

If you boot directly to the GUI, without a login screen, then you might need to specify a different target to ensure the partition is mounted.



My Configuration:

	Filesystem      Size  Used Avail Use% Mounted on

	/dev/sda3       192G   76G  106G  42% /

	/dev/sda7       289G  265G  8.9G  97% /DB001_F2
	/dev/sda8       289G  256G   19G  94% /DB001_F3
	/dev/sda9       289G  249G   25G  91% /DB001_F4
	/dev/sda12      192G  163G   19G  90% /DB001_F5
	/dev/sda13      192G  166G   17G  92% /DB001_F6
	/dev/sda14      288G  230G   44G  85% /DB001_F7
	/dev/sda4        92G   22G   66G  25% /DB001_F8
1 Like

If new drive, be sure to use gpt partitioning. I think gparted still defaults to the very old MBR(msdos), but have not used it for a couple of years on a new drive.

I also like to have more than one install, but not share /home. So i use a data partition for just about everything in /home except the hidden (.) files. When SSD was smaller, I had data on HDD. Now with larger SSD I keep data also on SSD, and use HDD for backup and test installs. So I like to have an ESP - efi system partition and several partitions for a / (root) for testing on every drive. I use LTS but like to know changes to typically install latest version.

You can move /home to a new partition, whether another drive or same drive.
Details:
To move /home uses rsync- Be sure to use parameters to preserve ownership & permissions
Move Home
Some info is older, but procedure is correct. Now use sudoedit not sudo gedit and use ext4 not ext3.

1 Like