0

some time ago I installed ubuntu 20.04 to my laptop. I believe that I used the default options for mounting partitions. I am now having trouble understanding how it is set up and I would be grateful for some help.

Here are the contents of the fstab file:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/nvme0n1p2 during installation
UUID=e19799b8-02b4-470b-ab41-97ac0f760845 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=50D6-96DC  /boot/efi       vfat    umask=0077      0       1
/swapfile                                 none            swap    sw              0       0

When I run the Disks utility, it indicates the presence of 2 disks: 1) 256GB flash drive 2) 2TB SSD.

The 2TB SSD does not appear to be listed in the fstab file, though it does appear in Thunar at /media/erik/0d210810-0cf4-48f3-ba54-47a08261c8e5/.

The information displayed in the disks utility includes the following:

Contents: Ext4 (version 1.0) — Mounted at /media/erik/0d210810-0cf4-48f3-ba54-47a08261c8e5

If I click on the gear icon and then "Edit Mount Options", it displays a screen which lists information including:

Mount Point: /mnt/0d210810-0cf4-48f3-ba54-47a08261c8e5

So here are some of the things that I do not understand:

  1. How come the 2TB SSD is not listed in the fstab file?
  2. I suppose that a command gets executed during startup to mount the drive, where can I see that command?
  3. As mentioned above, when I inspect the drive in the disk utility...

The main screen shows the mount point as:

/media/erik/0d210810-0cf4-48f3-ba54-47a08261c8e5

And the "Edit Mount Options" screen shows the mount point as:

/mnt/0d210810-0cf4-48f3-ba54-47a08261c8e5

How come those two values are different?

  1. My home directory is on the 256GB flash drive, how can I move it to the 2TB SSD?

  2. How can I change the name of the directory at which the 2TB SSD is mounted?

Thanks in advance for any assistance.

1 Answer 1

2

Partitions on internal drives in your computer are not mounted automatically, except for the partitions that were included in fstab. By default nowadays, only one partition is mounted in /etc/fstab, the root partition.

Partitions on removable drives (e.g. USB drives) are automatically mounted by the graphical desktop under /media/<username>/<string>, where <string> is the volume label, or the partition's UUId if the volume has no label.

How come the 2TB SSD is not listed in the fstab file?

See above. You still can have it mounted automatically by using the utility "Disks", or adding an entry in /etc/fstab yourself.

I suppose that a command gets executed during startup to mount the drive, where can I see that command?

External drives are mounted when logging in using the udev system.

The main screen shows the mount point as: /media/erik/0d210810-0cf4-48f3-ba54-47a08261c8e5 And the "Edit Mount Options" screen shows the mount point as: /mnt/0d210810-0cf4-48f3-ba54-47a08261c8e5. How come those two values are different?

The first mount point is how the drive currently is mounted through the udev system. The second mount point is how the Disks utility would include it in /etc/fstab. If you would activate that, then, next time, that would be the mount point rather than the first one.

My home directory is on the 256GB flash drive, how can I move it to the 2TB SSD?

By default, Ubuntu is installed with a single root partition, which also contains /home. One can install a system using a separate partition for /home. It is also possible to move the /home folder to a separate partition after installation.

How can I change the name of the directory at which the 2TB SSD is mounted?

Give the volume a label. That label will then be used by the udev system to determine the name of the mount point.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.