Re: Harddrive sorting

Stefan Monnier <[email protected]>
Newsgroups gmane.linux.debian.user
Message-ID <[email protected]>
> When ever I boot, the harddrives are not booted in the wanted order (a
> timing  problem case), sio that the Debian drive is /dev/sdb and
> Windows is /dev/sda,  but I want /dev/sda = Linux and /dev/sdb
> = Windows.

Any reason you need to care about `/dev/sdX` names?  In almost all cases
you can avoid this problem by referring to your disks (and partitions)
via `/dev/disk/<SOMETHING>`.  That's significantly more verbose, but if
needed you can define shorter symlinks.

> Whilst there si no problem with the mountpoints, as I ca use UUID in
> /etc/ fstab, I would like to know, if it is possible, to force Debian,
> to see the  drives in the order, they are hardwired.

I think if you wanted to really change it "the right way" would be to
tell the kernel in which order it should probe them, or to give to the
kernel a kind of "pre-allocation" of those names.  IIRC there is such
a mechanism (well, partially at least) for audio devices which
I remember using to swap the order of audio devices between built-in and
HDMI or something like that, but I can't remember reading anything like
that disks.  AFAIK the `/dev/disk/by-FOO/BAR` solution is simple and
works well enough in practice.

BTW, personally I stay away from UUIDs and use things like labels
instead, but admittedly I don't know of any mechanism to name disks (as
opposed to partitions).


=== Stefan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.