public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] IDE is called hda
@ 2009-04-16  9:28 Thomas Chef
  2009-04-16  9:49 ` Alan McKinnon
  2009-04-16 10:00 ` Odp: " Rafał
  0 siblings, 2 replies; 7+ messages in thread
From: Thomas Chef @ 2009-04-16  9:28 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 530 bytes --]

From the handbook:
To begin, we'll introduce block devices. The most famous block device is
probably the one that represents the first drive in a Linux system, namely
/dev/sda. SCSI and Serial ATA drives are both labeled /dev/sd*; even IDE
drives are labeled /dev/sd* with the new libata framework in the kernel. If
you're using the old device framework, then your first IDE drive is /dev/hda
.

But when I boot on Via Epia with my minimal installation CD 2008 I get my
IDE-disk as /dev/hda

Is the kernel on the minimal CD old ?

[-- Attachment #2: Type: text/html, Size: 815 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] IDE is called hda
  2009-04-16  9:28 [gentoo-user] IDE is called hda Thomas Chef
@ 2009-04-16  9:49 ` Alan McKinnon
  2009-04-16 10:07   ` Thomas Chef
  2009-04-16 10:00 ` Odp: " Rafał
  1 sibling, 1 reply; 7+ messages in thread
From: Alan McKinnon @ 2009-04-16  9:49 UTC (permalink / raw
  To: gentoo-user

On Thursday 16 April 2009 11:28:54 Thomas Chef wrote:
> From the handbook:
> To begin, we'll introduce block devices. The most famous block device is
> probably the one that represents the first drive in a Linux system, namely
> /dev/sda. SCSI and Serial ATA drives are both labeled /dev/sd*; even IDE
> drives are labeled /dev/sd* with the new libata framework in the kernel. If
> you're using the old device framework, then your first IDE drive is
> /dev/hda .
>
> But when I boot on Via Epia with my minimal installation CD 2008 I get my
> IDE-disk as /dev/hda
>
> Is the kernel on the minimal CD old ?

Not really. It's whatever was reasonably current at the time the CD image was 
built.

It's not the age of the kernel that matters here. it's which drivers are in 
use. These things are in a constant state of flux and right now the Linux 
kernel still has drivers for the old and the new way of doing things with 
disks. 

Rationale: a driver writer decided some time ago that it would be better to 
consolidate things in the kernel and use the same code-base for all types of 
disk. This makes things easier overall as you don't have to eternally figure 
out if you have IDE/SCSI/PATA/SCSI/something_else drives - the thing is always 
going to be /dev/sd**

But you can still use the old drivers and framework if you choose. Apparently, 
whoever mastered that CD did choose. Point being, if /dev/sda doesn't work for 
you and /dev/hda does, then you should be using /dev/hda. From your point of 
view, it's just a name for something

-- 
alan dot mckinnon at gmail dot com



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Odp: [gentoo-user] IDE is called hda
  2009-04-16  9:28 [gentoo-user] IDE is called hda Thomas Chef
  2009-04-16  9:49 ` Alan McKinnon
@ 2009-04-16 10:00 ` Rafał
  1 sibling, 0 replies; 7+ messages in thread
From: Rafał @ 2009-04-16 10:00 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/html, Size: 1560 bytes --]

[-- Attachment #2: bezNazwy1.txt --]
[-- Type: text/plain, Size: 530 bytes --]

From the handbook:
To begin, we'll introduce block devices. The most famous block device is
probably the one that represents the first drive in a Linux system, namely
/dev/sda. SCSI and Serial ATA drives are both labeled /dev/sd*; even IDE
drives are labeled /dev/sd* with the new libata framework in the kernel. If
you're using the old device framework, then your first IDE drive is /dev/hda
.

But when I boot on Via Epia with my minimal installation CD 2008 I get my
IDE-disk as /dev/hda

Is the kernel on the minimal CD old ?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] IDE is called hda
  2009-04-16  9:49 ` Alan McKinnon
@ 2009-04-16 10:07   ` Thomas Chef
  2009-04-16 10:21     ` Matt Harrison
                       ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Thomas Chef @ 2009-04-16 10:07 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 2035 bytes --]

Aha I understand.

But what if my cd installation names my disk hda,
but when I download the gentoo kernel source and build it it will use sda.
So in my lilo.conf I must use hda, and when the new kernel boots it looks
for hda (because of my lilo.conf), but in that case it should be sda instead
?

On Thu, Apr 16, 2009 at 11:49 AM, Alan McKinnon <alan.mckinnon@gmail.com>wrote:

