Fedora Linux Support Community & Resources Center
  #1  
Old 11th July 2012, 12:49 AM
undernet Offline
Registered User
 
Join Date: Jul 2012
Location: somewhere
Posts: 24
linuxopera
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
Reply With Quote
  #2  
Old 11th July 2012, 12:54 AM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,669
linuxfirefox
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.
Reply With Quote
  #3  
Old 11th July 2012, 01:53 AM
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,553
linuxfirefox
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
Reply With Quote
  #4  
Old 11th July 2012, 05:42 PM
Gareth Jones Offline
Official Gnome 3 Sales Rep. (and Adminstrator)
 
Join Date: Jul 2011
Location: Leamington Spa, UK
Age: 31
Posts: 2,750
linuxfirefox
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.
Reply With Quote
  #5  
Old 11th July 2012, 06:05 PM
undernet Offline
Registered User
 
Join Date: Jul 2012
Location: somewhere
Posts: 24
linuxopera
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.
Reply With Quote
  #6  
Old 11th July 2012, 06:17 PM
Gareth Jones Offline
Official Gnome 3 Sales Rep. (and Adminstrator)
 
Join Date: Jul 2011
Location: Leamington Spa, UK
Age: 31
Posts: 2,750
linuxfirefox
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.
Reply With Quote
  #7  
Old 11th July 2012, 07:37 PM
Doug G Offline
Registered User
 
Join Date: Jul 2005
Posts: 640
windows_7firefox
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
======
Reply With Quote
Reply

Tags
letter, make, time

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
gnome-3 how to make the time display seconds schneidz Using Fedora 7 12th February 2012 02:39 PM
How to make the boot menu always time out? SpectrumDT Using Fedora 9 17th February 2008 12:06 PM
Reinstalling, want to make sure CD Rom works this time ttnunam Installation, Upgrades and Live Media 4 14th November 2006 07:52 PM
time make rpm dickinsd Fedora Focus 2 18th January 2005 02:35 PM


Current GMT-time: 14:24 (Thursday, 24-04-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat