[CentOS] SDA and HDA

Sun Aug 22 22:35:47 UTC 2010
Robert Heller <heller at deepsoft.com>

At Sun, 22 Aug 2010 17:12:14 -0400 CentOS mailing list <centos at centos.org> wrote:

> 
> 
> Matt wrote:
> >> The only problems with switching after install is:
> >>
> >> 1) you need to be sure the initrd has the (proper) SATA kernel module(s)
> >> in it.  If necessary, you'll have to use mkinitrd to re-create the
> >> initrd file to include the proper driver modules.
> >>
> >> 2) /etc/fstab needs to be fixed, either to use LABEL= (rather than
> >> /dev/hdaN) and your file systems (including swap) need to have file
> >> sytem labels.  (LVM volumes won't be a problem.)
> >>     
> >
> > I changed it in bios to sata mode.  Now after boot up it calls it sda
> > instead of hda and disk I/O is much faster.
> >
> > I see in this file:
> >
> > # cat /boot/grub/device.map
> > # this device map was generated by anaconda
> > (hd0)     /dev/hda
> >
> > Should I change this too sda?  It works and boots the way it is but
> > just wandering?
> >   
> No - I believe grub just refers to hd as hard drive and this does not 
> relate to /dev/sda or /dev/hda

I am not so sure.  Actually, what the above line does is map *Grub's*
'hd0' to the *Linux* *device file* /dev/hda -- the primary master IDE
(PATA) disk, which is correct for a machine with 'standard' IDE disks.
I expect this is wrong for machines with true SCSI, SATA w/SCSI
abstraction (all native SATA drivers use SCSI abstraction) or PATA
(IDE) w/SCSI abstraction (newer specialized IDE drivers with SCSI
abstraction). I expect this is only used by grub installer (that writes
the grub stage one loader into the MBR and then maps the BIOS device to
the grub device.  The *Grub loader* is only going to be using BIOS I/O
calls.  Grub's loader file(s) use 'hdN' to access file systems
(partitions).

On the systems I have seen where there have never been 'native' IDE
disks (eg either SATA with a SATA w/SCSI abstraction or PATA w/SCSI
abstraction) the grub device.map has:

(hd0)     /dev/sda

-- 
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Download the Model Railroad System
http://www.deepsoft.com/  -- Binaries for Linux and MS-Windows
heller at deepsoft.com       -- http://www.deepsoft.com/ModelRailroadSystem/