Harddrives renaming themselves?

Message
Author
User avatar
Eadwine Rose
Administrator
Posts: 14514
Joined: Wed Jul 12, 2006 2:10 am

Re: Harddrives renaming themselves?

#11 Post by Eadwine Rose »

I have a swappable harddrive slot in my computer in which the internal harddrive resides (sda 1-4). That one holds the sytem. The drive is a regular internal harddrive, the only special thing is that I can remove it when the system is turned off and put another drive (like a Windows drive) in it.

sda4 is a partition that does nada, it is just there because I needed both this drive and the to be cloned to drive to be the exact same sizes.


There is one harddrive externally (sdb 1-3, usb Lacie drive) which is only used for backupping and such between both the linux drive when that is in the slot, or the windows drive when that is in. There is no boot system on that, just partitions for various backup types.


I have had this system like this for 3 or 4 years now, never been a prob on Mepis.


Note this is on a proper boot:

Code: Select all

root@eadwinemx14beta2:/home/eadwine# fdisk -l

Disk /dev/sda: 500 GB, 500105249280 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System 
/dev/sda1               1        6375    51207156   83  Linux
/dev/sda2            6376       57368   409593240   83  Linux
/dev/sda3           57369       57623     2040255   82  Linux swap
/dev/sda4           57624       60801    25519252   83  Linux

Disk /dev/sdb: 500 GB, 500105249280 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System 
/dev/sdb1               1       19123   153605466    7  HPFS/NTFS
/dev/sdb2           19124       31872   102398310    7  HPFS/NTFS
/dev/sdb3           31873       60801   232364160    7  HPFS/NTFS
MX-23.6_x64 July 31 2023 * 6.1.0-37amd64 ext4 Xfce 4.20.0 * 8-core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 535.247.01 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 870EVO * Samsung S24D330 & P2250 * HP Envy 5030

User avatar
JBoman
Posts: 76
Joined: Wed Jul 12, 2006 4:30 pm

Re: Harddrives renaming themselves?

#12 Post by JBoman »

Well that all looks kosher... dunno... have you looked at your fstab for any clues?. Looks like you might need Tim,Kent,or Stevo on this one. :crossfingers:
http://patentabsurdity.com/
AMD 64x2 2.6GHz 4GB ram MX-18.1 KDE regular updates
"beware a frequent flirt with potential disaster"

User avatar
Eadwine Rose
Administrator
Posts: 14514
Joined: Wed Jul 12, 2006 2:10 am

Re: Harddrives renaming themselves?

#13 Post by Eadwine Rose »

I have rebooted after I made the call that it got sda lost again :smile: This is what it SHOULD be and in its normal state now (added that with it, I AM a fried brain today, geez..) .

I will of course repost both the above and fstab content when the weird thing happens again.

The log file earlier on in the thread is a "bad" boot.
MX-23.6_x64 July 31 2023 * 6.1.0-37amd64 ext4 Xfce 4.20.0 * 8-core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 535.247.01 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 870EVO * Samsung S24D330 & P2250 * HP Envy 5030

User avatar
BitJam
Developer
Posts: 2303
Joined: Sat Aug 22, 2009 11:36 pm

Re: Harddrives renaming themselves?

#14 Post by BitJam »

As for the actual problem. I think you may have described it incorrectly. It is expected that devices names like /dev/sda and /dev/sdb will NOT always be consistent between reboots. When you said the devices were *renaming* themselves, I thought you meant that the device names were changing while the machine was running which sounded very strange indeed, with the most probable cause being flaky hardware.

If you don't believe me, please Google(consistent block device names). You will find many pages like this one from Archlinux:

Persistent block device naming
This article describes how to use persistent names for your block devices. This has been made possible by the introduction of udev and has some advantages over bus-based naming. If your machine has more than one SATA, SCSI or IDE disk controller, the order in which their corresponding device nodes are added is arbitrary. This may result in device names like /dev/sda and /dev/sdb switching around on each boot, culminating in an unbootable system, kernel panic, or a block device disappearing. Persistent naming solves these issues.
As long as your "root= boot" parameter is of the form "root=UUID=xxx" (which the log file shows that it is) and your /etc/fstab uses "UUID=" and/or "LABEL=" to identify devices then everything is fine and working as expected.

Although one that thing does look a little suspicious to me is your dvd drive is sometimes showing up as /dev/sda:
dev/sda: PLEXTOR DVDR PX-820A
For a while now, I have always had such devices show up as /dev/sr*. Maybe this change is due to the new kernel or a newer udev or something. I'm not sure if it is indicative of a problem or just my lack of knowledge.

PS: Please don't shoot the messenger. I didn't design this new way of doing things, I'm just reporting what it is.

User avatar
Eadwine Rose
Administrator
Posts: 14514
Joined: Wed Jul 12, 2006 2:10 am

Re: Harddrives renaming themselves?

#15 Post by Eadwine Rose »

Sorry about the terminology, little do I know about what is considered renaming and what is not. I call it as the noob that I am with this :smile:

That sr0 thing is indeed my plextor drive, which becomese sda when the issue happens.

Never once before in all the years that I have been using mepis have I seen this (started on 2005 pro beta 3 IIRC). And this system as it stands today hardware wise has been running since 2010 or so. The only thing changed since then was the video card that was added months ago.



