 |
 |
 |
 |
| Hardware & Laptops Help with your hardware, including laptop issues |

11th July 2012, 12:49 AM
|
|
Registered User
|
|
Join Date: Jul 2012
Location: somewhere
Posts: 9

|
|
|
make a HD have the same letter all the time
Hi
I have a problem where my drive letters sda,sdb etc. do not stay the same for each device when I add a new hard drive, because of this, fedora fails to boot properly because partitions such as sdb2 no longer exist because the drive letter is assigned to the new device instead of the old one (which is still present).
How do I force a drive a letter such as sdb to be assigned to a specific hard drive constantly even when new drives are added?
Thanks in Advance
|

11th July 2012, 12:54 AM
|
|
Registered User
|
|
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,150

|
|
|
Re: make a HD have the same letter all the time
You can't.
It depends entirely on disk timing, and how fast the various controllers are at initializing disks.
You can choose to use volume labels or UUID when mounting.
|

11th July 2012, 01:53 AM
|
 |
Registered User
|
|
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,346

|
|
|
Re: make a HD have the same letter all the time
or LABEL=...
Having said that - it is possible to determine the enumeration of hotplug disks, but it's more trouble that it's worth to fuss with fixed drive names. This is exactly why mounts based on LABEL UUID etc were invented.
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe
|

11th July 2012, 05:42 PM
|
|
Official Gnome 3 Sales Rep. (and Adminstrator)
|
|
Join Date: Jul 2011
Location: Leamington Spa, UK
Age: 30
Posts: 1,852

|
|
|
Re: make a HD have the same letter all the time
As jpollard and stevea have said, this is what LABEL and UUID are for. LABEL is a conveniently human-readable name set when you create a file-system on a volume (or you can set it on an existing file-system later). UUID is an effectively random 128-bit number which is far less likely to be the same between any two file-systems than the LABEL.
To find them, run "blkid /dev/..." as root in a terminal. Then you can replace the "/dev/..." fields in /etc/fstab with "UUID=...".
How early in the boot process do you get problems though? It might be that you need to update the boot-loader configuration and/or initial ramfs image too.
|

11th July 2012, 06:05 PM
|
|
Registered User
|
|
Join Date: Jul 2012
Location: somewhere
Posts: 9

|
|
|
Re: make a HD have the same letter all the time
I used "ls -l /dev/disk/by-uuid" which gets all of them at once.
To be honest this is one of the things windows does better. I can add hard drives, change their SATA ports and windows will boot no problem regardless and all the drive letters will stay the same, it a shame I have to manually fiddle around with mount points in linux to do what windows does automatically.
|

11th July 2012, 06:17 PM
|
|
Official Gnome 3 Sales Rep. (and Adminstrator)
|
|
Join Date: Jul 2011
Location: Leamington Spa, UK
Age: 30
Posts: 1,852

|
|
|
Re: make a HD have the same letter all the time
Well if you set up your file-systems and boot-loader with Anaconda or other Fedora tools, it should be automatic in Linux too (most tools will use UUIDs these days except where names are guaranteed to be persistent, such as LVM logical volumes or dm-crypt volumes). If the Fedora set-up tools created the mess, congratulations, you've found a bug to report!
If you added "/dev/..." entries to /etc/fstab etc. manually, it's more that you didn't know to use UUIDs instead than a weakness of Linux. The /dev/sd... designation is a basic form of device enumeration for covering all available hard-disk/solid-state/partitions, not a file-system "naming" scheme like Windows' drive letters (which certainly used to change, and are still allocated in a seriously unhelpful way). The /dev/disk/by-* symlinks are intended for persistent IDs or technical device enumeration, although admittedly a fairly recent development in Linux.
|

11th July 2012, 07:37 PM
|
|
Registered User
|
|
Join Date: Jul 2005
Posts: 640

|
|
|
Re: make a HD have the same letter all the time
Quote:
|
To be honest this is one of the things windows does better. I can add hard drives, change their SATA ports and windows will boot no problem regardless and all the drive letters will stay the same, it a shame I have to manually fiddle around with mount points in linux to do what windows does automatically.
|
I don't know about better, but windows has always been consistent. Sometime around fedora 15 the drive /dev/sdN entries started being inconsistent on a couple long running machines I have. Then magically a drive that was /dev/sdc on boot became /dev/sdb, then maybe or maybe not back to /dev/sdc on a subsequent boot.
I guess this behavior is now one of those wonderful "features" of linux.
__________________
======
Doug G
======
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 16:44 (Wednesday, 19-06-2013)
|
|
 |
 |
 |
 |
|
|