Skip to contentSkip to conversation

hard disk dirver

DISCUSSION horseriver 4 participants 11 messages Feb 5, 2013 – Feb 7, 2013 1 message not in the archive

lore
Share & tools
lore

horseriver

author
#0 lore raw

hi:)

At booting time ,bootloader loads kernel from hard disk too memory. During this period,does it need hd driver's support .

thanks!

author
#2 lore raw
In reply to Valdis.Kletnieks at vt.edu

Thanks for your reply!

After grub load kernel and initrd , it get around root filesystem mounting , but failed with no finding root device ,from which kernel and initrd have been located .

ls /dev/ ; there is no disk device node .

Why?

author
#4 lore raw
In reply to Valdis.Kletnieks at vt.edu
Quoted 11 lines · Valdis.Kletnieks at vt.edu
Quoted 7 lines · horseriver

After grub load kernel and initrd , it get around root filesystem mounting , but failed with no finding root device ,from which kernel and initrd have been located .

ls /dev/ ; there is no disk device node .

Why?

Any number of possible reasons, anything from an improperly configured kernel, to a misbuilt initrd, to a root= parameter that points

root = ? You mean the aasignment at grub command line ?

thanks!

#1 lore raw
In reply to horseriver
Quoted 2 lines · horseriver

At booting time ,bootloader loads kernel from hard disk too memory. During this period,does it need hd driver's support .

Think for a bit - at that point, the hd driver hasn't been loaded yet, so it *can't* need the hd driver's support. So instead, the bootloader has a very dumb simplistic driver that's stripped down (for instance, no queued command support, one I/O in flight at a time, very little error handling, read operations only , etc etc) that's just enough to load the kernel and initrd. (There's often also a very stupid filesystem driver, just enough to read files. So for instance 'grub' can find the files for the kernel and initrd. Some bootloaders are too stupid for even that, and you have to run a special program to tell the boot loader where all the blocks of the file are (I'm looking at you, LILO :)

Once the bootloader gets the kernel and initrd loaded, *then* the
kernel can initialize the production driver with all the bells and
whistles needed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130205/4966f6cb/attachment.bin

author
#7 lore raw
In reply to a message not in the archive

hi:)

I have a newbie question about hard ware.
At booting stage,kernel need to detect the hard device before mount it, does this work need pci's surport?

At loading stage ,boot loader need to move binaries from hard disk partition to ram,does this work need pci's surport?

thanks!

#3 lore raw
In reply to horseriver
Quoted 7 lines · horseriver

After grub load kernel and initrd , it get around root filesystem mounting , but failed with no finding root device ,from which kernel and initrd have been located .

ls /dev/ ; there is no disk device node .

Why?

Any number of possible reasons, anything from an improperly configured
kernel, to a misbuilt initrd, to a root= parameter that points someplace
broken, to....
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130206/648e99c0/attachment.bin

#8 lore raw
In reply to horseriver
Quoted 2 lines · horseriver

At booting stage,kernel need to detect the hard device before mount it, does this work need pci's surport?

That depends. Is the controller for the hard drive a PCI-based controller? On most x86-based boxes, it is (and I'm not sure it's even possible to build an x86 kernel that doesn't have PCI as a =y in the config). However, very old units may still have ISA based disk controllers, and other archs may have other I/O buses.

Quoted 2 lines

At loading stage ,boot loader need to move binaries from hard disk partition to ram,does this work need pci's surport?

Same as above.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130206/651dedb1/attachment.bin

#5 lore raw
In reply to horseriver
Quoted 1 line · horseriver

root = ? You mean the aasignment at grub command line ?

For instance, the grub entry for the kernel I'm running right now:

title 3.8.0-rc6-next-20130206

        kernel /vmlinuz-3.8.0-rc6-next-20130206 ro root=/dev/mapper/vg_blackice-root log_buf_len=2M vga=893 loglevel=4 thre
adirqs intel_iommu=off LANG=en_US.UTF-8
        initrd /initramfs-3.8.0-rc6-next-20130206.img

(Strictly speaking, it's not the grub command line, it's the kernel command
line that is passed to the kernel by grub or lilo or grub2 or syslinux
or whatever boot loader happens to float your boat).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130206/6377448d/attachment.bin

#9 lore raw
In reply to Valdis.Kletnieks at vt.edu
Quoted 5 lines · On Wed, Feb 6, 2013 at 12:50 PM, <[email protected]> wrote:
Quoted 1 line · horseriver

At booting stage,kernel need to detect the hard device before mount

it,

Quoted 1 line

does this work need pci's surport?

Quoted 8 lines

That depends. Is the controller for the hard drive a PCI-based controller? On
most x86-based boxes, it is (and I'm not sure it's even possible to build an
x86 kernel that doesn't have PCI as a =y in the config). However, very old units may still have ISA based disk controllers, and other archs may have other
I/O buses.

Most new MB's have a SATA controller directly on the MB connected directly to either the North or South bridge (I don't know which).

I don't think any PCI is support needed to talk to the boot disk.

Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130206/d9f0b08e/attachment.html

#10 lore raw
Quoted 4 lines · Greg Freemyer

Most new MB's have a SATA controller directly on the MB connected directly to either the North or South bridge (I don't know which).

I don't think any PCI is support needed to talk to the boot disk.

Yes, but said SATA controller and north/southbridge are usually emulating a PCI:

% lspci
00:00.0 Host bridge: Intel Corporation Mobile 4 Series Chipset Memory Controller Hub (rev 07) 00:01.0 PCI bridge: Intel Corporation Mobile 4 Series Chipset PCI Express Graphics Port (rev 07)
....
00:1f.2 RAID bus controller: Intel Corporation 82801 Mobile SATA Controller [RAID mode] (rev 03)

So no actual PCI slots involved there, but that PCI bridge is going to require
PCI support to program all the BARs and other stuff to talk to that 82801. -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130206/9df9ec90/attachment.bin

#11 lore raw
In reply to horseriver
Quoted 11 lines · horseriver

hi:)

I have a newbie question about hard ware.
At booting stage,kernel need to detect the hard device before mount it, does this work need pci's surport?

At loading stage ,boot loader need to move binaries from hard disk
partition
to ram,does this work need pci's surport?

hard disk I/O is in ATA bus, and PCI has it own bus on the chipset (see page 69):

http://downloadmirror.intel.com/19123/eng/d525mw_d525mwv_techprodspec.pdf

and page 14:

http://download.intel.com/support/motherboards/desktop/d865gsa/sb/d5600601us.pdf

But these are terminologies. At the source code level, (and tools as
well), PCI and ATA are not differentiated much:

in drivers/ata/ata_piix.c, and in drivers/pci/quirks.c both directory u can see 82801 symbols exists.

For your problem i think it is a BOCHS problem...mixing with recent linux kernel (older kernel should be fine)...eg,

http://forums.gentoo.org/viewtopic-t-915210-view-previous.html?sid=a003ebbc022d7f23399fc7f1c5dad424

(notice the 3.2 kernel) which is resolved via setting the PCI configuration
in BOCHS as well. take a look.

Quoted 2 lines

thanks!

Signature · 5 lines
Regards,
Peter Teoh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130207/efd285c9/attachment.html