SUSE / openSUSEThis Forum is for the discussion of Suse Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803
Rep:
Disk lettering consistency? Is it possible?
When I'm installing openSUSE, the disk letters that I see in the installer vary wildly from the drive letters when the system installation is complete and the system is booted from the hard disk.
I'm not referring to ways to make sure /etc/fstab doesn't break because of drive letter changes---that's what mounting by label is for (and I'm already doing that for non-root filesystems). I'm talking about cleaning off a spare disk (say, /dev/sdd) while running under 15.1 and having it show up as /dev/sda when running the 15.2 installer. I wind up having to repartition disks in funny ways (i.e. make the root partition a slightly different size than I've used in the past and jotting down the number of blocks) to make sure they can be easily distinguished in the installer's partition list. (Gripe: existing partitions that have filesystems and have labels should have those labels listed by the installer's partitioning tool to help mitigate the potential confusion arising from the disk letter changes.)
Any ideas why this happens? Is there a way keep this drive letter shuffling from happening?
Most modern linux systems use a predictive naming scheme so that you shouldn't need to worry about the block dev/xyz naming. However I guess it could be possible to exert some force to get the old naming consistent but I think it will fail. Bios could help usually because some of this is a result of boot order. Booting to different media and using F key or other means can fool that naming. A DVD
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803
Original Poster
Rep:
Quote:
Originally Posted by jefro
Most modern linux systems use a predictive naming scheme so that you shouldn't need to worry about the block dev/xyz naming.
What I find odd/aggravating is that an upgrade from one version of the OS to the next results in different drive letters---it doesn't seem so good at predicting names. :^) When I installed Leap 15.1 on a spare disk after using 12.1/12.2 for a few years, the boot device turned out to be "sde". While installing 15.2 onto what 15.1 saw as "sdd", 15.2 sees it as "sda". When the dust cleared, 15.2 sees the old "sdd" and "sde" as "sda" and "sdb". I haven't figured out where 15.2 moved the old "sda", "sdb", and "sdc". I can't wait to see what 15.3 does to the device names. I'm sure I've mentioned how much of a life-saver "LABEL=" is in fstab.
It's been that way for some time and is the main reason why pretty much all distros use uuid instead of device files in fstab and bootloader configuration. Disk device file enumeration is just not stable. Things that can effect device file naming - bios boot order, adding a new hard drive, version of grub used, place on the sata bus, bios version, probably other stuff as well. Since you have at least five block device files(sda to sde), you may want to liberally use partition labels to more effectively keep track of things. Also, gparted can help you identify drives by device file since drives are probably different sizes and have different partition layouts.
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803
Original Poster
Rep:
Quote:
Originally Posted by kilgoretrout
Things that can effect device file naming - bios boot order, adding a new hard drive, version of grub used, place on the sata bus, bios version, probably other stuff as well.
You've likely hit upon the reason. My hardware configuration hasn't changed in some time but it would be surprising if the same version of Grub was in use by 15.1 as well as 15.2.
Quote:
Since you have at least five block device files(sda to sde), you may want to liberally use partition labels to more effectively keep track of things. Also, gparted can help you identify drives by device file since drives are probably different sizes and have different partition layouts.
Heh... "sde" isn't even the "last" drive on the system I've been upgrading. On one of my (now decommissioned) systems I had a slew of drives in external cabinets: drives sda through sdr (mostly in RAID 1 configurations). That was fun.
Labeling filesystems with tune2fs and mounting by label has been my go-to solution for years---I tend to even mount "/" using a filesystem label ("leap151", "leap152", or whatever). I find UUIDs/PARTUUIDs to be about the most hideous things to use in fstab but, with the plethora of PC manufacturers and no industry hardware standardization, I understand the problem they solve. But gawd are they ugly.
(Gripe: existing partitions that have filesystems and have labels should have those labels listed by the installer's partitioning tool to help mitigate the potential confusion arising from the disk letter changes.)
Any ideas why this happens? Is there a way keep this drive letter shuffling from happening?
openSUSE has been my primary Linux going on 18 years. IME, confusing drive letters between boots or between installed systems and installer haven't happened since around 12.2.
One way to avoid the problem generally is to always boot with no USB devices attached unless intending the current boot to be from USB, otherwise always plugging after a login prompt or manager appears.
Another is to avoid USB even for installation. As long as to a multiboot target with a bootloader already present, net or iso installation can be initiated by Grub, so that's how I do new installations. Normally I use the net install installation kernel and initrd. On a new installation to a new or wiped target, I boot from CD or DVD if possible and fully partition at least to the extent of those partitions will be used for the first installation.
Also IME, the reason for missing drive letters can easily be all-in-1 USB readers gobbling 4 USB device names, even though unpopulated.
I have yet to have an openSUSE installer not show me the volume labels that are present. It was a long time before I learned to have labels preferred to UUIDs or device names in every possible context. That is done by opening the bottom item on the first partitioning screen and changing the default selection from UUID to LABEL before taking any other action.
I find UUIDs/PARTUUIDs to be about the most hideous things to use in fstab but, with the plethora of PC manufacturers and no industry hardware standardization, I understand the problem they solve.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.