Archive for May, 2021

Mount a disk partition using the UUID in linux.

I was mounting an external drive using the partition device file. I found that over time the mounted partition would give an I/O error. It turned out it was because the device file had changed. I decided to mount it using UUID to see if took care of the issue.

Here what I did to mount it and add it to the startup:

# fdisk /dev/sdc

Welcome to fdisk (util-linux 2.33.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Command (m for help): p
Disk /dev/sdc: 3.7 TiB, 4000787029504 bytes, 7814037167 sectors
Disk model: One Touch HDD
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: E396A756-646C-40DC-A8F8-59CC11D40FA8

Device Start End Sectors Size Type
/dev/sdc1 2048 7814035455 7814033408 3.7T Linux filesystem

Command (m for help): quit

Use this command to determine the UUID:

# blkid

/dev/sdc1: UUID=”20f17e14-71c3-498f-8872-97dcd80c1d3e” TYPE=”ext4″ PARTUUID=”ccbd82af-94e0-431a-a54b-b9100a087133″

You can use lsblk as well:

# lsblk -fs
NAME FSTYPE LABEL UUID FSAVAIL FSUSE% MOUNTPOINT

sdc1 ext4 20f17e14-71c3-498f-8872-97dcd80c1d3e
└─sdc

Add the entry to the fstab:

# vi /etc/fstab

UUID=20f17e14-71c3-498f-8872-97dcd80c1d3e /external ext4 defaults 0 0

Then mount it:

# mount /external

Chrome and Brave – Your connection is not private.

Here a nice trick to get around the seemingly impossible “Your connection is not private” page when you try to access a site with a self signed certificate. I really don’t understand why nobody comes up with a better way to deal with this. We need the transport on our LANs to be encrypted using https. It should be easier to get this done.

Anyway, this is how you get the screen:

This applies to the “Your connection is not private” that has the “NET::ERR_CERT_INVALID” message in it.

Click anywhere on the background of the page, and type “thisisunsafe” and hit Enter. Then, you will proceed to site.

Note: This happens in MacOS, and I seen this is the latest versions of Chrome on linux.

Return top

INFORMATION