Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gentoo can't access hard disk
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
tuclogicguy
n00b
n00b


Joined: 17 Dec 2013
Posts: 15

PostPosted: Wed Dec 18, 2013 6:29 pm    Post subject: gentoo can't access hard disk Reply with quote

I have been building PCs and installing various operating systems on them for years, and have quite a bit of experience with Linux, but this is my first experience with Gentoo.

I am trying to get Gentoo running on my trusty old test PC that is about 12 years old.
Motherboard: Intel D815EE2U
Processor: Pentium III, 866 MHz
80GB PATA hard disk

This machine already has Windows 98, OS/2 Warp 4, and FreeBSD running on it.

I created 3 new logical partitions for Gentoo:
/dev/sda5 ext2 boot
/dev/sda6 linux-swap
/dev/sda7 jfs root

I tried to follow the installation instructions in the handbook carefully. One thing that has me confused at this point is choosing the correct hard disk driver and associated options. I looked at the /var/log/messages file when booted from the Gentoo Install CD and it appeared that it was using the ata_piix driver for accessing the disks. I spent many hours going through menuconfig to select the options that applied to this machine. For disk access, I selected these options:
Device Drivers --->
< > ATA/ATAPI/MFM/RLL support (DEPRECATED) --->
<*> Serial ATA and Parallel ATA drivers --->
[*] ATA SFF support (for legacy IDE and PATA)
[*] ATA BMDA support
<*> Intel ESB, ICH, PIIX3, PIIX4, PATA/SATA support

I checked /usr/src/linux/.config and saw that it had
CONFIG_ATA_PIIX=y
and the other variables associated with other drivers are not set, so I think I have selected the right menuconfig option in order to get the ata_piix driver built into the kernel.

When I try to boot Gentoo, it appears that the kernel starts to load and starts accessing some of the hardware items and then crashes with a "Kernel panic". Here are the messages that appear on the screen:
Code:
input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input3
ata1.00: ATA-8: WDC WD800AAJB-00J3A0, 01.03E01, max UDMA/133
ata1.00: 156301488 sectors, multi 16: LBA48
ata1.00: configured for UDMA/100
scsi 0:0:0:0: Direct-Access     ATA      WDC WD800AAJB-00 01.0 PQ: 0 ANSI: 5
ata2.00: ATAPI: LITE-ON LTR-12101B, LS3G, max MWDMA2
ata2.01: ATAPI: IOMEGA  ZIP 100       ATAPI, 23.D, max PIO2, CDB intr
ata2.00: configured for MWDMA2
ata2.01: configured for PIO2
scsi 1:0:0:0: CD-ROM            LITE-ON  LTR-12101B       LS3G PQ: 0 ANSI: 5
scsi 1:0:1:0: Direct-Access     IOMEGA   ZIP 100          23.D PQ: 0 ANSI: 5
tsc: Refined TSC clocksource calibration: 861.936 MHz
Switching to clocksource tsc
input: GenPS/2 Genius Mouse as /devices/platform/i8042/serio1/input/input4
VFS: Cannot open root device "sda7" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU: 0 PID: 1 Comm: swapper Not tainted 3.10.17-gentoo #5
Hardware name:  /D815EE2U,   BIOS EA81520A.86A.0039.P21.0211061753  11/06/2002
  trace back dump


It appears that the driver has basic communication with the 3 IDE devices. (I think it is sending an ID command and getting responses in order to retrieve the information displayed.) But, it appears that the driver is unable to read the partition information from the disk. Below the line "here are the available partitions:" nothing is listed.

I did select the ext2 and jfs file system options when compiling the kernel, but it looks like the problem is at a higher level than the root file system. It can't even find the sda7 partition.

Something in the kernel is obviously not configured right.

Any suggestions?
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1609
Location: U.S.A.

PostPosted: Wed Dec 18, 2013 7:30 pm    Post subject: Reply with quote

Your kernel configuration appears to be correct.