>  On Thursday 16 April 2009 11:28:54 Thomas Chef wrote:
> > From the handbook:
> > To begin, we'll introduce block devices. The most famous block device is
> > probably the one that represents the first drive in a Linux system,
> namely
> > /dev/sda. SCSI and Serial ATA drives are both labeled /dev/sd*; even IDE
> > drives are labeled /dev/sd* with the new libata framework in the kernel.
> If
> > you're using the old device framework, then your first IDE drive is
> > /dev/hda .
> >
> > But when I boot on Via Epia with my minimal installation CD 2008 I get my
> > IDE-disk as /dev/hda
> >
> > Is the kernel on the minimal CD old ?
>
> Not really. It's whatever was reasonably current at the time the CD image
> was
> built.
>
> It's not the age of the kernel that matters here. it's which drivers are in
> use. These things are in a constant state of flux and right now the Linux
> kernel still has drivers for the old and the new way of doing things with
> disks.
>
> Rationale: a driver writer decided some time ago that it would be better to
> consolidate things in the kernel and use the same code-base for all types
> of
> disk. This makes things easier overall as you don't have to eternally
> figure
> out if you have IDE/SCSI/PATA/SCSI/something_else drives - the thing is
> always
> going to be /dev/sd**
>
> But you can still use the old drivers and framework if you choose.
> Apparently,
> whoever mastered that CD did choose. Point being, if /dev/sda doesn't work
> for
> you and /dev/hda does, then you should be using /dev/hda. From your point
> of
> view, it's just a name for something
>
> --
> alan dot mckinnon at gmail dot com
>
>

[-- Attachment #2: Type: text/html, Size: 2518 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] IDE is called hda
  2009-04-16 10:07   ` Thomas Chef
@ 2009-04-16 10:21     ` Matt Harrison
  2009-04-16 10:23     ` Alan McKinnon
  2009-04-16 22:45     ` kyle.bader
  2 siblings, 0 replies; 7+ messages in thread
From: Matt Harrison @ 2009-04-16 10:21 UTC (permalink / raw
  To: gentoo-user

Thomas Chef wrote:
> Aha I understand.
>  
> But what if my cd installation names my disk hda,
> but when I download the gentoo kernel source and build it it will use 
> sda. So in my lilo.conf I must use hda, and when the new kernel boots it 
> looks for hda (because of my lilo.conf), but in that case it should be 
> sda instead ?

I guess when you boot the new kernel, it will error looking for the root 
block device, and ask you what it should do.

You can then tell it that it should be looking for sda, not hda. Then 
once the system is booted, you can update the bootloader config.

That should let you migrate and you shouldn't have to do it again unless 
you go back to the old hda names.

HTH

Matt



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] IDE is called hda
  2009-04-16 10:07   ` Thomas Chef
  2009-04-16 10:21     ` Matt Harrison
@ 2009-04-16 10:23     ` Alan McKinnon
  2009-04-16 22:45     ` kyle.bader
  2 siblings, 0 replies; 7+ messages in thread
From: Alan McKinnon @ 2009-04-16 10:23 UTC (permalink / raw
  To: gentoo-user

Hi,

{Around here we don't top-post. We interleave replies in between the relevant 
bits of the quoted text. Pleases tick with the established community 
conventions}

On Thursday 16 April 2009 12:07:08 Thomas Chef wrote:
> Aha I understand.
>
> But what if my cd installation names my disk hda,
> but when I download the gentoo kernel source and build it it will use sda.
> So in my lilo.conf I must use hda, and when the new kernel boots it looks
> for hda (because of my lilo.conf), but in that case it should be sda
> instead ?

It's more complicated than that, much more complicated.

lilo is not Linux, it runs before Linux runs. So the boot loader itself (when 
booting) has absolutely no idea about /dev/sda or /dev/hda. It doesn't even 
know about /dev, and doesn't need to know such things.

However, before lilo (the boot loader) can work at all, it's code must be 
installed to the MBR of the disk, and there is a Linux app that does that. 
This app needs to know which disk to install the boot loader onto, but it's a 
Linux app so must follow Linux conventions when using disks. If your current 
kernel calls it /dev/hda, then the lilo installer must do the same otherwise 
it cannot find the disk (it must use the running kernel to do that, it cannot 
do it itself. The fact that it's a bootloader *installer* doesn't change 
anything).

When booting, the BIOS will access the first sector of the boot device (as 
defined in the BIOS) and load what it finds there. In your case this will be 
lilo. Lilo will read data directly off the disk and stuff them into memory. By 
a process of magic and a little voodoo, this will just happen to be an exact 
copy of a working kernel. The kernel will load, initialise itself, create 
/dev, find disks and decide what to call them - hda or sda depending on how 
you configured it when you built that kernel. This is the first point where 
hda or sda even exists at all so before then these are meaningless concepts.

Now all of this makes complete sense when you pick it apart. The problem (and 
the point of confusion for most folks), is "how the hell did lilo get onto the 
disk????" The correct answer is "You ran Linux and put it there yourself of 
course!!!!"

The trick is to realise that you ran Linux off a CD which let you see the 
disks so that you could put a boot loader on them, then reboot and start all 
over.

It's a chicken and egg thing, and I did tell you up front it was complicated.
Next week we will cover the wonderful topic of GRUB.

Summary: When you finally get the machine to boot, the disks will be called 
whatever you told the kernel to call them.

>
> On Thu, Apr 16, 2009 at 11:49 AM, Alan McKinnon 
<alan.mckinnon@gmail.com>wrote:
> >  On Thursday 16 April 2009 11:28:54 Thomas Chef wrote:
> > > From the handbook:
> > > To begin, we'll introduce block devices. The most famous block device
> > > is probably the one that represents the first drive in a Linux system,
> >
> > namely
> >
> > > /dev/sda. SCSI and Serial ATA drives are both labeled /dev/sd*; even
> > > IDE drives are labeled /dev/sd* with the new libata framework in the
> > > kernel.
> >
> > If
> >
> > > you're using the old device framework, then your first IDE drive is
> > > /dev/hda .
> > >
> > > But when I boot on Via Epia with my minimal installation CD 2008 I get
> > > my IDE-disk as /dev/hda
> > >
> > > Is the kernel on the minimal CD old ?
> >
> > Not really. It's whatever was reasonably current at the time the CD image
> > was
> > built.
> >
> > It's not the age of the kernel that matters here. it's which drivers are
> > in use. These things are in a constant state of flux and right now the
> > Linux kernel still has drivers for the old and the new way of doing
> > things with disks.
> >
> > Rationale: a driver writer decided some time ago that it would be better
> > to consolidate things in the kernel and use the same code-base for all
> > types of
> > disk. This makes things easier overall as you don't have to eternally
> > figure
> > out if you have IDE/SCSI/PATA/SCSI/something_else drives - the thing is
> > always
> > going to be /dev/sd**
> >
> > But you can still use the old drivers and framework if you choose.
> > Apparently,
> > whoever mastered that CD did choose. Point being, if /dev/sda doesn't
> > work for
> > you and /dev/hda does, then you should be using /dev/hda. From your point
> > of
> > view, it's just a name for something
> >
> > --
> > alan dot mckinnon at gmail dot com

-- 
alan dot mckinnon at gmail dot com



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] IDE is called hda
  2009-04-16 10:07   ` Thomas Chef
  2009-04-16 10:21     ` Matt Harrison
  2009-04-16 10:23     ` Alan McKinnon
@ 2009-04-16 22:45     ` kyle.bader
  2 siblings, 0 replies; 7+ messages in thread
From: kyle.bader @ 2009-04-16 22:45 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 2446 bytes --]

