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:50] – 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 173: | Line 177: | ||
</ | </ | ||
+ | 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.1689792648.txt.gz · Last modified: 2023/07/19 18:50 by wikiadmin