LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch
User Name
Password
Arch This Forum is for the discussion of Arch Linux.

Notices



Reply
 
Search this Thread
Old 05-10-2007, 09:26 AM   #1
hepburnenthorpe
Member
 
Registered: Jun 2006
Location: Sydney
Distribution: Gentoo + Debian
Posts: 132

Rep: Reputation: 15
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)

Last edited by hepburnenthorpe; 05-10-2007 at 09:29 AM.
 
Old 05-10-2007, 09:43 AM   #2
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
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
 
Old 05-10-2007, 10:05 AM   #3
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 46
You might be able to edit udev's rules to make it name your hard drive "hda" rather than "sda", I suppose..
 
Old 05-10-2007, 11:59 AM   #4
hepburnenthorpe
Member
 
Registered: Jun 2006
Location: Sydney
Distribution: Gentoo + Debian
Posts: 132

Original Poster
Rep: Reputation: 15
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.
 
Old 05-11-2007, 12:04 PM   #5
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
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
 
Old 05-22-2007, 08:02 PM   #6
ErrorBound
Member
 
Registered: Apr 2006
Posts: 280

Rep: Reputation: 31
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.
 
Old 06-02-2007, 12:55 PM   #7
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
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.
 
Old 06-15-2007, 07:15 PM   #8
ZwartnAngel
LQ Newbie
 
Registered: Jun 2007
Posts: 1

Rep: Reputation: 0
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
 
Old 06-25-2007, 09:30 PM   #9
gregtrounson
LQ Newbie
 
Registered: Sep 2004
Distribution: RedHat/Fedora/Debian
Posts: 11

Rep: Reputation: 0
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
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: hdaMA, hdbMA
ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdcMA, hddMA
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
================================
 
Old 06-27-2007, 05:18 PM   #10
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
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!)

Last edited by phil.d.g; 06-27-2007 at 05:34 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub: works on hda, but not sda mattd7591 Linux - General 1 04-01-2007 04:38 PM
/hda to /sda - help! dodgydodgy Linux - General 9 10-20-2006 07:07 PM
Do I use hda or sda? jumico Linux - General 2 02-12-2006 06:55 PM
hda and hdb automounts nicely, but sda does not Navyblue Linux - Newbie 7 08-21-2005 12:53 PM
hda? sda? what do i have? nr5 Linux - Newbie 12 02-24-2005 07:50 PM


All times are GMT -5. The time now is 05:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration