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