If you experience that eg /dev/sdb1 hops around at each boot, causing grief, a possible solution is to use UUIDs instead in fstab.

UUIDs are uniquie and tend to stay the same and won't hop around.

 

Finding the UUID

$ blkid
/dev/mapper/vgkubuntu-swap_1: UUID="ca1c30f5-6d97-400d-a517-26c0ab582c6f" TYPE="swap"

/dev/mapper/vgkubuntu-root: UUID="f8a0e11b-4d47-44f7-82fc-dd80adcb60fc" BLOCK_SIZE="4096" TYPE="ext4"
...

 

Using the UUID in /etc/fstab

$ sudo -i
$ nano /etc/fstab
/dev/mapper/vgkubuntu-root / ext4 errors=remount-ro,relatime 0 1
/dev/mapper/vgkubuntu-swap_1 none swap sw 0 0

Change the above to the below

UUID="f8a0e11b-4d47-44f7-82fc-dd80adcb60fc" / ext4 errors=remount-ro,relatime 0 1
UUID="ca1c30f5-6d97-400d-a517-26c0ab582c6f" none swap sw 0 0

 

Where to find the different UUIDs - an overview

$ cd /dev/disk
$ ll
drwxr-xr-x 2 root root 440 feb 6 07:06 by-id/
drwxr-xr-x 2 root root 80 feb 6 07:06 by-partuuid/
drwxr-xr-x 2 root root 320 feb 6 07:06 by-path/
drwxr-xr-x 2 root root 120 feb 6 07:06 by-uuid/

$ ll by-uuid
lrwxrwxrwx 1 root root 10 feb 6 07:06 634E-CB92 -> ../../sda1
lrwxrwxrwx 1 root root 9 feb 6 07:06 666010af-73d7-416a-b9dc-d043f0bd1524 -> ../../md0
lrwxrwxrwx 1 root root 10 feb 6 07:06 ca1c30f5-6d97-400d-a517-26c0ab582c6f -> ../../dm-1
lrwxrwxrwx 1 root root 10 feb 6 07:06 f8a0e11b-4d47-44f7-82fc-dd80adcb60fc -> ../../dm-0

 

 

Sources

https://help.ubuntu.com/community/UsingUUID
https://linuxhint.com/uuid_storage_devices_linux/
https://serverfault.com/questions/54862/where-does-ubuntu-store-partition-uuids-on-disk

 

 

 

 

 

 

 

 

 

 

 

Stop Spam Harvesters, Join Project Honey Pot

 

Get a free SSL certificate!

 

The leading nonprofit defending digital privacy, free speech, and innovation.

 

The Linux Foundation provides a neutral, trusted hub for developers and organizations to code, manage, and scale open technology projects and ecosystems.

 

Kubuntu is an operating system built by a worldwide community of developers, testers, supporters and translators.

 

 43ef5c89 CanonicalUbuntudarktext