LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   My pendrive suddenly changed from /dev/sda1 to /dev/sdb1! (https://www.linuxquestions.org/questions/slackware-14/my-pendrive-suddenly-changed-from-dev-sda1-to-dev-sdb1-4175421070/)

stf92 08-08-2012 03: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?

kernel 2.6.21.5
Slackware 12.0
Hardware: USB 1.1

chess 08-08-2012 03:22 PM

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

http://www.slackwiki.com/Udev

stf92 08-08-2012 03: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 03: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:

Code:

# 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 03:54 PM

It was more simple with Unix: static devices.

Didier Spaier 08-08-2012 04:05 PM

Nostalgia...

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

stf92 08-08-2012 04: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 04: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...
Quote:

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 04: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 04: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 05:02 PM

Quote:

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
Code:

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 11:14 AM.