# Critical problem when trying to boot from a SATA drive

## Jinidog

Hello guys,

I'm currently trying to install Gentoo on an Amilo 3438 for a friend. (sadly this great message is not mine  :Sad:  )

Knoppix starts well on this machine, the cdrom-drive is /dev/hda and the harddrive is /dev/sda.

(Ubuntu and FedoraCore4 fails to install on this machine because of acpi problems)

Installation of Gentoo went well until I tried to boot it with a self configured kernel.

No matter what I tried, it always produced the kernel panic.

 *Quote:*   

> 
> 
> VFS: Cannot open root device "sda5" or unknown-block(0,0)
> 
> Please append a correct "root=" boot option
> ...

 

Of course I tried various other root-options. hda5, hdb5, sd[a-e]5

Okay, the laptop has the i915 chipset and uses ICH6.

I played with the kernel settings for hours now.

I have the necessare SCSI stuff compiled in (dist and generic support), from Low-Level SCSI I have the SATA-Support in an the Intel ICH6 support selected.

I'm additional using the necessary ATA stuff, and of course the driver for the PIIX-IDE Chip.

The filesystem is xfs, I tried it on another partition with reiserfs too.

I have support for both filesystems compiled in.

The harddisks looks like this.

sda1: 20 GB reserved for a possible Windows

sda5: 20 GB root-filesystem xfs

sda6: 1 GB swap

sda7: 39 GB reiser-fs partition for data

Well, it seems to be mostly a kernel problem.

I tried gentoo-sources 2.6.12-r10 and 2.6.13-r2.

Ubuntu boots correctly and installs, but it fails because of ACPI-problems (kernel panics) later.

Fedora Core4 panics when starting the install.

Okay, I hope some of you can help me.

This is really ugly. It's not the first SATA-system I got in touch with.

The kernel-config follows:

 *Quote:*   

> 
> 
> CONFIG_X86=y
> 
> CONFIG_MMU=y
> ...

 

----------

## NeddySeagoon

Jinidog,

This 

```
unknown-block(0,0)
```

means the kerenl cannot talk to the HDD.

This 

```
# ATA/ATAPI/MFM/RLL support

#

CONFIG_IDE=y

CONFIG_BLK_DEV_IDE=y

#

# Please see Documentation/ide.txt for help/info on IDE drives

#

CONFIG_BLK_DEV_IDE_SATA=y 
```

 is wrong. Your SATA drive will be /dev/hde, if it works at all.

This is the depreciated IDE SATA driver.

And 

```
CONFIG_SCSI_SATA=y

# CONFIG_SCSI_SATA_AHCI is not set

# CONFIG_SCSI_SATA_SVW is not set

CONFIG_SCSI_ATA_PIIX=y 
```

conflicts with the above. You must not have both the SCSI SATA and IDE SATA drivers in use.

Since you suffer from the ICH6 chipset and IDE and SATA devices, you will have problems making DMA work on the IDE side.

I have read that you need to turn off the IDE PIIX chipset support and use ide0=noprobe on the kernel command line.

When you use the SATA SCSI driver your drive will be /dev/sda again.

----------

## Jinidog

I tried just the SATA-drivers at first and just tried it with the IDE-drivers because it didn't work.

I'll try what you said but probably it won't help because I had it like that before.

----------

## Jinidog

As I said, nothing changed.

----------

## NeddySeagoon

Jinidog,

The liveCD runs a fully modular kernel. Boot the liveCD and run lsmod

What does it use?

Have some of the same but make the driver modules built in.

Also chech you are doing your kernel installs correctly - look at the file timestamps in /boot.

----------

## erikm

Assuming you have the correct SATA modules configured, preferrably checked using NeddySeagoon's method, you could also try passing the 'doscsi' kernel parameter, so that your grub kernel line reads

```
 kernel /<your kernel> doscsi <your other parameters, root= , real_root= and whatnot>
```

----------

## Jinidog

I have only Knoppix available. It doesn't list anything interesting about the SATA stuff.

(the SATA chipset support must be compiled in, I think)

Everything is okay with the kernels. I'm booting the right one.

Putting doscsi on the command line does not help either.

It's quite sure that I'm using the right sata-chipset support.

It's ICH6.

----------

## Jinidog

Hello,

the problem still exists.

I recently updated the BIOS, that did not help.

I cannot understand this, maybe I try a 2.6.11 kernel, other people have Gentoo running on this kind of laptop and no such problems.