Ok.. lemme see if I remember THIS correctly, maybe it gives a clue:
there is one old type (is that called IDE?) slot on my motherboard, the rest are more modern (SATA?). The dvd drive (the plextor) is on that particular old type slot because its connector is of the "old" kind and I didn't want to ditch a perfectly fine burner back when the hardware was changed around.

I built this system myself with the help of a good friend who is more in the know about these particular hardware namings :laugh:



But yeah.. nothing new whatsoever was done, the only thing that changed was mepis12b2 --> mx14b2
MX-23.6_x64 July 31 2023 * 6.1.0-37amd64 ext4 Xfce 4.20.0 * 8-core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 535.247.01 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 870EVO * Samsung S24D330 & P2250 * HP Envy 5030

User avatar
BitJam
Developer
Posts: 2303
Joined: Sat Aug 22, 2009 11:36 pm

Re: Harddrives renaming themselves?

#16 Post by BitJam »

Yes. It used to be different. Things have changed in the more recent kernels (and udev) and the /dev/sda device names are no longer consistent. In order to not cause widespread breakage they had to delay this change until everyone was using UUIDs in the root= boot-parameter and in fstab. You don't have to like it but you do have to live with it**. As long as your dvd drive still works when it is named /dev/sda then there is nothing to be fixed. IOW, inconsistent /dev/sda names is not a but but giving a dvd drive the name /dev/sda might be. Another example of a similar change is that IDE (PATA) hard drives used to show up as /dev/hd*. Now they show up as /dev/sd*.

If you are unhappy with this change, just wait until you see what they are doing to eth0.

** Some people have rebelled against udev and have been using alternatives such as mdev from busybox. I don't know if using mdev will bring back the consistency you want or not (because I don't know if the inconsistency is coming from udev or from the kernel). Our LiveCD/USB uses mdev initially so you can test this yourself by booting the MX Live media on your machine with the boot parameter "bp=2". The boot will stop early at "breakpoint 2". Wait a few seconds for all the devices to be found and then look in /dev and see if you can figure out which devices go with which block device names. You can repeat this and see if the names stay consistent or not. Use the command "safe-reboot" to reboot and try again. Unfortunately, more and more packages are depending on udev so you may not have the option to easily run a Debian system without udev. Slashbeast provides what is needed to run a Gentoo system with mdev instead of udev.

User avatar
Eadwine Rose
Administrator
Posts: 14514
Joined: Wed Jul 12, 2006 2:10 am

Re: Harddrives renaming themselves?

#17 Post by Eadwine Rose »

Ah yeah, I remember that hda stage still, back on the old mobo.
Personally, I don't care if they call it a monkey's butt, as long as it works :laugh:

And it all does for as far as I can tell.

It just worries me when the dvddrive is called sda. I start thinking: can that harm the system in any way considering the install was done TO sda and the grub and all as well and it is now suddenly called sdb? I mean mostly when.. say.. upgrading, installing new stuff.. will it make a difference, or will it automagically sort itself out? That is basically what I want to know.

The rest is.. well.. monkey's butt to me hehehe :laugh:
MX-23.6_x64 July 31 2023 * 6.1.0-37amd64 ext4 Xfce 4.20.0 * 8-core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 535.247.01 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 870EVO * Samsung S24D330 & P2250 * HP Envy 5030

User avatar
richb
Administrator
Posts: 10868
Joined: Wed Jul 12, 2006 2:17 pm

Re: Harddrives renaming themselves?

#18 Post by richb »

Monkey's butt. :hmm: Is that a Dutch saying. :rofl:
Forum Rules
Guide - How to Ask for Help

richb Administrator
System: MX 23 KDE
AMD A8 7600 FM2+ CPU R7 Graphics, 16 GIG Mem. Three Samsung EVO SSD's 250 GB

User avatar
BitJam
Developer
Posts: 2303
Joined: Sat Aug 22, 2009 11:36 pm

Re: Harddrives renaming themselves?

#19 Post by BitJam »

Eadwine Rose wrote:It just worries me when the dvddrive is called sda. I start thinking: can that harm the system in any way considering the install was done TO sda and the grub and all as well and it is now suddenly called sdb? I mean mostly when.. say.. upgrading, installing new stuff.. will it make a difference, or will it automagically sort itself out? That is basically what I want to know.
What I've been saying is that as long as the UUID is used in the root= boot parameter and in your fstab then it all sorts itself out. That is why we had to switch from simple device names to the cumbersome UUIDs. The only thing I am not sure about is your dvd drive showing up as /dev/sda. I don't know if that is a bug are just another step into this brave new world.

User avatar
anticapitalista
Developer
Posts: 4286
Joined: Sat Jul 15, 2006 10:40 am

Re: Harddrives renaming themselves?

#20 Post by anticapitalista »

Just to throw a(nother) spanner in the works - Eadwine. Beta 3 testing should only have swap as an entry when running live and only the root /, swap and /home (if separate from root) on installation.
anticapitalista
Reg. linux user #395339.

Philosophers have interpreted the world in many ways; the point is to change it.

antiX with runit - lean and mean.
https://antixlinux.com

Post Reply

Return to “Older Versions”