I would double-check that I had the right filesystem support enabled in the kernel.

Then I would double-check my specification of both the boot and root devices in my bootloader configuration.
_________________
patrix_neo wrote:
The human thought: I cannot win.
The ratbrain in me : I can only go forward and that's it.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43195
Location: 56N 3W

PostPosted: Wed Dec 18, 2013 7:44 pm    Post subject: Reply with quote

tuclogicguy,

What you posted is correct but not sufficient because the Hard Disk Driver is in two parts.
You have the low level part. You need the high level part too.

On the
Code:
SCSI device support
menu you need
Code:
  │ │        < > RAID Transport Class                                                      │ │ 
  │ │        -*- SCSI device support                                                       │ │ 
  │ │        < > SCSI target support                                                       │ │ 
  │ │        [*] legacy /proc/scsi/ support                                                │ │ 
  │ │            *** SCSI support type (disk, tape, CD-ROM) ***                            │ │ 
  │ │        <*> SCSI disk support                                                         │ │ 
  │ │        < > SCSI tape support                                                         │ │ 
  │ │        < > SCSI OnStream SC-x0 tape support                                          │ │ 
  │ │        <*> SCSI CDROM support                                                        │ │ 
  │ │        [ ]   Enable vendor-specific extensions (for SCSI CDROM)                      │ │ 
  │ │        <*> SCSI generic support

Even your PATA drive is under the SCSI stack with the drivers on the
Code:
<*> Serial ATA and Parallel ATA drivers  --->
menu.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
lexflex
Guru
Guru


Joined: 05 Mar 2006
Posts: 354
Location: the Netherlands

PostPosted: Wed Dec 18, 2013 7:45 pm    Post subject: Reply with quote

You did set your root= option in grub ?
Maybe post your grub.conf ( or at least the relevant section) ?
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10306
Location: Córdoba (Spain)

PostPosted: Wed Dec 18, 2013 7:45 pm    Post subject: Reply with quote

After the ata stuff, you should see the disk being detected as sda (or sdb, or whatever), and the list of partitions inside of it. This happens before you have to care about the fs, so that's not the problem. As you say, something's missing before that.

Note that nowadays most of this stuff needs the scsi layer to work. It's been at least a couple of years since I've had to deal with that part of the kernel configuration for last time, though.

Code:
scsi 0:0:0:0: Direct-Access     ATA      WDC WD800AAJB-00 01.0 PQ: 0 ANSI: 5


This line is strange ("strange" means I am unfamiliar with it). I happen to have one machine with piix, and this is what I get:

Code:

[    0.516125] ata_piix 0000:00:1f.1: version 2.13
[    0.516365] ata_piix 0000:00:1f.1: setting latency timer to 64
[    0.517181] scsi0 : ata_piix
[    0.517401] scsi1 : ata_piix
[    0.517564] ata1: PATA max UDMA/100 cmd 0x1f0 ctl 0x3f6 bmdma 0x3c40 irq 14
[    0.517569] ata2: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma 0x3c48 irq 15
[    0.517636] ata2: port disabled--ignoring
[    0.690491] ata1.00: HPA detected: current 219538272, native 234441648
[    0.690500] ata1.00: ATA-7: FUJITSU MHV2120AH PL, 004200A0, max UDMA/100
[    0.690505] ata1.00: 219538272 sectors, multi 16: LBA48
[    0.690513] ata1.01: ATAPI: TSSTcorpCD/DVDW TS-L532L, HP12, max MWDMA2
[    0.712370] ata1.00: configured for UDMA/100
[    0.734307] ata1.01: configured for MWDMA2
[    0.735276] scsi 0:0:0:0: Direct-Access     ATA      FUJITSU MHV2120A 0042 PQ: 0 ANSI: 5
[    0.735642] sd 0:0:0:0: [sda] 219538272 512-byte logical blocks: (112 GB/104 GiB)
[    0.735796] sd 0:0:0:0: [sda] Write Protect is off
[    0.735804] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    0.735871] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    0.735880] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    0.742932] scsi 0:0:1:0: CD-ROM            TSSTcorp CD/DVDW TS-L532L HP12 PQ: 0 ANSI: 5
[    0.759731]  sda: sda1 sda2


I suspect you either have an unusual SCSI setup and has to pass some parameter to the kernel or there's some strange setting in the kernel preventing your kernel from correctly naming the device nodes for your partitions. My brain can't give much more right now, maybe tomorrow it will be in better shape :roll:
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7071

PostPosted: Wed Dec 18, 2013 9:06 pm    Post subject: Reply with quote

If your kernel can see your disk, but not partitions, you might just lack partitions support for your system. check CONFIG_MSDOS_PARTITION=y
or the sd block device handler (NeddySeagoon already gave you how to enable it)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43195
Location: 56N 3W

PostPosted: Wed Dec 18, 2013 9:17 pm    Post subject: Reply with quote

tuclogicguy,

krinns post has made me look again
Code:
[    0.759731]  sda: sda1 sda2
The kernel sees two partitions on /dev/sda
That also means your high level SCSI menu settings are correct.

That may mean you have several block devices attached and /dev/sda is not the one you want.
Maybe its the ZIP drive that appears as sda ?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3947
Location: Dallas area

PostPosted: Wed Dec 18, 2013 9:24 pm    Post subject: Reply with quote

NeddySeagoon wrote:
tuclogicguy,

krinns post has made me look again
Code:
[    0.759731]  sda: sda1 sda2
The kernel sees two partitions on /dev/sda
That also means your high level SCSI menu settings are correct.

That may mean you have several block devices attached and /dev/sda is not the one you want.
Maybe its the ZIP drive that appears as sda ?


On mine (several partitions on sda) I see
Code:
[    1.301510]  sda: sda1 sda2 sda3 sda4 < sda5 sda6 sda7 sda8 >


What does "ls /dev/sd*" show?
_________________
Asus m5a99fx, FX 8320 - nouveau, oss4, rx550 for qemu passthrough
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
5.0.13 zen kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 8.2.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
tuclogicguy
n00b
n00b


Joined: 17 Dec 2013
Posts: 15

PostPosted: Wed Dec 18, 2013 10:32 pm    Post subject: Reply with quote

Thanks, NeddySeagoon, for the quick reply. That was exactly what I was missing. Gentoo boots now!
Back to top
View user's profile Send private message
tuclogicguy
n00b
n00b


Joined: 17 Dec 2013
Posts: 15

PostPosted: Wed Dec 18, 2013 10:38 pm    Post subject: Reply with quote

I mean that adding the SCSI device support options you listed was what I needed to get the ata_piix driver to work.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7071

PostPosted: Wed Dec 18, 2013 10:52 pm    Post subject: Reply with quote

NeddySeagoon wrote:

krinns post has made me look again
Code:
[    0.759731]  sda: sda1 sda2
The kernel sees two partitions on /dev/sda
That also means your high level SCSI menu settings are correct.

I think i92guboj will be happy to know that :P
It's from his dmesg, not from tuclogicguy's one
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10306
Location: Córdoba (Spain)

PostPosted: Wed Dec 18, 2013 11:00 pm    Post subject: Reply with quote

I am indeed happy that it has been working all this time :lol:

Hehe, that happens to me all the time ;)

I am glad the OP found his answer, that's the important thing :)
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1609
Location: U.S.A.

PostPosted: Thu Dec 19, 2013 12:33 am    Post subject: Reply with quote

I think you probably do not need the
Code:
[*] legacy /proc/scsi/ support

_________________
patrix_neo wrote:
The human thought: I cannot win.
The ratbrain in me : I can only go forward and that's it.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43195
Location: 56N 3W

PostPosted: Thu Dec 19, 2013 9:01 pm    Post subject: Reply with quote

BoneKracker,

You are probably right about that.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum