Two Hard Drives, want both mounted on login

I have just purchased a SSD and installed Ubuntu 18.04. I have a spinning drive also.
am new at this and there is no LUG near me.
I am trying to migrate totally to linux.
To succeed, I have two problems to solve.

  1. I need to mount the second hard drive automatically on startup. This will become my data drive.
    I will keep data here instead of the HOME folder, or perhaps make this drive the HOME. I would also like to rename the partition.

  2. I want the SWAP partition on the spinning drive.

I am fine with being directed to items to read.

I seam to be asking more advanced questions than the beginning books will address, so a more advanced book could be useful if someone has an good resource. Online, Kindle, or dead tree versions would all be appreciated.

Larry Morgan

I do not m

1 Like

Hi Larry,

if you want all drives to mount, take a look here:

https://help.ubuntu.com/community/AutomaticallyMountPartitions

I hope it helps. :smiley:

If you did a new install on a new drive, the installer won’t make a swap partition. It created a swap file. You don’t need to make swap partition.

Data Partition Mount at Startup:

You can copy the line below and paste into /etc/fstab at bottom. Change the UUID to the UUID of the data partition (file system) on the 2nd drive that you want to mount. On startup, this example mounts the ext4 file system matching the given UUID at /mnt/Data

UUID=c3121154-ee33-418b-8c43-10377841e3c2 /mnt/Data ext4 defaults 0 2

Read UUID for your partitions (file systems) from this command:

lsblk -o name,UUID

After reboot and checking that the automount worked, change owner of the mount point (/mnt/Data) to you user name. Then you can use it.

sudo chown -R name:name /mnt/Data
2 Likes

Well, this locked up my system. I apparently do not know the formatting of the second drive as the error message says it could not find ext4.
After learning to use VI, I was able to comment out the line. When I check the second drive properties, I see a file type of fuse. Do I replace ext4 with fuse?

I appreciate the help and tolerance of someone who has not really learned linux yet.

I got far enough to see udisks in not in Ubuntu Mate 18.

How do I get that command without installing Gnome?

udisks is obsolete. It is replaced by udisks2. udisks2 is used by OS when mounting inserted usb drive. udisks2 has different commands than udisks. You can look them up. Best way to mount 2nd hard drive is from an entry in /etc/fstab as described, and not using udisks2 commands.

1 Like

Larry,

You can verify the format of your second hard drive by entering the following command in a terminal

lsblk -f

In the example below you can see one partition that is vfat (boot partition), another that is ext4 (root partition), and a third that is a swap partition.

$ lsblk -f
NAME FSTYPE MOUNTPOINT
sda
├─sda1 vfat /boot/efi
├─sda2 ext4 /
└─sda3 swap [SWAP]

There is only one disk involved in the above example. Your first disk will probably be listed as sda, and your second disk will probably be listed as sdb. You can verify by disk size as long as both disk are not the same size.

Also for future reference, Ubuntu 18.04 uses a swap file, not a swap partition. Which is different from Ubuntu 16.04.

1 Like

Hallo lpmorgan1

Welcome to Ubuntu-Mate and FLOSS. :slight_smile:

You may find the information in this post useful:

I also have an SSD / HDD setup.

Good luck.

1 Like

This approach worked. I had to modify a few things for 18.04 and I went down a few blind alleys, but finally got the job done. This was an excellent starting point. So I had to reinstall everything, that is not too bad.

1 Like

Hallo lpmorgan1

If your problem has been solved, could you mark the topic as solved please?

Happy FLOSS-ing. :slight_smile:

1 Like

I done it for you AJ. :smiley: :thumbsup:

Thank you
I will look to see how to mark it solved when I ask another question.

1 Like