$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 2.7T 0 disk
└─sda1 8:1 0 2.7T 0 part /drive-b
sdb 8:16 0 2.7T 0 disk
├─sdb1 8:17 0 1G 0 part /boot
├─sdb2 8:18 0 840.4G 0 part /
├─sdb3 8:19 0 1.9T 0 part /home
├─sdb4 8:20 0 8M 0 part
└─sdb5 8:21 0 14.7G 0 part [SWAP]
sr0 11:0 1 1024M 0 rom
and here’s my fstab
$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=0e97cff0-f85d-4988-b17c-71bb23006521 /boot ext4 defaults,noatime 0 2
UUID=463767c5-0644-4b77-acc5-a49e7b8c3429 / ext4 defaults,noatime 0 1
UUID=9a80c605-d075-48c3-bd5a-cda588c782d4 /home ext4 defaults,noatime 0 2
UUID=c9a7ada7-bbd5-46d0-bd56-52440973b6e0 none swap defaults,noatime 0 0
UUID=48946de2-efca-4e0c-abcc-fcd8b565273b /drive-b ext4 defaults,noatime 0 2
I don’t know what you mean with “swapping”, but Linux reads the EFI/BIOS and when the EFI/BIOS says that the first hard drive is on SATA port 1, then it will be /dev/sda, SATA Port 2, then it will be /dev/sdb, and so on.
Easy fix would be then plugging the Manjaro HDD to SATA Port 1.
I don’t think that’s what he means. He means on consecutive reboots, the system see physical drives with different /dev/sdXX
I have seen that too on a friend system (made sure I installed Manjaro on the drive at /dev/sda but then after reboots and/or adding other drives it changed everything). Never found the ‘reason’ (actually there are but whatever) or a ‘fix’.
But in the first post I see, what I was going to suggest, that you are using the UUID instead of /dev/sdXX so that doesn’t even matter. Maybe you didn’t explain fully the issue here? What is the issue exactly? Is it that the /dev/sdXX change randomly (but without any other issue)?
Where the system sees the drives is not really a problem or important.
So again, can you elaborate more on the actual issue you’re having?
OK then I can’t help more. I think the ‘issue’ is how the motherboard initialize hardware or something like that, happening during the boot process and if my instinct is right, then not really anything we can do about it.
What is the purpose of needing them to be the same? If you mount one drive as home and another drive as a folder somewhere then you should be able to do whatever you want using the folder.
Whatever drive is home should already be mounted based on UUID in fstab but any other drive you can mount in fstab with the UUID to a specific folder.
For instance I have an SSD that is mounted as Home and I have 4 HDD’s mounted as folders under /mnt such as /mnt/storage /mnt/backup etc.
If you want to do it that way go into the directory you want to create the folder then type sudo mkdir foldername
then give it ownership to your user with sudo chown yourusername:yourusername foldername
there are a couple ways to do the next step either edit the fstab file manually with say nano
or use a program like gnome disks to do it for you.
If your DE comes with the program in accessories Disks enter that program find the drive you want to mount. Click on the drive, click on the gear icon and go into Edit Mount options. tick on mount at startup.
If you want to still be able to see it as a device tick on show in user interface
Find line Mount Point and change it to the folder you created.
From then on your HDD will be mounted as a folder whenever you startup your computer. You can then use that folder name for any scripts or links you want to create.
For instance on my storage drive I keep my pictures, videos, music and documents folders but use sym links to the home folder.
Or is there some other reason you need it to be constant?
//EDIT: weird I didn’t see replies #4 and #5 when I previously replied, didn’t have their notification either.
This would be your solution @elfroggio if you didn’t see it either:
I think the reason is that the devices are named in the order they are being detected. And that depends on the time the HD needs to spin up and respond “ready”. sda is the first drive responding “ready”, sdb is the second drive and so forth.
The time it takes a drive to respond “ready” is not 100 % reproducible. It can vary by milliseconds. That is just natural. Therefore some times the order of drives can change.
But that is not a problem. Nobody needs drive names like sda, sdb, etc. All drives have a unique identifier and this UUID is supported by all relevant Linux tools who deal with drives.