-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sat, 25 Jun 2016 22:18:39 +0200, Helmut Jarausch
(jarau...@skynet.be) wrote about "Re: [gentoo-user] booting - I don't
anystand how the (Linux) world works anymore" (in
<pIgoU9n+PTyazMfaAjTflI@P0zLLCmfwy+atNuDbwD3I>):

> On 06/25/2016 09:39:32 PM, David W Noon wrote:
[snip]
>> I always statically link the driver that operates the controller
>> that connects the root device and modprobe the drivers that
>> operate the other disk controllers. This ensures that the
>> controller for my /dev/sda device is probed first and its drives
>> get "a", "b" and "c" in /dev/sd?, and those letters are assigned
>> in device address order on the controller.
> 
> Thanks Dave, but I do statically link the corresponding device
> drivers, as well.

I should have been more clear: only 1 driver for disk controllers
should be statically linked; the others should be modprobed, usually
by naming them in /etc/conf.d/modules.

> But I don't understand why my only hard drive is named sdb?

Another drive, presumably on another controller, has been hardware
probed first.

The reason I use a mixture of static and dynamic linking is to control
the sequence in which the hardware probes are run. If you statically
link everything, the kernel can have the drivers run their hardware
probes in whatever order it chooses. When they are dynamically linked,
the hardware probes occur in the sequence in which the modprobes occur.

The upshot is that the drives controlled by statically linked drivers
are probed first, then the drives controlled by dynamically linked
drivers are probed in the order in which the modprobes occur.

Therefore, I configure my kernels so that the drives get probed in the
order I want.

> It looks as if my kernel named my built-in CDROM device as /dev/sda
> .

An optical drive should be /dev/sr0 or the like. Are you sure it's the
CD-ROM drive grabbing the hard drive address? That seems like
something the old IDE drivers used to do; if you are using the long
obsolete IDE kernel modules, you should really upgrade to the libata
drivers.

> And if I have plugged in an USB drive it seems to influence the
> naming scheme, as well.

Your USB controller's driver appears to be statically linked. This is
a seriously bad idea.

> And, to make it even more complicated, once the system is up, it
> has a different naming scheme. E.g. now my internal hard disk has
> the name /dev/sda but if I tried to boot by this name it fails.

That could well be udev/eudev renaming devices during its start-up.

> For a normal human as me, this is just crazy!

Well, Gentoo was never meant for normal humans. ... :-)
- -- 
Regards,

Dave  [RLU #314465]
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
dwn...@ntlworld.com (David W Noon)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAldu8j8ACgkQRQ2Fs59Psv8T1gCgtZ76X/QGLPchCKnQ0v5Yoeyf
CogAn0EDnbSzGZrdHLLwF1SkO4gqH+yz
=BR6C
-----END PGP SIGNATURE-----

Reply via email to