On Thu, Jul 15, 2021 at 10:15:59PM +0200, Stella Ashburne wrote: > > From: "David Wright" <deb...@lionunicorn.co.uk>
> > Best I can do. (And I see that your kernel's naming of sda/sdb > > is more stable than on at least a couple of my machines.) > > > What did you mean by "more stable"? The reason we strongly discourage the use of /dev/sda1 (and similar device names) in the /etc/fstab file is because those device names are not stable. This means they are not guaranteed to remain the same each time you boot. The disk that is called "sda" right now might be called "sdb" next time you boot. This can happen due to kernel changes, hardware changes, or simply race conditions even if *nothing* has changed. Because of this unreliable naming, various alternatives are suggested. On most Debian installs, the fstab file is populated using the UUID of each file system that's known at installation time. That looks something like this: # <file system> <mount point> <type> <options> <dump> <pass> # / was on /dev/sda7 during installation UUID=c4691ccb-2090-491e-8e82-d7cc822db04a / ext4 errors=remount-ro 0 1 # /boot/efi was on /dev/sda1 during installation UUID=4C30-7972 /boot/efi vfat umask=0077 0 1 # /home was on /dev/sda8 during installation UUID=19fb397b-a113-4536-a03d-d60e176cbfdf /home ext4 defaults 0 2 # /stuff was on /dev/sda9 during installation UUID=95058c4a-44e2-4a90-87b5-2a5fe40d3cdb /stuff ext4 defaults 0 2 # swap was on /dev/sda6 during installation UUID=08c87bdb-17f4-40ab-9b2f-5cb2f29149fb none swap sw 0 0 /dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0 Another method is to put "labels" on each file system, and then use those labels in the fstab file. That works great for some people, especially people who are very organized, and like to take charge of the details themselves. Another method is to identify some unique device that will always refer to the device in question, and use that in the fstab file. For example, you might decide that on your particular system, /dev/disk/by-path/pci-0000:00:17.0-ata-1-part9 is a reliable name, and will always refer to the partition that you want to mount, and you may choose to use that in your fstab file. (This is a device that I pulled at random from my desktop PC, and it's referring to a partition by referencing the PCI ID of the disk controller. This is actually *not* a stable name. It's a very bad name. PCI IDs change all the time, and should not be relied upon. *cough* network interface naming.) Anyway, that's what "stable" means in this context.