Re: question on udev device naming before root is mounted

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 06, 2014 at 06:44:11PM -0800, David Avery wrote:
> Can the device names for hard drives be forced before root is mounted
> in so much so that udev rules can force via a device serial number to
> be a specific /dev/sdX device name.

No you can't, sorry.  Please use the persistant names instead, the ones
in /dev/disk/ for this.

> Looking at my pci and bios boot order I shouldn't even need to do this
> but I think the defaults of udev or the sysfs?? are to move USB
> devices to latter drive letters.

You don't know what device is going to be discovered first, and they can
be reordered on different boots all the time.  Use the /dev/disk/ links
instead.

> I am booting from a USB 16GB flash drive and would prefer the device
> be sda but even if I could force it to be sdz, and force my sata
> drives to be specific drive letters based on their serial numbers so
> that I can create a hotswap raid array and be confident that once my
> drives are installed they won't move around to different device names.

Then use the /dev/disk/ links, that way they can always be confident,
that is what they are there for.

Just ignore the kernel names, they mean nothing, use the /dev/disk/ ones
instead, as they will always be correct.

Hope this helps,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux