# Problems booting - Kernel Panic.

## thorne

Hey there,

I have HPT366/368/370 enabled [*] in the kernel, yet when I boot, it only loads the VIA IDE drivers, and not the HPT374 ones.  If I boot off the 1.2 cd, it loads these drivers just fine.  I just re-built my system, and up until yesterday (using kernel r7, with same driver as above) the drives loaded fine.

Are there any issues with kernel-r9 (gentoo-sources) and the hpt drivers?

Thanks.  Pulling my hair out trying to get grub working... now I don't think it was grub that was causing the problem.

What is currently selected under IDE, ATA and ATAPI Block devices:

```
<*> Enhanced IDE/MFM/RLL

<*> Include IDE/ATA-2 Disk support

<*> SCSI emulation supports

[*] Generic PCI IDE chipset support

[*] Sharing PCI IDE interrupts support

[*] Generic PCI bus-master DMA support

[*] Use PCI DMA by default when available

[*] HPT366/368/370 chipset support

[*] VIA82CXXX chipset support
```

I should also mention that my motherboard is an Abit AT7.  Onboard HPT374 controller.  Also, I did not set up a RAID.  I am merely using the HPT374 so that I can install linux on a single 40gb ata100 drive.

----------

## BackSeat

Are you SURE your problem is the fact that the HPT drivers aren't loading? What is the exact text of the panic?

BS

----------

## thorne

one sec.. let me try booting.  The reason I started to think it is because of the drivers is because:

a. I have tried so many different grub menu.lst files, I thought it was impossible none of them worked.

b. When I boot off the CD, I see:

VP_IDE: VT8233A blah blah blah

ide-0, ide-1, hda, hdb, hdc, etc.

HPT374 blah blah blah

hde, hdf

When I boot off the drive itself, VP_IDE is there, but HPT374 is not.  It does not list hde, and hdf.

OK, kernel panic message:

```
VFS: Cannot open root device "hdf3" or 21:43

Please append a correct "root=" boot option

Kernel panic: VFS: Unable to mount root fs on 21:43
```

I have the following setup:

/dev/hdf1    /boot

/dev/hdf2    swap

/dev/hdf3    /

/dev/hdf does not exist, so that must mean the driver didn't load properly, and grub can not see the drive.

----------

## thorne

and since someone will probably ask, here is any pertinent information:

on hpt374 controller

```
fdisk -l /dev/hdf

Disk /dev/hdf: 255 heads, 63 sectors, 4865 cylinders

Units = cylinders of 16065 * 512 bytes

Device      Boot    Start    End    Blocks        Id    System

/dev/hdf1             1         13     104391       83    Linux

/dev/hdf2             14        79    530145       83    Linux

/dev/hdf3             80       1963  15133230   83    Linux

/dev/hdf4             1964   4865  23397448+  c     Win95 FAT32 (LBA)

```

on hpt374 controller

```
fdisk -l /dev/hde

/dev/hde1  blah blah blah

/dev/hde2  blah blah blah
```

regular ide controller

```
fdisk -l /dev/hda

device        boot   id   system

/dev/hda1   *       7    hpfs/ntfs

/dev/hda2            f    Win95 Ext'd (LBA)

/dev/hda5            7    hpfs/ntfs
```

```
grub> find /boot/bzImage

  (hd2,0)

grub>
```

```
grub> root(hd2,0)

>setup(hd0)

>quit
```

grub.conf (ln'd to menu.lst)

```
default 0

timeout 30

color green/black lightgreen/black

title=Gentoo

root(hd2,0)

kernel /boot/bzImage root=/dev/hdf3 append="hdc=ide-scsi hdd=ide-scsi"

title=Windows XP

root (hd0,0)

chainloader +1
```

etc/fstab is just your standard run-o-the-mill copy of what is in the install doc, except that I replaced BOOT SWAP and ROOT with hdf1, hdf2, and hdf3.

Also, not that this menu.lst file is only one of MANY different attempts. What am I doing wrong?

----------

## thorne

I'm trying to compile the kernel step by step... i.e.

make dep

make clean

make bzImage

make modules

make modules_install

to make sure it compiles properly and I didn't miss something.  While creating bzImage, the last few lines are:

```
tools/build -b bbootsect bsetup compressed /bvmlinux.out CURRENT > bzImage

Root device is (33, 67)

Boot sector 512 bytes.

Setup is 2524 bytes.

System is 1093 kB

warning: kernel is too big for standalone boot from floppy

make[1]: Leaving directory '/usr/src/linux-2.4.19-gentoo-r9/arch/i386/boot'
```

two questions:

1. Root device is (33, 67) ... are these numbers supposed to match with what is displayed in the kernel panic? currently 21:43.  If so, what is wrong with my menu.lst file?

2. Although I doubt it, does the warning have anything to do with it?

----------

## rac

 *thorne wrote:*   

> 1. Root device is (33, 67) ... are these numbers supposed to match with what is displayed in the kernel panic? currently 21:43.

 

$21 == #33

$43 == #67

...so I'd say that's a match (here $ means hex, # means decimal)

 *Quote:*   

> does the warning have anything to do with it?

 

I don't think so...I get that warning too, and everything works fine (no highpoint here though).

----------

## thorne

So that should be more proof that HPT374 is not loading.  I'm not going crazy.  I can't find much information on this though.  

I guess the problem is that I am not entirely sure what to look for.  As far as I know, everything that needs to be compiled into the kernel, is there.  I could post my .config file if anyone want to have a look at it.

Other than that, I'm out of idea for the moment.  I've tried an insane of amount of kernel compilations, but nothing I do seems to get HPT374 to kick in.

I mount boot, as I'm using the rescue CD, so I'm sure I'm not copying bzImage into oblivion.

----------

## rac

All the recent threads that come up in a search for highpoint seem to indicate to me that your best bet is to go back to -r7 sources, which are based off of vanilla 2.4.18.  -r9 is based off of vanilla 2.4.19.

----------

## thorne

That would make sense since I was using r7 when my system worked.  Being the noob that I am, how would I go about replacing my current sources with r7?

It would involve removing r9, and recreating the symbolic link to r7, right?

how to I replace the current kernel with an older one?  I'll be looking at the docs, but let me know if there is something the docs don't cover.

Thanks for your help, yet again rac!

<edit>OK, I know I've done this before, but I made the mistake of not writing it down.  Where can I find the linux-2.4.18-gentoo-r7 sources?</edit>

<edit2>duh... kernel.org... I would assume it would be easier to trick gentoo into emerging r7.. ah well</edit>

----------

## rac

I would just 

```
# emerge /usr/portage/sys-kernel/gentoo-sources/gentoo-sources-2.4.19-r7.ebuild
```

...and afterwards make sure that the /usr/src/linux symlink is pointing where it should be.  If you want to get fancy about it, you could pin that version of gentoo-sources in your world file, so that it won't try to update you any more.  Search for posts with "pin and world" by Naan Yaar for details.

EDIT: Have you seen Lnx_dork's post in here?

----------

## thorne

oh, that's easy, lol

I ended up editing the packages file and adding:

=sys-kernel/gentoo-sources-2.4.19-r7

now if I pretend an emerge, I get

[ebuild  N   ] sys-kernel/gentoo-sources-2.4.19-r7

Same thing, different way of doing it, or is my method wrong?

Yup, saw Lnx_dork's post, but I have not setup a RAID.

WHEW... ok, I think I'm ready to compile r7 now...

----------

## rac

 *thorne wrote:*   

> I ended up editing the packages file and adding:
> 
> =sys-kernel/gentoo-sources-2.4.19-r7

 

Only problem with this approach is that it will get blasted away each time you rsync.  Eventually finer-grained masking will be possible.

----------

## thorne

AHA!!! in r7, HPT is only labeled HPT366, I remember that clearly!  They must have made changes in the driver because in r9, it is labled differently.

Almost ready to compile.

...

compiling now!

----------

## thorne

boink!  Hey, that did the trick!  I'm now in my gentoo system, compiling KDE... er... kde-3.1beta2 that is =)

Thanks rac.

----------

## thorne

Been busy... not that anyone should care, but I now have a fully functional gentoo box, running KDE 3.1 Beta 2.... again.  

beta 2 looks really nice.  I like the fact that keramik is built in (comes with the instlal) and I really like the addition of tabs in konqueror.  Doubt I will be merging mozilla... always had problems with it in my previous gentoo installation anyway.

Konqueror rocks!

----------

## maj

so you can get gentoo to install to a hard drive on a HPT374 channel? wouldnt do it for me - hrm, just got a new AT7 from an RMA, will update to the latest BIOS and try again i guess..

----------

## Gnufsh

did you try a newer kernel like the ac,ck or vanilla- sources?

----------

## thorne

You have to use an older kernel... or well.. at least back when I was installing you did.  The newest kernel may include the drivers... not sure about it though.

----------

## maj

tried using the latest gentoo-sources and vanilla-sources, will try to find a patch for my kernel, or downgrade to r7

hopefully ill get it soon

----------

