LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-01-2006, 11:16 AM   #1
kaboom
Member
 
Registered: Aug 2003
Posts: 36

Rep: Reputation: 15
Change name of /dev/sda


Is it possible to change name of a device on /dev/sda to (for example) /dev/sdz ?

Or how can i give a certain device /dev/sdx ? Instead of the automatic creation of devices when installing an OS (like RHE3).

Thnks!
 
Old 02-01-2006, 12:21 PM   #2
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Rep: Reputation: 103Reputation: 103
Quote:
Originally Posted by kaboom
Is it possible to change name of a device on /dev/sda to (for example) /dev/sdz ?

Or how can i give a certain device /dev/sdx ? Instead of the automatic creation of devices when installing an OS (like RHE3).

Thnks!
I think you can use symlinks for this. I. e. not actually renaming the physical device, just making a symlink to it with the name you want to call it.

I, for example, wanted to do this to get MPlayer and Xine working for watching / playing DVD's. MPlayer wanted a /dev/dvd device to read DVD's, but I had no such device in my default setup. So I became root, and did the following:

cd /dev
ln -s /dev/dvd /dev/hdc1

This meant that effectively I "renamed" my IDE DVD drive (/dev/hdc1) to /dev/dvd as far as MPlayer was concerned, thus "renaming" /dev/hdc1 to /dev/dvd.

Hope this helps...
 
Old 02-02-2006, 03:03 AM   #3
kaboom
Member
 
Registered: Aug 2003
Posts: 36

Original Poster
Rep: Reputation: 15
Thanks Stefan, but this is the problem:

I have a linux server with /dev/sda and /dev/sdb (SATA discs)
Now i want to connect an external SCSI disc, but Linux gives this disc also /dev/sda, so problems!
So renaming will not be a solution, i just want that Linux makes it /dev/sdz or whatever.

THANKS!
 
Old 02-02-2006, 06:00 AM   #4
vangelis
Member
 
Registered: Nov 2004
Location: Hellas
Distribution: Zenwalk 6.4
Posts: 337
Blog Entries: 4

Rep: Reputation: 30
if you do a ls -l sg* in /dev it should normally print you sga to sgh
if not then you should create them by typing in the /dev directory
./MAKEDEV sg

it has more to do but I don't remember it exactly right now you should better google for '/dev/makedev scsi'
it should give you many tutorials
 
Old 02-02-2006, 06:07 AM   #5
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
In case you are using udev - Writing udev rules.
 
Old 02-02-2006, 07:46 AM   #6
peter_89
Member
 
Registered: Jan 2006
Distribution: Microsoft Windows XP Professional SP2; Slackware Linux 10.2
Posts: 215

Rep: Reputation: 30
Is there really a reason for you to do this?
 
Old 02-02-2006, 07:59 AM   #7
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Quote:
Originally Posted by peter_89
Is there really a reason for you to do this?
To do what?
If an external device is always named same it enables user to use automated scripts on that device. Like automounting and so on.
 
Old 02-02-2006, 09:05 AM   #8
caspervn
Member
 
Registered: Jul 2005
Location: Vietnam
Distribution: Fedora Core 2
Posts: 55

Rep: Reputation: 15
I think the problem is major and mirror number. You should read text in /usr/src/<kernle-version>/Documentation/devices.txt
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
forcing the order of /dev/sda /dev/sdb etc.. jdaniel Linux - Software 5 05-23-2006 07:41 AM
where did my SATA drive go? not /dev/hde or /dev/sda edman007 Linux - Hardware 1 01-16-2005 10:23 PM
/dev/sda and /dev/sda1 disappeared using sii3112A striderstrahan Linux - Software 0 09-16-2004 05:00 AM
Sandisk USB card Reader not linking /dev/sg0 to /dev/sda acidraven Linux - Hardware 1 06-19-2004 03:56 PM
USB Compact flash card reader hotplug creates /dev/sda but no /dev/sda1 -Mandrake 9.1 bibinono Linux - Hardware 2 08-11-2003 09:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration