LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Arch (https://www.linuxquestions.org/questions/arch-29/)
-   -   Why sda* and not hda* ? (https://www.linuxquestions.org/questions/arch-29/why-sda%2A-and-not-hda%2A-552872/)

hepburnenthorpe 05-10-2007 08:26 AM

Why sda* and not hda* ?
 
Hey all,

New Arch user here.... been using Gentoo as my main sys for about 3 years. Other distros for a couple before that.

Ok, long story. I have just completed my first Arch install (sweet), rebooted and got a kernel panic. Something about being unable to mount root fs. Ive managed to find a solution to this problem (and got the system booted) after reading a thread about a similar issue. It all related to mkinitcpio.conf.

Anyway, all I needed to do was edit my /etc/fstab and /boot/menu.list so that hda* became sda*. I just don't understand why.

Referencing my filesystems via sda* just doesn't seem right. How do I go about changing whatever it is I need to change to get them back to hda* ?

My mkinitcpio.conf
Code:

MODULES="ata_generic ata_piix"
BINARIES=""
FILES=""
HOOKS="base udev autodetect pata scsi sata keymap filesystems"

My /etc/fstab
Code:

none        /dev/pts    devpts      defaults                0      0
none        /dev/shm    tmpfs      defaults                0      0
/dev/cdrom  /mnt/cdrom  iso9660    ro,user,noauto,unhide  0      0
#/dev/dvd    /mnt/dvd  udf        ro,user,noauto,unhide  0      0
#/dev/fd0    /mnt/fd0  vfat        user,noauto            0      0
/dev/sda11  swap        swap        defaults                0      0
/dev/sda7  /          reiserfs    defaults                0      1

My /boot/menu.list
Code:

default 0
fallback 0
timeout 1
hiddenmenu

title Gentoo
root (hd0,11)
kernel /gentoo/stable/kernel-2.6.20-gentoo-r7-10.05.2007 root=/dev/hda5

title  Arch
root  (hd0,11)
kernel /arch/vmlinuz26 root=/dev/sda7 vga=775
initrd /arch/kernel26.img

I am dual booting Arch with Gentoo, so my /boot layout is a little different. I did not install grub as I'm using the one installed with Gentoo.

I think I may need to reconfigure my mkinitcpio.conf file and then maybe rebuild my kernel / image. I'm just not sure how or what to configure. I really don't want to reference my disks via sda* as it just makes no sense.

This is a minimal install, I haven't installed anything but base as yet.

Thanks in advance.

PS: Ive tried removing 'pata scsi sata' from my hooks, changing all references to sda* back to hda* and rebooting but I get the same Kernel panic again.

Any ideas?

The actual Arch forum seem very slow. (at least when compared to the Gentoo community)

ta0kira 05-10-2007 08:43 AM

Serial ATA (SATA) drives will come up as sd*. I believe only IDE drives come up as hd*. Are you using a newer laptop? If you have a SATA motherboard make sure you integrate the appropriate SATA controller unit into your kernel.
ta0kira

oneandoneis2 05-10-2007 09:05 AM

You might be able to edit udev's rules to make it name your hard drive "hda" rather than "sda", I suppose..

hepburnenthorpe 05-10-2007 10:59 AM

Im not using SATA or ssci. All other distros recognise my IDE drives as hda and hdb.

Look at my Gentoo kernel line. Arch does something wierd.

ta0kira 05-11-2007 11:04 AM

Quote:

Originally Posted by oneandoneis2
You might be able to edit udev's rules to make it name your hard drive "hda" rather than "sda", I suppose..

udev won't start until / is mounted; it needs to read /etc/udev/rules.d for the rules.
ta0kira

ErrorBound 05-22-2007 07:02 PM

If you are using a kernel >= 2.6.20, all /dev/hd*s will appear as /dev/sd*s. This is a result of Linux using the libATA drivers for PATA as well as SATA from now on.

saikee 06-02-2007 11:55 AM

Yes, kernel 2.6.20 and later abandon the Pata disk name convention and all Pata disks in future will be part of the SCSI/Sata/USB disks family with names like sda, sdb, sdc etc.

Some distros with the above kernels still support Pata names but it is only a matter of time before they stop. Installed systems with older kernel will work just as before. The inofrmation on the disk is unchanged but the driver used to access the disks have been standardised/streamlined.

You only have a problem if the existing Pata disk has nore than 15 partitions which is the limit for a SCSI/Sata/USB disk. A Pata disk can have up to 63 partitions in the older kernels.

ZwartnAngel 06-15-2007 06:15 PM

make it easy for yourself and give your partitions labels, then you don't have to worry about the labeling by the native ide module (kernel module, who gives you the hd* in /dev) or the pata module (who gives you the sd* name in /dev)
labels make your life easier :p

gregtrounson 06-25-2007 08:30 PM

Nothing but trouble
 
Quote:

Originally Posted by ZwartnAngel
make it easy for yourself and give your partitions labels, then you don't have to worry about the labeling by the native ide module (kernel module, who gives you the hd* in /dev) or the pata module (who gives you the sd* name in /dev)
labels make your life easier :p

Which is all well and good, until you connect up an old external hard drive with conflicting partition labels and wonder why your previously perfectly good system isn't booting any more or, worse, is now picking up say its /usr from the external unit.

Under this new system how on earth is one supposed to determine which interface ones IDE drive is on? Is the CDROM the primary slave or secondary master in the following example?

================================
libata version 2.20 loaded.
pata_amd 0000:00:08.0: version 0.2.8
PCI: Setting latency timer of device 0000:00:08.0 to 64
ata1: PATA max UDMA/133 cmd 0x000101f0 ctl 0x000103f6 bmdma 0x0001f000 irq 14
ata2: PATA max UDMA/133 cmd 0x00010170 ctl 0x00010376 bmdma 0x0001f008 irq 15
scsi0 : pata_amd
ata1.00: ata_hpa_resize 1: sectors = 156299375, hpa_sectors = 156301488
ata1.00: Host Protected Area detected:
current size: 156299375 sectors
native size: 156301488 sectors
ata1.00: ATA-6: WDC WD800JB-00FMA0, 13.03G13, max UDMA/100
ata1.00: 156299375 sectors, multi 16: LBA
ata1.00: ata_hpa_resize 1: sectors = 156299375, hpa_sectors = 156301488
ata1.00: Host Protected Area detected:
current size: 156299375 sectors
native size: 156301488 sectors
ata1.00: configured for UDMA/100
scsi1 : pata_amd
ata2.00: ATAPI, max UDMA/33
ata2.00: configured for UDMA/33
scsi 0:0:0:0: Direct-Access ATA WDC WD800JB-00FM 13.0 PQ: 0 ANSI: 5
SCSI device sda: 156299375 512-byte hdwr sectors (80025 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
SCSI device sda: 156299375 512-byte hdwr sectors (80025 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sda: sda1 sda2 sda3 sda4 < sda5 sda6 sda7 sda8 >
sd 0:0:0:0: Attached scsi disk sda
scsi 1:0:0:0: CD-ROM HL-DT-ST DVDRAM GSA-4163B A101 PQ: 0 ANSI: 5
================================


Booting up the same system with an older kernel using a sane ata driver reveals that it is in fact the secondary master:

================================
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
NFORCE3-250: IDE controller at PCI slot 0000:00:08.0
NFORCE3-250: chipset revision 162
NFORCE3-250: not 100% native mode: will probe irqs later
NFORCE3-250: BIOS didn't set cable bits correctly. Enabling workaround.
NFORCE3-250: 0000:00:08.0 (rev a2) UDMA133 controller
ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hda:DMA, hdb:DMA
ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:DMA, hdd:DMA
Probing IDE interface ide0...
hda: WDC WD800JB-00FMA0, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
hdc: HL-DT-ST DVDRAM GSA-4163B, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
================================

phil.d.g 06-27-2007 04:18 PM

The cd drive will appear as sr0.

ata1.00 is your primary master
ata1.01 primary slave
ata2.00 secondary master
ata2.01 secondary slave

If you want to use the old pata drivers then use ide instead of pata in your HOOKS line, but unless you have a specific problem with the new driver (other than them now being referenced as sd devices) then I recommend you stick with it.

Once you have edited your mkinitcpio.conf file then you need to regenerate your initrd files:
Code:

# mkinitcpio -p kernel26
PS: I'm unsure you can guarantee the "sane" driver to always reference the secondary master as hdc; what would happen if you had an ide controller that only supported one device? (I don't know the answer or of any such controller, but it's something to ponder!)


All times are GMT -5. The time now is 11:39 PM.