auto_mount_external_drive_at_startup_ubuntu_server_22_04
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
auto_mount_external_drive_at_startup_ubuntu_server_22_04 [2023/07/19 18:32] – wikiadmin | auto_mount_external_drive_at_startup_ubuntu_server_22_04 [2023/07/19 19:50] (current) – wikiadmin | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Auto Mount External Drive at Startup in Ubuntu Server 22.04 ====== | ====== Auto Mount External Drive at Startup in Ubuntu Server 22.04 ====== | ||
+ | |||
+ | **I AM NOT TAKING ANY CHANCES OF MOUNTING ANYTHING. THERE IS A 2TB HARDWARE RAID-1 MIRROR THAT IS MOUNTED, AND I DON'T WANT THE 4TB USB SSD DRIVE TO CONFLICT WITH THAT WHEN THE SYSTEM REBOOTS. IT APPEARS THAT UBUNTU IS SWITCHING THE MOUNTS OF THE /SDA AND THE /SDB AFTER A REBOOT.** | ||
+ | |||
+ | However, I will keep the documentation below until such time as I figure out how to do this without any conflicts, and amend the entire process accordingly. | ||
See: [[https:// | See: [[https:// | ||
Line 100: | Line 104: | ||
/ | / | ||
</ | </ | ||
+ | |||
+ | **How to mount an exFAT drive on Ubuntu - Article from Year 2019** | ||
+ | |||
+ | See: [[https:// | ||
+ | |||
+ | Ubuntu by default does not provide support for the exFAT filesystem. But what about the latest LTS Ubuntu version 22.04? | ||
+ | |||
+ | **Enabling exFAT support on Ubuntu 22.04** | ||
+ | |||
+ | See: [[https:// | ||
+ | |||
+ | Previously, installing the exfat-utils package on Ubuntu was enough. But now it is not. This package is no longer maintained and has been replaced by another one. | ||
+ | |||
+ | First, open a terminal or connect via ssh and update the server | ||
+ | |||
+ | < | ||
+ | sudo apt update | ||
+ | sudo apt upgrade | ||
+ | </ | ||
+ | |||
+ | After that, you can install the exfatprogs package, which is maintained by Samsung engineers. | ||
+ | |||
+ | So, install the package: | ||
+ | |||
+ | < | ||
+ | sudo apt install exfatprogs | ||
+ | </ | ||
+ | |||
+ | So, this is the new way to add exFAT support to Ubuntu 22.04. It is more robust, stable and with better results than the previous one. | ||
+ | |||
+ | Here are the results of running the installation of exfatprogs | ||
+ | |||
+ | < | ||
+ | sudo apt install exfatprogs | ||
+ | Reading package lists... Done | ||
+ | Building dependency tree... Done | ||
+ | Reading state information... Done | ||
+ | The following NEW packages will be installed: | ||
+ | exfatprogs | ||
+ | 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. | ||
+ | Need to get 40.3 kB of archives. | ||
+ | After this operation, 151 kB of additional disk space will be used. | ||
+ | Get:1 http:// | ||
+ | Fetched 40.3 kB in 0s (171 kB/s) | ||
+ | Selecting previously unselected package exfatprogs. | ||
+ | (Reading database ... 156168 files and directories currently installed.) | ||
+ | Preparing to unpack .../ | ||
+ | Unpacking exfatprogs (1.1.3-1) ... | ||
+ | Setting up exfatprogs (1.1.3-1) ... | ||
+ | Processing triggers for man-db (2.10.2-1) ... | ||
+ | Scanning processes... | ||
+ | Scanning processor microcode... | ||
+ | Scanning linux images... | ||
+ | |||
+ | Running kernel seems to be up-to-date. | ||
+ | |||
+ | The processor microcode seems to be up-to-date. | ||
+ | |||
+ | No services need to be restarted. | ||
+ | |||
+ | No containers need to be restarted. | ||
+ | |||
+ | No user sessions are running outdated binaries. | ||
+ | |||
+ | No VM guests are running outdated hypervisor (qemu) binaries on this host. | ||
+ | </ | ||
+ | |||
+ | To make sure that the whole process went well, reboot the server | ||
+ | |||
+ | < | ||
+ | sudo reboot now | ||
+ | </ | ||
+ | |||
+ | Run the Fdisk again: | ||
+ | |||
+ | < | ||
+ | sudo fdisk -l | ||
+ | </ | ||
+ | |||
+ | Disk /dev/loop0: 111.95 MiB, 117387264 bytes, 229272 sectors | ||
+ | Units: sectors of 1 * 512 = 512 bytes | ||
+ | Sector size (logical/ | ||
+ | I/O size (minimum/ | ||
+ | |||
+ | |||
+ | Disk /dev/loop1: 53.26 MiB, 55844864 bytes, 109072 sectors | ||
+ | Units: sectors of 1 * 512 = 512 bytes | ||
+ | Sector size (logical/ | ||
+ | I/O size (minimum/ | ||
+ | |||
+ | |||
+ | Disk /dev/loop2: 53.26 MiB, 55844864 bytes, 109072 sectors | ||
+ | Units: sectors of 1 * 512 = 512 bytes | ||
+ | Sector size (logical/ | ||
+ | I/O size (minimum/ | ||
+ | |||
+ | |||
+ | Disk /dev/loop3: 63.45 MiB, 66527232 bytes, 129936 sectors | ||
+ | Units: sectors of 1 * 512 = 512 bytes | ||
+ | Sector size (logical/ | ||
+ | I/O size (minimum/ | ||
+ | |||
+ | |||
+ | Disk /dev/loop4: 63.45 MiB, 66531328 bytes, 129944 sectors | ||
+ | Units: sectors of 1 * 512 = 512 bytes | ||
+ | Sector size (logical/ | ||
+ | I/O size (minimum/ | ||
+ | The backup GPT table is corrupt, but the primary appears OK, so that will be used. | ||
+ | |||
+ | |||
+ | Disk /dev/sda: 3.81 TiB, 4194304000000 bytes, 1024000000 sectors | ||
+ | Disk model: UDisk | ||
+ | Units: sectors of 1 * 4096 = 4096 bytes | ||
+ | Sector size (logical/ | ||
+ | I/O size (minimum/ | ||
+ | Disklabel type: gpt | ||
+ | Disk identifier: AB3F7F29-78F9-46D2-90C7-B2FC88C5E922 | ||
+ | |||
+ | Device | ||
+ | / | ||
+ | / | ||
+ | |||
+ | |||
+ | Disk /dev/sdb: 1.82 TiB, 1999844147200 bytes, 3905945600 sectors | ||
+ | Disk model: Virtual Disk | ||
+ | Units: sectors of 1 * 512 = 512 bytes | ||
+ | Sector size (logical/ | ||
+ | I/O size (minimum/ | ||
+ | Disklabel type: gpt | ||
+ | Disk identifier: 299F1292-7D64-4846-83BD-CF8BD5034D74 | ||
+ | |||
+ | Device | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | |||
+ | |||
+ | Disk / | ||
+ | Units: sectors of 1 * 512 = 512 bytes | ||
+ | Sector size (logical/ | ||
+ | I/O size (minimum/ | ||
+ | </ | ||
+ | |||
+ | So, this part of the above results looks like the external USB SSD drive we want to mount, and automount: | ||
+ | |||
+ | < | ||
+ | Disk /dev/sda: 3.81 TiB, 4194304000000 bytes, 1024000000 sectors | ||
+ | Disk model: UDisk | ||
+ | Units: sectors of 1 * 4096 = 4096 bytes | ||
+ | Sector size (logical/ | ||
+ | I/O size (minimum/ | ||
+ | Disklabel type: gpt | ||
+ | Disk identifier: AB3F7F29-78F9-46D2-90C7-B2FC88C5E922 | ||
+ | |||
+ | Device | ||
+ | / | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | It does not specify that this USB SSD Drive is exFat, but I know it to exFat by connecting it to a Windows system and looking at its format. | ||
+ | |||
+ | I believe that we need to mount /dev/sda2 which is the 4TB (3.8TB) external USB SSD drive. | ||
+ | |||
+ | < | ||
+ | AB3F7F29-78F9-46D2-90C7-B2FC88C5E922 | ||
+ | </ | ||
+ | |||
+ | **BEWARE THERE ARE MIXED READINGS NOW! | ||
+ | |||
+ | LOOK AT THIS BELOW AND COMPARE | ||
+ | ** | ||
+ | < | ||
+ | lsblk -o NAME, | ||
+ | </ | ||
+ | |||
+ | Results: | ||
+ | |||
+ | < | ||
+ | NAME FSTYPE | ||
+ | loop0 | ||
+ | loop1 | ||
+ | loop2 | ||
+ | loop3 | ||
+ | loop4 | ||
+ | sda | ||
+ | ├─sda1 | ||
+ | └─sda2 | ||
+ | sdb | ||
+ | ├─sdb1 | ||
+ | ├─sdb2 | ||
+ | └─sdb3 | ||
+ | └─ubuntu--vg-ubuntu--lv ext4 0d6b481f-ec40-4951-b6d7-76ba4cde2dfb | ||
+ | sr0 | ||
+ | |||
+ | </ | ||
+ | |||
+ | **I AM NOT TAKING ANY CHANCES OF MOUNTING ANYTHING. | ||
+ | ** | ||
auto_mount_external_drive_at_startup_ubuntu_server_22_04.1689791576.txt.gz · Last modified: 2023/07/19 18:32 by wikiadmin