Multiple Laptops/Distros boot HDD as "sda"; later change to "sdb"

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
ldcjmd
Level 1
Level 1
Posts: 23
Joined: Fri Aug 03, 2018 5:38 pm
Location: The Country of Texas

Multiple Laptops/Distros boot HDD as "sda"; later change to "sdb"

Post by ldcjmd »

Short Question: how to 'force' a laptop's (single) HDD to always be detected by ANY distro as "sda"... no matter what. [Revised 05-22-2022] Am NOT looking for a solution around setting up udev rules (fine for me... but laptops' new Owners will not be able to 'adjust' such rules if necessary). AM seeking something along the lines of a boot-time parameter that can tie "sda" to the single HDD's "wwn" (World Wide Number; easily obtainable, and never changes). Maybe someone knows a way to force osprober et al, to do that? *I will keep reading internals/man pages... but would welcome a "known" method...

Hello to my fellow Mint activists... the Long Story: have observed recent issue with several laptops booting to assorted Distros from rufus-created iso on Flash Drive. Mint Cinnamon 20.3 / LXLE / Jammy Jellyfish (oh please), et al. All show same WEIRD behavior:
-- All these laptops are For Sale, so have (customer-expected) W10 21H2 fully Updated on first partitions. But ALL are made dual-boot with a GNU/Linux.
-- Distro XXXX boots to Desktop decently; some distros require a kernel parameter or two (added from long experience). Run GParted first-thing, and it shows HDD
partitions are ALL "sda". Then run the web browser, and terminal basic checks of HW devices' details, and make sure the display and touchpad are trouble-free.
-- Run the distro Installer (connected to www for available Updates, and codecs)... WAIT and WATCH... and clearly observe that osprober and grub install have found Windows 10 on "/dev/sda1" (or sda2 or sda3, depending on the individual laptop) and placed it in the grub menu correctly. Restart when notified.
-- The installed distro XXXX boots up, and as i watch the syslog lines go by (always enable maximum)... i see the HDD is still recognized as "sda". SO what's the problem, you ask. As soon as we install ANY more Updates (usually a newer kernel comes down, after the 1st reboot), osprober and update-grub do their thing... and i clearly observe that W10 is now /dev/sdb1 (or sdb2 or sdb 3, depending on the specific laptop) in the grub menu.
-- After a Shutdown or a Reboot, W10 will no longer boot from the grub menu (even though the partition's UUID is still correct in grub menu lines).
-- Found that ALL these laptops have a Media Card slot. IT does-not get recognized by the "testing" distro as any of sda / sdb / sdc (it has no Card in it)... BUT when
the "installed" distro boots, it apparently IS found-as /dev/sda... BEFORE the HDD device is probed.
>Thoughts / Advice?? [Yeah, i know, i know... "throw those older laptops into the woods and shoot 'em with yur shotgun", is not what i want to hear...]

[05-22-2022] -- HAVE researched many bugs of a 'similar' nature (which go back for many years)... the Maintainers have-developed workarounds for quirks in some machine models, but systemd is a 'beast'; have poked around in the man pages. Even found a bug report where Mr. Poettering himself says "what a GD interface".
-- MOst of the current distros i have used are using V245.4 of systemd... there is a NEW version 246.n that has been developed, and is coming down the pipeline...
but likely all the 'fixes' will be for more-modern machines than the older laptops i am Upgrading and Selling.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
AndyMH
Level 21
Level 21
Posts: 13759
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Multiple Laptops/Distros boot HDD as "sda"; later change to "sdb"

Post by AndyMH »

device names are not fixed in linux, depends on the order the system reports the drives on boot. SD cards are not sata devices so will not appear as sdX (unless plugged in via a SD/usb adapter), they appear as mmcblkX, e.g. mmcblk0.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Locked

Return to “Storage”