-   Slackware (
-   -   My pendrive suddenly changed from /dev/sda1 to /dev/sdb1! (

stf92 08-08-2012 04:16 PM

My pendrive suddenly changed from /dev/sda1 to /dev/sdb1!
Aka memory stick aka flash memory stick. I think i must have booted in the middle but I went to mount it and found it had "migrated" to sdb1 according to 'fdisk -l'. What can be the reason?

Slackware 12.0
Hardware: USB 1.1

chess 08-08-2012 04:22 PM

It's probably due to udev. You can write a custom udev rule to keep it consistent across reboots.

stf92 08-08-2012 04:26 PM

And how can I rule out udev? Not a joke. I really do not know if I need it.

Didier Spaier 08-08-2012 04:50 PM

Just chmod -x /etc/rc.d/rc.udev.

That's the easy part of it.

Now you will have to do udev's job yourself.

That's the uneasy part of it.

Let me quote rc.udev, as shipped with Slacxkware 13.37:


# This is a script to initialize udev, which populates the /dev
# directory with device nodes, scans for devices, loads the
# appropriate kernel modules, and configures the devices.

stf92 08-08-2012 04:54 PM

It was more simple with Unix: static devices.

Didier Spaier 08-08-2012 05:05 PM


You could go back to Slackware 11 then, as it had hotplug with a kernel (udev was offered as an alternative then, in association with a kernel) ;)

stf92 08-08-2012 05:10 PM

I have just downloaded 10.2 and have running in a machine. 9.1 had issues with usb.

Didier Spaier 08-08-2012 05:19 PM

If I remember well, 10.2 was the first version of Slackware I used.

PS Just checked the announce for it: udev was already included, oh well...

When running a 2.6
kernel, Slackware supports udev. This is a system for
creating devices in /dev dynamically, greatly reducing device
clutter and making it easy to see what devices are actually
present in the system.

stf92 08-08-2012 05:25 PM

Ha, ha ... By the way. 10.2 seems to lack lspci and I want to know what version is USB in that machine. How can I know? At boot time there are no messages mentioning USB. Only "Activating hardware detection: /etc/rc.d/rc.hotplug start". You spoke about it.

Didier Spaier 08-08-2012 05:28 PM

Back to the topic: if you don't want to make an udev rule for your USB stick, you could instead make en entry for it in /etc/fstab, designating the device not by /dev/something but by its UUID. Just issue the "blkid" command after having plugged-in your USB key and begin the relevant line for it in /etc/fstab with UUID=<the string given by blkid for the USB key>.

EDIT. I didn't see your last post before this one. You could try "lsusb".

stf92 08-08-2012 06:02 PM


Originally Posted by Didier Spaier (Post 4749311)
EDIT. I didn't see your last post before this one. You could try "lsusb".

Oh, I did and got

Device descriptor:
  bcdUSB      1.10

So it's 1.1 and not 2.0 or later. And about the topic, I did the UUID thing and worked fine. Thanks.

All times are GMT -5. The time now is 10:24 AM.