Linux Lite Forums

Hardware - Support => Hard Drives and SSDs => Topic started by: lc6529 on July 24, 2020, 02:43:51 PM

Title: Always Have To Mount SSD Drive
Post by: lc6529 on July 24, 2020, 02:43:51 PM
I recently added a 2 TB drive strictly to hold VirtualBox images.    For some reason the drive is not mounting automatically though I have it set to automount (at least I believe I have).

Anyway, the workaround is to mount when the desktop loads but that is annoying.

Any suggestions?

Attached are screenshots of the drive setup and settings.

Title: Re: Always Have To Mount SSD Drive
Post by: Şerban S. on July 24, 2020, 03:31:47 PM
[...] Any suggestions? [...]

Hello! :)

Edit the /etc/fstab file.

https://www.linuxliteos.com/manual/install.html#mountpartdrives (https://www.linuxliteos.com/manual/install.html#mountpartdrives)

You can use the following editors: Pluma; GEdit; MousePad; LeafPad.

Start a terminal window, copy/paste the code below than hit Enter:

Code: [Select]
sudo pluma /etc/fstab
If you have other preferences, replace Pluma with the editor you are used to.
Follow the instructions given in the article to get the UUID (GUID) of the drive.
After editing the file, save it then RESTART computer, in order for the changes to become effective.

SAMPLE:

Code: [Select]
# /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/sda2 during installation
UUID=48dfd786-b463-4d54-93d6-76d8e1e91e74 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation
UUID=CF67-8C7A  /boot/efi       vfat    umask=0077      0       1
# /home was on /dev/sda3 during installation
UUID=ededc096-9e8b-4a7b-b074-8e0a4267034f /home           ext2    defaults        0       2
# /win was on /dev/sda4 during installation
UUID=1abd80b2-aaeb-4cf9-84fc-30f5203792f5 /win            ext4    defaults        0       2
# swap was on /dev/sda5 during installation
UUID=6d49fba9-a49d-4f59-9b6c-5eb7d91057f0 none            swap    sw              0       0

In my case, there are two partitions I mount using /etc/fstab:

UUID=ededc096-9e8b-4a7b-b074-8e0a4267034f /home           ext2    defaults        0       2

UUID=1abd80b2-aaeb-4cf9-84fc-30f5203792f5 /win            ext4    defaults        0       2

What you need to do is get the result from blkid command:

serban@T1700:~$ blkid
/dev/sda1: UUID="CF67-8C7A" TYPE="vfat" PARTUUID="c532f390-0f77-433b-9af0-7ea363071291"
/dev/sda2: UUID="48dfd786-b463-4d54-93d6-76d8e1e91e74" TYPE="ext4" PARTUUID="c70d5b86-a05c-4b1e-99dc-d311981baa2d"
/dev/sda3: UUID="ededc096-9e8b-4a7b-b074-8e0a4267034f" TYPE="ext2" PARTUUID="721b71b8-d5a7-4f13-80f8-10ffab030e69"
/dev/sda4: UUID="1abd80b2-aaeb-4cf9-84fc-30f5203792f5" TYPE="ext4" PARTUUID="1288d3e7-997c-4a90-b2e1-81dfb7c5a3d6"
/dev/sda5: UUID="6d49fba9-a49d-4f59-9b6c-5eb7d91057f0" TYPE="swap" PARTUUID="cd007861-002e-4af3-bdf9-56be0bd63efa"
serban@T1700:~$

After you get the UUID, copy one of the lines above, than paste INSTEAD of one of UUID of the two partitions above, the ones with the blue font.

That might look like that:

UUID=your-uuid /home           ext2    defaults        0       2

Instead of /home, it would be a good idea to use GPartEd to put a label to the drive, such as VBox
Instead of ext2, you can use whatever you think is appropriate.
I use ext2 for /home since it spares drive usage. Journalised filesystems such ext3, ext4 are journalised and this leads to many extra read/write operations.




Good luck! :)

Title: Re: Always Have To Mount SSD Drive
Post by: Jerry on July 24, 2020, 03:45:07 PM
Help Manual, Mounting Partitions. Always use our Help Manual before referring to 3rd party websites. Develops good habits and is OS specific with the right pictures.

Sent from my mobile phone using Tapatalk

Title: Re: Always Have To Mount SSD Drive
Post by: Şerban S. on July 24, 2020, 03:53:55 PM
[...] Always use our Help Manual before referring to 3rd party websites. Develops good habits and is OS specific with the right pictures.

Done! :)