How to get a usbdisk to recieve alwayas the same device name (sdc for example)? - Slackware
This is a discussion on How to get a usbdisk to recieve alwayas the same device name (sdc for example)? - Slackware ; hi,
well i'm sure it's simple to fix i just run for 1st time into the problem.
When i plug in a usb disk it always assigned a different device name sdd or
sde etc.
I'd it to be assigned ...
-
How to get a usbdisk to recieve alwayas the same device name (sdc for example)?
hi,
well i'm sure it's simple to fix i just run for 1st time into the problem.
When i plug in a usb disk it always assigned a different device name sdd or
sde etc.
I'd it to be assigned always the same name, say, I want my 250disk be sdc.
sd* devices for usbdisks are created be the system when needed.
I thought I could just make them with MAKEDEV and then write in fstab.
But I didn't find MAKEDEV script.
How should i act?
thank you
-
Re: How to get a usbdisk to recieve alwayas the same device name (sdc for example)?
Hallo, =SERGE=,
Du meintest am 28.06.08:
> sd* devices for usbdisks are created be the system when needed.
> I thought I could just make them with MAKEDEV and then write in
> fstab. But I didn't find MAKEDEV script.
You find "MAKEDEV" in the "devs" package. But "udev" deletes it. On my
machine I've moved MAKEDEV to "/usr/sbin".
You should look what "udev" makes when you insert an USB stick or an USB
disk. And you should look for other names than (p.e.) /dev/sdc1.
"udev" shows "/dev/disk/by-id/" or "/dev/disk/by-label/" too.
Viele Gruesse
Helmut
"Ubuntu" - an African word, meaning "Slackware is too hard for me".
-
Re: How to get a usbdisk to recieve alwayas the same device name (sdc for example)?
=SERGE= wrote:
> well i'm sure it's simple to fix i just run for 1st time into the problem.
> When i plug in a usb disk it always assigned a different device name sdd or
> sde etc.
> I'd it to be assigned always the same name, say, I want my 250disk be sdc.
>
> sd* devices for usbdisks are created be the system when needed.
> I thought I could just make them with MAKEDEV and then write in fstab.
> But I didn't find MAKEDEV script.
>
> How should i act?
best thing is probably to read up on udev a bit. when a new device is
detected, udev responds by creating a device node for it. you can write
udev rules to make sure that a particular device is always given a specific
device name. or better, that a fixed symlink is always created to the
proper device. i.e. you could make sure that wheneven you plug in your
external drive, udev automatically creates a symlink /dev/myextdrive
pointing to the right device node. see /etc/udev/rules.d/ and google 'udev
rules' or something.
however, you can also let your desktop environment take care of things by
automounting devices. i simply assign volume names to my external
drives/usb sticks (even FAT supports volume names), and then i know they'll
always mounted under /media/ (the directory is created when
necessary).
--
Joost Kremers joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
-
Re: How to get a usbdisk to recieve alwayas the same device name (sdc for example)?
On Sat, 28 Jun 2008 16:54:23 +0400, =SERGE= wrote:
> well i'm sure it's simple to fix i just run for 1st time into the problem.
> When i plug in a usb disk it always assigned a different device name sdd or
> sde etc.
> I'd it to be assigned always the same name, say, I want my 250disk be sdc.
>
> sd* devices for usbdisks are created be the system when needed.
> I thought I could just make them with MAKEDEV and then write in fstab.
> But I didn't find MAKEDEV script.
MADEDEV is obselete. These days 'udev' handles this type of thing, as
others have already told you. Do some Googling/reading on udev, and have
a look at how to write (simple) udev rules. The rules themselves are
contained in the /etc/udev/rules.d directory.
--
"Bother!" said Pooh, as he cut his initials in the snow.
-
Re: How to get a usbdisk to recieve alwayas the same device name (sdc for example)?
=SERGE= wrote:
> hi,
>
> well i'm sure it's simple to fix i just run for 1st time into the problem.
> When i plug in a usb disk it always assigned a different device name sdd
> or sde etc.
> I'd it to be assigned always the same name, say, I want my 250disk be sdc.
>
> sd* devices for usbdisks are created be the system when needed.
> I thought I could just make them with MAKEDEV and then write in fstab.
> But I didn't find MAKEDEV script.
>
> How should i act?
>
> thank you
As another reaction said already: look for /dev/disk/by-label or by-id, and
you will find that it is a link to /dev/sd
time>. And it is fixed to the device, so you don't even have to worry about
the sdxy designation. Just use the label or id, and thanks to the link
mechanism everything solves itself!
-
Re: How to get a usbdisk to recieve alwayas the same device name(sdc for example)?
On Sat, 28 Jun 2008 12:21:33 -0500, Dan C wrote:
> MADEDEV is obselete.
Congratulations for this part, you synchronized a
Lacanian lapsus and a modquote-maker!-)
-
Re: How to get a usbdisk to recieve alwayas the same device name(sdc for example)?
On Sat, 28 Jun 2008 16:54:23 +0400
"=SERGE=" wrote:
> well i'm sure it's simple to fix i just run for 1st time into the
> problem. When i plug in a usb disk it always assigned a different
> device name sdd or sde etc.
> I'd it to be assigned always the same name, say, I want my 250disk be
> sdc
should help.
-
Re: How to get a usbdisk to recieve alwayas the same device name (sdc for example)?
Thank you very much to all
Surely udev rules howto will help.
There is the same problem with my ide disks atached to a ideraid (it works
only as ide controller no raid mode)
The disks are recognosed as scsi disk with the names /dev/sd*
What to do this case? may be they will be mounted always in the same order
as they attached to the controller?
So there shouldnt be a problem.
"»Q«" wrote in message
news:20080628183004.5bc5071f@bellgrove.remarqs.net ...
> On Sat, 28 Jun 2008 16:54:23 +0400
> "=SERGE=" wrote:
>
>> well i'm sure it's simple to fix i just run for 1st time into the
>> problem. When i plug in a usb disk it always assigned a different
>> device name sdd or sde etc.
>> I'd it to be assigned always the same name, say, I want my 250disk be
>> sdc
>
> should help.