Two HDDs are switching their device names in Ubuntu Linux
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
Two HDDs are switching their device names in Ubuntu Linux
Hello!
Not like it's a problem so far, but mostly my curiosity. I have 2 disks -- internal and external. The latter is connected via USB3 cable. My Ubuntu install is on the external drive. W10 is inside my laptop (it's a dual-boot system). So usually my internal drive is sda and my external one is sdb in Ubuntu (they're both SATA drives, of course). But today they switched their device names, so the internal became sdb and external became sda. After the reboot everything got back to normal. I personally haven't done anything in this regard. To me that's strange. Maybe someone could explain that to me, please.
I had the same thing happen to me also about two weeks ago on Xubuntu. Unfortunately for me it had happen after reboot into Xubuntu and then dd a slackware iso to sdb which end up b being my internal hard drive. The good out of all this is it only wrote over first part of the disk including part of my windows partition and was able to recover the MBR and partitions not written over using tesdisk amd windows from the recovery partition that wasn't written over niether. I had done a dd to sdb before the reboot without any problems. So beware with the ubuntu distros check you device naming every time before using DD.
Device names are not guaranteed, it just depends on the order they're detected on boot. That's why you don't use device names in fstab or other important areas, you use UUID or labels, something that is persistent.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.