2012-05-04 08:58:05

by Chris Jones

[permalink] [raw]
Subject: Hard drive detection

What section of the kernel detects internal hard drives upon boot?


Regards

Chris Jones


2012-05-04 09:32:13

by Arend van Spriel

[permalink] [raw]
Subject: Re: Hard drive detection

On 05/04/2012 10:56 AM, Chris Jones wrote:
> What section of the kernel detects internal hard drives upon boot?

A bit of a weird question, but maybe I do not understand where it is
coming from. Some context might help.

The hard drives are likely connected to a harddisk controller of some
sort and that controller is somehow hooked up in your system. Your
kernel needs a driver for the controller. It is 'convenient' to have
that driver built in your kernel for the hard drive containing the root
file system.

Gr. AvS

2012-05-04 13:13:54

by Mark Lord

[permalink] [raw]
Subject: Re: Hard drive detection

On 12-05-04 04:56 AM, Chris Jones wrote:
> What section of the kernel detects internal hard drives upon boot?

That depends upon how the drive is connected.
But generally speaking, the device driver for the drive-controller
will probe and find any attached drives.

So for modern kernels, on systems with SATA drives,
the code is in linux/drivers/ata/

Cheers

2012-05-04 23:33:27

by Chris Jones

[permalink] [raw]
Subject: Re: Hard drive detection

On Fri, 04 May 2012 09:13:51 -0400
Mark Lord <[email protected]> wrote:

> On 12-05-04 04:56 AM, Chris Jones wrote:
> > What section of the kernel detects internal hard drives upon boot?
>
> That depends upon how the drive is connected.
> But generally speaking, the device driver for the drive-controller
> will probe and find any attached drives.
>
> So for modern kernels, on systems with SATA drives,
> the code is in linux/drivers/ata/
>
>

Thanks Mark. That's exactly what I was looking for. And are both PATA
and SATA internal drives both located in drivers/ata?


Regards

Chris Jones

2012-05-05 02:51:14

by Mark Lord

[permalink] [raw]
Subject: Re: Hard drive detection

On 12-05-04 07:30 PM, Chris Jones wrote:
..
> Thanks Mark. That's exactly what I was looking for. And are both PATA
> and SATA internal drives both located in drivers/ata?
..

Yes.
But historically, PATA drives were handled by the original IDE drivers
that I worked on in the mid-1990s. That code is in linux/drivers/ide,
but we're trying hard to phase it out. The code in linux/drivers/ata
(aka. "libata") handles nearly all of the same PATA stuff and more.

Cheers

2012-05-05 04:03:34

by Chris Jones

[permalink] [raw]
Subject: Re: Hard drive detection

On Fri, 04 May 2012 22:51:11 -0400
Mark Lord <[email protected]> wrote:

> On 12-05-04 07:30 PM, Chris Jones wrote:
> ..
> > Thanks Mark. That's exactly what I was looking for. And are both
> > PATA and SATA internal drives both located in drivers/ata?
> ..
>
> Yes.
> But historically, PATA drives were handled by the original IDE drivers
> that I worked on in the mid-1990s. That code is in linux/drivers/ide,
> but we're trying hard to phase it out. The code in linux/drivers/ata
> (aka. "libata") handles nearly all of the same PATA stuff and more.
>

Yeah I remember reading something a while back about all the
IDE/PATA support being migrated to the SATA sets and phasing out the
legacy IDE stuff.

So technically, the old IDE sets could be removed with no negative
effect on a modern system? Correct?


Regards

Chris Jones

2012-05-05 14:46:17

by Mark Lord

[permalink] [raw]
Subject: Re: Hard drive detection

On 12-05-05 12:00 AM, Chris Jones wrote:
> On Fri, 04 May 2012 22:51:11 -0400
> Mark Lord <[email protected]> wrote:
>
>> On 12-05-04 07:30 PM, Chris Jones wrote:
>> ..
>>> Thanks Mark. That's exactly what I was looking for. And are both
>>> PATA and SATA internal drives both located in drivers/ata?
>> ..
>>
>> Yes.
>> But historically, PATA drives were handled by the original IDE drivers
>> that I worked on in the mid-1990s. That code is in linux/drivers/ide,
>> but we're trying hard to phase it out. The code in linux/drivers/ata
>> (aka. "libata") handles nearly all of the same PATA stuff and more.
>>
>
> Yeah I remember reading something a while back about all the
> IDE/PATA support being migrated to the SATA sets and phasing out the
> legacy IDE stuff.
>
> So technically, the old IDE sets could be removed with no negative
> effect on a modern system? Correct?

That's how I do it here. So, yes.