# Kernel 2.6.21 unable to boot [SOLVED]

## stratman4300

Been having this issue since i tried recompiling a 2.6.21 kernel. 

I get this at boot time. 

 *Quote:*   

> VFS: Cannot open root device "/dev/sda2" or unknown block(0,0)
> 
> Please append a correct "root=" boot option
> 
> Kernel Panic- not syncing:VFS: Unable to mount root fs on unknown-block(0,0)

 

here is the output of /etc/fstab

```
 # cat /etc/fstab

/dev/sda1        /boot   ext3    defaults                1 2

/dev/sda2        /       ext3    defaults                0 1

/dev/sdb1        /home   ext3    defaults                0 0

none        /proc     proc    defaults          0 0

none        /dev/shm  tmpfs   defaults          0 0
```

and /boot/grub/menu.lst

```
 # cat /boot/grub/menu.lst

default 1

timeout 10

splashimage=(hd0,0)/grub/splash.xpm.gz

title=Gentoo-2.6.21-040807

root (hd0,0)

kernel /boot/gentoo-kernel-2.6.21-040807 root=/dev/sda2

title=Gentoo-2.6.20-r8

root (hd0,0)

kernel /boot/gentoo-kernel-2.6.20-gentoo-r8 root=/dev/sda2
```

as well as the sata portion of my kernel config. 

```
# grep SATA /usr/src/linux/.config

# CONFIG_BLK_DEV_IDE_SATA is not set

CONFIG_SATA_AHCI=y

# CONFIG_SATA_SVW is not set

# CONFIG_SATA_MV is not set

# CONFIG_SATA_NV is not set

# CONFIG_SATA_QSTOR is not set

# CONFIG_SATA_PROMISE is not set

# CONFIG_SATA_SX4 is not set

# CONFIG_SATA_SIL is not set

# CONFIG_SATA_SIL24 is not set

# CONFIG_SATA_SIS is not set

CONFIG_SATA_ULI=y

# CONFIG_SATA_VIA is not set

# CONFIG_SATA_VITESSE is not set

# CONFIG_SATA_INIC162X is not set

CONFIG_SATA_INTEL_COMBINED=y

CONFIG_SATA_ACPI=y
```

any help is appreciated. 

Thanks!!

----------

## Vlad

You do realize your root device is /dev/sda2 in your fstab...right?

----------

## bunder

does your grub.conf match menu.lst?

----------

## stratman4300

Yes i did see that. I had to pull the error message off a different thread in order to post it, and i had to make the neccessary changes to make it identical to mine...... but i guess i just missed that one.  I've changed it to reflect my error now. 

I looked at Grub.conf and it's completely missing my new entry....   I thought grub read from menu.lst???  

What is the purpose of grub.conf in this case then???

----------

## DaggyStyle

dude, if I'm not mistaken, hd(0,0)=sda1

try this, change in grub.conf root hd(0,0) to hd(0,1)

----------

## stratman4300

Yeah.... tried changing that.....   no difference.

----------

## Vlad

Hate to sound redundant, but are you sure those are the correct kernel drivers (what motherboard do you have)?  Could there be another device in your system seen as /dev/sda1 (a USB Boot stick, or  USB CD-ROM drive perhaps?)  Did you compile ext3 support into your kernel and not as a module?

----------

## stratman4300

This is the output of lspci

```
 # lspci

00:00.0 Host bridge: ALi Corporation M1695 K8 Northbridge [PCI Express and HyperTransport]

00:01.0 PCI bridge: ALi Corporation PCI Express Root Port

00:02.0 PCI bridge: ALi Corporation PCI Express Root Port

00:04.0 Host bridge: ALi Corporation M1689 K8 Northbridge [Super K8 Single Chip]

00:05.0 PCI bridge: ALi Corporation AGP8X Controller

00:06.0 PCI bridge: ALi Corporation M5249 HTT to PCI Bridge

00:07.0 ISA bridge: ALi Corporation M1563 HyperTransport South Bridge (rev 70)

00:07.1 Bridge: ALi Corporation M7101 Power Management Controller [PMU]

00:08.0 Multimedia audio controller: ALi Corporation M5455 PCI AC-Link Controller Audio Device (rev 20)

00:11.0 Ethernet controller: ALi Corporation ULi 1689,1573 integrated ethernet. (rev 40)

00:12.0 IDE interface: ALi Corporation M5229 IDE (rev c7)

00:12.1 IDE interface: ALi Corporation ULi 5289 SATA (rev 10)

00:13.0 USB Controller: ALi Corporation USB 1.1 Controller (rev 03)

00:13.1 USB Controller: ALi Corporation USB 1.1 Controller (rev 03)

00:13.2 USB Controller: ALi Corporation USB 1.1 Controller (rev 03)

00:13.3 USB Controller: ALi Corporation USB 2.0 Controller (rev 01)

00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration

00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map

00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller

00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control

01:00.0 VGA compatible controller: nVidia Corporation G71 [GeForce 7900 GT/GTO] (rev a1)

04:05.0 Ethernet controller: ADMtek NC100 Network Everywhere Fast Ethernet 10/100 (rev 11)
```

pretty sure i have the SATA driver i need included within my config. 

Also, EXT3 is the only file system i use, and i made sure to include it in the kernel.

----------

## xnij2

What does fdisk -l /dev/sda give you?

----------

## gerard27

Hi,

There apparently are people confused about "root" in the grub.conf/menu.lst.

root (hd0,0) is the boot partition.

root=/dev/something is the partition on which the rest of the system resides

and has nothing to do (as far as grub is concerned) with booting.

Notice that grub uses (hdx,x) even for sata disks.

Menu.lst is a symlink to grub.conf.

Gerard.

----------

## xnij2

Good to point that out...

But seeing as the kernel is panicking grub isn't the problem (except that maybe the kernel 'root=' statement is wrong). 

I was thinking more along the lines of what Vlad said. Maybe the device names are getting assigned in a different order. Never happened to me tho.

Stratman4300, why don't you give /dev/sdb2 a go?

----------

## stratman4300

feel kinda silly now.....   

Didn't have scsi Hard Disk support compiled in....    :Razz: 

oh well....   got it working...  thanks for all the help anyway everyone...!!

----------