Someone posted a config-file in a thread about sound problems with this laptop, but I cannot find any hint in it, what is wrong

 with mine.

You can find it here: https://forums.gentoo.org/viewtopic-p-2752474.html

----------

## NeddySeagoon

Jinidog,

The boot order is like this, starting at power on ...

The CPU fetches the first instruction from 0xffffc.

Checks all the things in Power On Self Test.

Sets UP PCI things.

Runs initialisation code for on board things (from BIOS)

Runs initialisation code on PCI cards (if any)

Loads the contents of the MBR

Jumps to the start of the MBR. (The BIOS is done now)

If grub is in the MBR then ...

Grub stage 1 loads stage 1.5 and hands over to it.

Grub stage 1.5 loads stage 2, which shows the splash screen and waits for the timeout or your command.

Grub loads the kernel image and the initrd (if any) and hands over to the kernel.

The kernel decomresses and goes through its set up.

The kernel tries to mount root, using the info grub left for it from the kernel line in grub.conf.

To mount root, the kernel needs to be able to communicate with the HDD at a low level (the chip set driver), at a high level (the SCSI disk driver) and it needs to be able to understand what it reads, (the filesystem driver)

Your unknown block (0,0) means your kernel is missing one of the first two items. The SCSI disk driver or the low level SATA driver. They must both be built in [*] and not modules [M].  Its difficult to read the module when you need the module to read the disk that is storing the module.

----------

## Jinidog

Thanks for the tip.

But I already did all that.

I have the SCSI-disk support compiled in. (no modules, I know the problem of loading modules without being able to read the filesystem  :Smile:  )

Testwise I compiled in all SATA-chip drivers (in another thread someone said that I need the VIA SATA driver; but that did not help either) but that did not help.

I slowly believe in a kernel bug or something like that.

----------

## NeddySeagoon

Jinidog,

I tend more to an improperly installed kernel file. I belive you are doing all the right things in the config and make for your kernel but not getting it installed correctly.

Since you have knoppix, please post the output of 

```
ls -al /boot
```

both with and without the boot partition being mounted. 

Can you post your grub.conf too please.

----------

## Jinidog

I don't think that you will find a mistake here.

I don't use a boot-partition.

 *Quote:*   

> 
> 
> Knoppix / # ls -la /boot/
> 
> insgesamt 38988
> ...

 

This dates are backups of the old kernel. They are produced by a small script I am using to update the kernel.

It looks like that:

```

#! /bin/sh

export CFLAGS_KERNEL="-march=pentium-m -mmmx -msse -msse2 -O3 -pipe -fomit-frame-pointer"

cd /usr/src/linux

make all

make modules_install

cp /boot/bzImage /boot/bzImage.$(date "+%y%m%d-%H%M")

cp /boot/System.map /boot/System.map.$(date "+%y%m%d-%H%M")

cp /usr/src/linux/arch/i386/boot/bzImage /boot

cp /usr/src/linux/System.map /boot

modules-update

```

and the grub.conf:

 *Quote:*   

> 
> 
> #
> 
> # Sample boot menu configuration file
> ...

 

thanks für your help-

----------

## NeddySeagoon

Jinidog,

That all looks good. However, I've loaded your kernel config from your first post into 

```
make xconfig
```

and found a real nasty.

You have turned on 

```
Advanced partition selection
```

and then turned off 

```
PC BIOS (MSDOS partition tables) support 
```

 This means the kernel cannot read your partition table to find the root partition.

```
# Partition Types

#

CONFIG_PARTITION_ADVANCED=y

# CONFIG_ACORN_PARTITION is not set

# CONFIG_OSF_PARTITION is not set

# CONFIG_AMIGA_PARTITION is not set

# CONFIG_ATARI_PARTITION is not set

# CONFIG_MAC_PARTITION is not set

# CONFIG_MSDOS_PARTITION is not set  <------

# CONFIG_LDM_PARTITION is not set

# CONFIG_SGI_PARTITION is not set

# CONFIG_ULTRIX_PARTITION is not set

# CONFIG_SUN_PARTITION is not set

# CONFIG_EFI_PARTITION is not set 
```

Go to jail, go directly to jail, do not pass go, do not collect 200 <insert local currency here>

----------

## Jinidog

Big Thanks.

normally I don't have this "Advanced Partition" stuff in my kernel, but I put it in for a try.

Probably the real problem were somewhere else, I removed it and didn't see it because this was still in.

Thanks.

----------

