I am going to install Gentoo Linux onto an old hardware, which motherboard is having both IDE and SATA hard drives. I have two IDE and one SATA hard drives connected, and plan to do RAID on them.
However I notice a problem: the hard drive mapped to /dev/sda changes on every boot!
I was searching for answers from the Internet. And I found Persistent Device Names could be a solution. However I am worrying about will it run into compatibility problems system wide? In addition, it is quite inconvenient (because the names are quite long) unless I can use
/dev/disk/by-label. But it seems
by-label cannot refer to
/dev/sdb - only
/dev/sda1 is possible. Moreover, for my old hardware that uses BIOS, I think I can only use MBR, but not GPT. How to change the disk labels in the MBR environment?
On the other hand, the ideal solution in my mind would be, the
/dev/sda is mapped to the same hard disk in every boot. Imaginary, this can be achieved by saving a file named "bootmap" on the hard disk. And "/sda" is written in the "bootmap" file. While the system boot, if it finds "/sda" inside "bootmap", the drive is mapped to
/dev/sda. If it finds "/sdb", it maps to
/dev/sdb. And so on. (But I know it is probably not so ideal.)
So, how to avoid the mapping of
/dev/sda changes from boot to boot?
As an alternative, way to edit the label would be nice too. - given that it won't get a compatibility issue anywhere.
(PS - either ways, there is not a solution on the Internet yet.)