LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 08-31-2004, 08:57 PM   #1
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
2.6.x kernel reading HDD info incorrectly - missing partitions


Hello all,

First of all, this is going to be something of an open-ended post, so please forgive my rambling and lack of any direct question. A light finally came on in my head today, and I realize that what I thought are a few separate problems is actually all related.

Here is my disk layout, I triple boot Gentoo, Arch, and FreeBSD:
Code:
 /dev/hda = MAXTOR 6L040J2, ATA DISK drive 40GB 
 hda1 = shared '/boot' partition 
 hda2 = gentoo '/' partition 
 hda3 = gentoo '/usr/' partition 
 hda4 = gentoo '/home' partition 
 /dev/hdb = SAMSUNG SP0802N, ATA DISK drive 80GB 
 hdb1 = shared music partition mounted as /home/music on both Gentoo and Arch 
 hdb2 = shared swap partition 
 hdb3 = FreeBSD partition 
 hdb4 = logical Partition 
 hdb5 = archlinux '/' partition 
 hdb6 = shared video partition mounted as /home/music/video on both Gentoo and Arch
I cannot boot a 2.6 kernel that mounts '/' on /dev/hda. I started a thread about it a while a go here:
http://www.linuxquestions.org/questi...hreadid=191284

Because of this, I installed Arch Linux on some empty space on hdb, and successfully built and booted a 2.6.7 kernel. However, I could not mount any partition except for hda1 using a 2.6 kernel from Arch...this led me to place this thread on the arch forums:
http://bbs.archlinux.org/viewtopic.php?t=6234

After building but failing to boot yet another 2.6 kernel on gentoo today, I had the bright idea of changing "root=/dev/hda2" to "root=/dev/hdb5" and wouldn't you know, it booted up Arch just fine...but didn't see the partitions on hda correctly.

Finally I realized the problems are related. Here is the output from dmesg and fdisk about /dev/hda detected when using a 2.4.x kernel:
Code:
# dmesg | grep hda
<snip>
hda: MAXTOR 6L040J2, ATA DISK drive
hda: attached ide-disk driver.
hda: host protected area => 1
hda: 78177792 sectors (40027 MB) w/1819KiB Cache, CHS=4866/255/63, UDMA(100)
# dmesg | grep /dev/ide/
 /dev/ide/host0/bus0/target0/lun0: [EZD] [remap 0->1] [4866/255/63] p1 p2 p3 p4
 <snip>
# fdisk -l /dev/hda
Disk /dev/hda: 40.0 GB, 40027029504 bytes
255 heads, 63 sectors/track, 4866 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1          24      192748+  83  Linux
/dev/hda2              25        1240     9767520   83  Linux
/dev/hda3            1241        3710    19840275   83  Linux
/dev/hda4            3711        4866     9285570   83  Linux
And here is the output when running Arch with the 2.6 kernel:
Code:
# dmesg | grep hda
<snip>
hda: 78177792 sectors (40027 MB) w/1819KiB Cache, CHS=65535/16/63, UDMA(100)
# dmesg | grep /dev/ide/
 /dev/ide/host0/bus0/target0/lun0: p1[EZD]
<snip>
# fdisk -l /dev/hda
Disk /dev/hda: 40.0 GB, 40027029504 bytes
255 heads, 63 sectors/track, 4866 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        4111    33021576   55  EZ-Drive
As you can see from these results, 2.4 and 2.6 kernels clearly disagree about the partition structure of /dev/hda. Notice that the disk geometry is reported differently ("CHS=4866/255/63" vs. "CHS=65535/16/63"). Especially telling is the difference between these two lines (2.4 first):
Code:
/dev/ide/host0/bus0/target0/lun0: [EZD] [remap 0->1] [4866/255/63] p1 p2 p3 p4
/dev/ide/host0/bus0/target0/lun0: p1[EZD]
So it seems that the system id for hda is "EZ-Drive" but the 2.4 kernel does some sort of remapping ("remap 0->1") to make it work. I assure you that when I installed gentoo I created all 4 partitions on /dev/hda manually and gave them id 83 (linux). I don't know what "EZ-Drive" is, how it got here, or what it's doing. I don't know why a 2.4 kernel can see past it to the correct partition layout and a 2.6 kernel cannot.

So if your still reading this at this point, and you have any idea about what's going on please enlighten. If you need more info on something just ask...

Thanks.
 
Old 09-01-2004, 06:23 AM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760

Original Poster
Blog Entries: 4

Rep: Reputation: 78
Well, I fixed my own problem. Adding "hda=remap" to the kernel command line cleared it up, and I have finally, after about 100 attempts gotten a 2.6 kernel to boot my gentoo install.

I just don't know what to do now...
 
  


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
QM_MODULES missing, need info; RH9.0, 2.6.1 kernel truepatience Linux - Software 1 07-26-2005 06:36 PM
Missing 'module-info-2.6.12.2' after kernel compile. mr_mccabe Linux - General 1 07-14-2005 02:46 PM
I deleted partitions on one hdd and now get "kernel panic..." on other. Any ideas? rose_bud4201 Slackware 18 06-12-2004 11:17 AM
compiling a kernel incorrectly maestro52 Linux - Software 21 12-06-2003 07:41 PM
reading partitions twinkers Linux - General 2 10-12-2003 02:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

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

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
Open Source Consulting | Domain Registration