Ubuntu – How to install Ubuntu 18.04 on SSD+HDD hybrid with proper partitioning

18.04partitioning

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?

Best Answer

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!

Related Question