18

I have a 128GB SSD and a 1TB HDD. I want to use my SSD for root and home partitions and use the HDD for mass storage where I'll store movies and other files. How do I do that?

4 Answers 4

16

Step by step tutorial (just skip what you already did):

1. Boot from the installation drive

Create a bootable USB drive with the installation image and then boot from it to begin the OS installation.

2. Go through the installation process

Choose the options that suit you best. When prompted to choose instalation type, select "Something Else" to create the partitions for the OS. To create a partition, just click the "+" sign on "free space". You will need to create the following partitions on your SSD:

  • root
    • Size: 30-50GB
    • Type: Primary
    • Use As: ext4 Journaling file system
    • Mount Point: /
  • swap (optional)
    • Size: see this post to decide on a size (and whether you want swap at all)
    • Type: Logical
    • Use As: swap area
  • home (optional, check this post for more info)
    • Size: the rest of your free space, generally
    • Type: Logical
    • Use As: ext4 Journaling file system
    • Mount Point: /home

3. Set up your HDD to mount automatically on boot

Easiest way to do this imo is through the gnome-disks GUI tool (to use it, just open a terminal - Ctrl+Alt+T, type in sudo gnome-disks and enter your password). Select your HDD, click on the cogwheels -> "Edit Mount Options...", enable "Mount at system startup" and choose a mount point (for example, /mnt/sda1 or whatever that device is identified as, or /media/user/DATA).

4. Link ~ (/home/user) media folders to the HDD for easy access

You will have a few default media folders in your ~ folder, which you might want to have on the HDD instead. To move them to the HDD while still being able to access them easily from /home/user, you will need to move those folders to the HDD (or just delete them and create other folders) and then create symbolic links instead, using a terminal command like:

ln -s /mnt/sda1/Downloads ~/Downloads

That's it! You're all set!

5
  • Is making a separate home partition necessary ? Is there any other problem except the future upgrading issue if I install it on the ssd as just / partition ???? And I will not require swap....
    – iHaveToPee
    Jun 24, 2018 at 7:49
  • 1
    No, the /home partition is not absolutely necessary either, but you will usually want to have it there. I'll edit the answer to point that out.
    – SakoDaemon
    Jun 24, 2018 at 8:43
  • 1
    Is it still necessary to mount at boot? I think unmounted partitions show up in nautilus, or is that only the case with non-extfs? Oct 10, 2019 at 12:02
  • They do show up in Nautilus, but won't work straight away if you want to access them from the terminal window.
    – SakoDaemon
    Mar 15, 2020 at 12:20
  • I would encourage a separate home partition. When that file system containing root fails you'll cry blood when
    – chx101
    Jul 27, 2022 at 2:45
3

Simply install the system on your SDD. Your HDD and any other media you add afterwards will be integrated automatically.

For your HDD, you don't have to:

  • mount it anywhere
  • partition it
  • edit /etc/fstab
  • configure it

Doing anything of that is something you had to do some 10-20 years ago but not with a modern system like 18.04 Ubuntu. Nowadays, all of that is optional. Hard disks also are often sold preformatted in NTFS which is good enough for your media files.

If you have to format it, it makes more sense to do so after system installation. This makes it easier to avoid mistakes or change your configuration. This way you can also use gparted. Gparted is the easiest and safest partitioning tool available on Linux.

sudo apt install gparted
gparted

After logging into you computer you will find your HDD in Files --> Other locations together will all other media.

If you have at least 16GB RAM, you won't need a swap partition (unless you do very heavy multitaskting).

If you encrypt you home directory (which is recommended), having a /home partition won't save you any trouble. Moving an encrypted home to a new system is not a simple task. It's a lot easier to move the files while they are unencrypted, e.g. by packaging and copying them to a new home directory.

And of course, as your SDD is rather small, partitioning would most likely waste space. When you /home fills up, you'll start wondering about the 10-20 free GBs on /root. Tweaking is also a must as extX filesystems usually come with reserved space for the root user. However, your root user account does not require space on your /home partition.

1

Install Ubuntu on the 128GB drive. I advise you to make 3 partitions.

  • / ... root (~50GB)
  • /swap ... 1.5 - 2 times your DRAM size
  • /home ... it is wise to have a own home partition for upgrading and system issues

Format your hdd and mount it as e.g. /home/myVideos

1
0
  • Install to the 128GB drive.
  • Format the 1TB drive.

At this point it’s a separate drive after installation and will be shown like a usb drive.

Assuming you want all Documents, Movies and Music on that drive,

  • Move the folder to the external drive.
  • Create a symlink between each of those and your user’s home folder.
4
  • You skipped a step: add the HDD to the fstab.
    – wjandrea
    Jun 22, 2018 at 15:26
  • 1
    if you make a new installation and make the partition as shown it get automatic mounted.
    – abu_bua
    Jun 22, 2018 at 19:34
  • @wjandrea if you format on install, it gets added automatically.
    – rovr138
    Jun 22, 2018 at 21:55
  • @rovr138 Ohh, i didn't know that, sorry.
    – wjandrea
    Jun 23, 2018 at 19:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .