On Sun, 7 Oct 2018 07:25:55 +0200
"Theodore Driscoll" <theodore.drisc...@iname.com> wrote:

> But I rebooted once more. Now Suse has swapped the names, so what used
> to be /dev/sda is now /dev/sdb and vice-versa. If I reboot again, the
> names sometimes swap back, sometimes do not.

The kernel developers insist that the kernal assigned /dev/sdx names are
not to be considered persistent even for a constant hardware configuration.
Although it certainly is unusual for internal SATA drives to change between
boots (BIOS behavior?) it is not guaranteed that such names won't ever change
between boots.

So, reference the drives using their PARTUUID. The kernel understands this
referencing method natively and will not require any initramfs.

You can see the PARTUUID of all the drives via:

lsblk -o NAME,FSTYPE,PARTUUID

e.g., 7b01c1ac-a7b2-4841-a36d-3a7eb46ed741

For the kernel command line and grub, the format to reference by PARTUUID
is:

root=PARTUUID=7b01c1ac-a7b2-4841-a36d-3a7eb46ed741

https://wiki.gentoo.org/wiki/GRUB

For fstab it is formatted like:

PARTUUID=7b01c1ac-a7b2-4841-a36d-3a7eb46ed741   /       ext2    defaults        
1 1

You will have to have a gdisk-created partition table for each partition
to be assigned a PARTUUID.

Note that you cannot use UUID at boot without an initramfs - as UUID's are
post-udev assigned things and will not be available to the kernel during
the initial boot process.


  Cheers,

  Mike Shell




-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style

Reply via email to