I'm unsure if lilo supports booting by filesystem label/uuid but that's what I do with grub. Might be woth looking into

Sent via BlackBerry from T-Mobile

-----Original Message-----
From: Thomas Chef <thomas.chef@gmail.com>

Date: Thu, 16 Apr 2009 12:07:08 
To: <gentoo-user@lists.gentoo.org>
Subject: Re: [gentoo-user] IDE is called hda


Aha I understand.

But what if my cd installation names my disk hda,
but when I download the gentoo kernel source and build it it will use sda.
So in my lilo.conf I must use hda, and when the new kernel boots it looks
for hda (because of my lilo.conf), but in that case it should be sda instead
?

On Thu, Apr 16, 2009 at 11:49 AM, Alan McKinnon <alan.mckinnon@gmail.com>wrote:

>  On Thursday 16 April 2009 11:28:54 Thomas Chef wrote:
> > From the handbook:
> > To begin, we'll introduce block devices. The most famous block device is
> > probably the one that represents the first drive in a Linux system,
> namely
> > /dev/sda. SCSI and Serial ATA drives are both labeled /dev/sd*; even IDE
> > drives are labeled /dev/sd* with the new libata framework in the kernel.
> If
> > you're using the old device framework, then your first IDE drive is
> > /dev/hda .
> >
> > But when I boot on Via Epia with my minimal installation CD 2008 I get my
> > IDE-disk as /dev/hda
> >
> > Is the kernel on the minimal CD old ?
>
> Not really. It's whatever was reasonably current at the time the CD image
> was
> built.
>
> It's not the age of the kernel that matters here. it's which drivers are in
> use. These things are in a constant state of flux and right now the Linux
> kernel still has drivers for the old and the new way of doing things with
> disks.
>
> Rationale: a driver writer decided some time ago that it would be better to
> consolidate things in the kernel and use the same code-base for all types
> of
> disk. This makes things easier overall as you don't have to eternally
> figure
> out if you have IDE/SCSI/PATA/SCSI/something_else drives - the thing is
> always
> going to be /dev/sd**
>
> But you can still use the old drivers and framework if you choose.
> Apparently,
> whoever mastered that CD did choose. Point being, if /dev/sda doesn't work
> for
> you and /dev/hda does, then you should be using /dev/hda. From your point
> of
> view, it's just a name for something
>
> --
> alan dot mckinnon at gmail dot com
>
>


[-- Attachment #2: Type: text/html, Size: 3082 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-04-16 22:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-16  9:28 [gentoo-user] IDE is called hda Thomas Chef
2009-04-16  9:49 ` Alan McKinnon
2009-04-16 10:07   ` Thomas Chef
2009-04-16 10:21     ` Matt Harrison
2009-04-16 10:23     ` Alan McKinnon
2009-04-16 22:45     ` kyle.bader
2009-04-16 10:00 ` Odp: " Rafał

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox