# Can not get gentoo-sources 2.6.20 to boot

## nhe

I have a working MythTV system with the gentoo-sources 2.6.19-r5 kernel but when I try to upgrade to 2.6.20-r8 I get a kernel panic with the following message:

No filesystem could mount root, tried: (list of filesystems) 

VFS: Unable to mount root fs on unknown-block(8,3)

I used makeoldconfig with the .config file from my working 2.6.19 kernel to configure the 2.6.20 kernel. 

When I do the same thing to upgrade to the ~amd64 gentoo-sources-2.6.21-r2 the system is booting normal but then I have problems with ivtv not being stable.

So at the moment I am back to 2.6.19

Thanks,

Nick

----------

## OnlyTux

 *Quote:*   

> I used makeoldconfig with the .config file from my working 2.6.19 kernel to configure the 2.6.20 kernel. 

 

It is recommended that you do not use the old config for a major release update (19 to 20), because many settings are different between these two.

I know it can be a bit boring to configure each new kernel every time, but it is the only way you can make sure everything will work ok. Genkernel could do all the work, but I guess this is not ideal for you.

I hope this can be useful.

OnlyTux

----------

## Napalm Llama

This may sound obvious, but... did you compile-in support for the filesystems you're using?  Also, are you missing extended attributes?  I think I had a problem with that a while ago...

----------

## nhe

I even tried to configure a 2.6.20 kernel from scratch (just with the basics in it, i did not dig in to all the video hardware related stuff just for a test) and that did not boot either. If I use the same 2.6.19 configfile for 2.6.21 it works (at least it sees the drives, mounts partitions and boots to a working system).

My root filesystem is EXT3 and it is compliled into the kernel (and it is listed in the tried filesystems on the error message).

Thanks,

Nick

----------

## DaggyStyle

have you setted the right sata/ata support in the kernel?

what HD are you using?

----------

## NeddySeagoon

nhe,

```
VFS: Unable to mount root fs on unknown-block(8,3) 
```

means that /dev/sda3 exists but the kernel cannot read what it finds there. 

Either /dev/sda3 is not your root partition or the kernel is missing your root filesystem driver (or parts of it)

edit ==

OnlyTux,

A major release is like from 2.4 to 2.6, or 2.6 to 2.8

----------

## juhah

Check that you have enabled proper partition type support in your kernel config:

```
File systems --> Partition Types --> Advanced partition selection --> PC BIOS
```

```
MSDOS_PARTITION=y
```

----------

## Napalm Llama

Heh, what are the chances?  I've just encountered this, too!  I've got a couple of ideas for how to fix it though, so I'll see if any of them work and then report back  :Smile: 

----------

## nhe

I am giving up, I configured everything (file systems, sata hardware, partitions...) exactly the same, it works in 2.6.19, it does not work in 2.6.20 and it works in 2.6.21. I will stay with 2.6.19 until something beyond 2.6.20 makes it to the stable tree.

Thanks trying to help,

Nick

----------

## dirtbag

I tried to upgrade to 2.6.20, and i had a kernel panic.. I know this isnt what youre seeing, but I umasked and emerged 2.6.21 and now my system boots fine.. give 2.6.21 a try.

-dirtbag

----------

## mbreith

Yup. Add me to the list of complainers. Here are the errors:

 *Quote:*   

> VFS: Cannot open root device "sda6" 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 are some files - pruned for easy reading.

```
$ grep EXT /usr/src/linux-2.6.20-gentoo-r8/.config 

# CONFIG_KALLSYMS_EXTRA_PASS is not set

CONFIG_WIRELESS_EXT=y

# CONFIG_SERIAL_8250_EXTENDED is not set

CONFIG_EXT2_FS=y

CONFIG_EXT2_FS_XATTR=y

CONFIG_EXT2_FS_POSIX_ACL=y

# CONFIG_EXT2_FS_SECURITY is not set

# CONFIG_EXT2_FS_XIP is not set

CONFIG_EXT3_FS=y

CONFIG_EXT3_FS_XATTR=y

CONFIG_EXT3_FS_POSIX_ACL=y

# CONFIG_EXT3_FS_SECURITY is not set

# CONFIG_EXT4DEV_FS is not set
```

```
cat /etc/fstab

/dev/sda3               /boot           ext2            noauto,noatime  1 2

/dev/sda6               /               ext2            noatime         0 1

/dev/sda5               none            swap            sw              0 0

/dev/sda7               /home           ext2            noatime         0 1

/dev/sda8               /usr            ext2            noatime         0 1

/dev/cdroms/cdrom0      /mnt/cdrom      iso9660         noauto,ro       0 0

#/dev/fd0               /mnt/floppy     auto            noauto          0 0

/dev/sdb1               /mnt/usb        auto            noauto,users,noatime   0 0

/dev/sda2               /mnt/windows    ntfs            noauto,users,noatime 0 0

# NOTE: The next line is critical for boot!

proc                    /proc           proc            defaults        0 0
```

```
# fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes

255 heads, 63 sectors/track, 9729 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1               1         192     1536000   27  Unknown

Partition 1 does not end on cylinder boundary.

/dev/sda2   *         192        3455    26214400    7  HPFS/NTFS

/dev/sda3   *        3455        3479      193643+  83  Linux

/dev/sda4            3480        9729    50203125    5  Extended

/dev/sda5            3480        3589      883543+  82  Linux swap / Solaris

/dev/sda6            3590        5706    17004771   83  Linux

/dev/sda7            5707        6952    10008463+  83  Linux

/dev/sda8            6953        9729    22306221   83  Linux
```

Note - sda3 is the linux boot partition

```
# cat grub/grub.conf

timeout 8

default 0

title=Linux

root (hd0,2)

kernel /boot/vmlinuz root=/dev/sda6

title=Linux backup

root (hd0,2)

kernel /boot/vmlinuz-2.6.19.7 root=/dev/sda6
```

Note - the default panics, but the backup boots just fine. It is what I am writing this post with.

```
# ls -l /boot

lrwxrwxrwx 1 root root      24 May 28 00:28 vmlinuz -> vmlinuz-2.6.20-gentoo-r8

-rw-r--r-- 1 root root 3299195 May 13 00:32 vmlinuz-2.6.19.7

-rw-r--r-- 1 root root 3299239 Apr 24 16:25 vmlinuz-2.6.19.7.old

-rw-r--r-- 1 root root 2019384 May 28 00:28 vmlinuz-2.6.20-gentoo-r8
```

I'll try the 2.6.21 and see what it does. I'll also keep the backup around for a while  :Wink: 

----------

## dirtbag

ooh, Ive noticed that theyve done a lot of shuffeling of config options in 2.6.19->2.6.20|21

for instance, NAT, I had nat working fine in 2.6.19, but when I upgraded with same config, it didnt work. It took me a while to figure out that there were new/different options that had to be selected to get NAT working again.

do NOT trust your old /usr/src/linux/.config that worked in 2.6.19 to work in later versions without going over it with a fine tooth comb and making sure that your filesystems, disk controllers, lvm, etc are all configured.

-db

----------

## NeddySeagoon

mbreith,

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

means your hardware driver is missing from the kernel.

Either SCSI disk support, or the (new location) ATA SATA driver, which make oldconfig will not move from its old location.

It could also be you have turned off MS-DOS Partition Table support but thats really hard to do.

----------

## mbreith

Well, I went in and put in all of the SATA drivers that are in the 2.6.19.7 kernel that I have, but it is still panicking. 

```
src # grep SATA linux-2.6.19.7/.config > ~/workingconfig

src # grep SATA linux-2.6.20-gentoo-r8/.config > ~/nonworkingconfig

src # diff ~/workingconfig ~/nonworkingconfig 

src # 
```

I also forget at the moment how to unmask the 2.6.21 kernel in the portoge tree. If someone wants to tell me how, that would be great. I can look it up myself if not.

----------

## nhe

I placed:

sys-kernel/gentoo-sources ~amd64

in /etc/portage/package.keywords, replace amd64 with your arcitecture.

It gives me a booting system but for my MythTV box I prefer to stick with the stable kernels, it gives me enough problems that way  :Smile: 

Best regards,

Nick

----------

## jsf_x35a

Ah, kernel upgrade problems again. I just had a similar one last night where VFS couldn't mount my root partition. Luckily, I've found a sure to work way of fixing any kind of kernel upgrade problem. genkernel   :Very Happy: 

First boot up into your Gentoo liveCD, mount your partitions and chroot into your hard disk. Then do,

```
genkernel --bootloder=grub all
```

After you compile and make sure your grub.conf is fine you should be able to boot. Once you know that your kernel is working fine, you can do,

```
genkernel --menuconfig all
```

edit your configuration as needed, and recompile.

I know, it's a bit of a slow braindead way of fixing kernel problems but it always works.  :Wink: 

----------

## jsf_x35a

 *mbreith wrote:*   

> Well, I went in and put in all of the SATA drivers that are in the 2.6.19.7 kernel that I have, but it is still panicking. 
> 
> ```
> src # grep SATA linux-2.6.19.7/.config > ~/workingconfig
> 
> ...

 

You simply add the entry,

```
=sys-kernel/gentoo-sources-version
```

in /etc/portage/package.keywords.

----------

## Napalm Llama

I have a less long-winded way of getting around kernel problems.  I just keep all my old kernels in /boot, (I have a reasonably large boot; if yours is small then you could just keep the last known working one in there), and then if the new one fails I can simply edit the GRUB command line to boot the old one (by pressing E on the appropriate entry).  :Smile: 

----------

## mbreith

I have a 'vmlinuz' symlink that points to the current default kernel. I don't have to edit grub that way. I don't even have to update the symlink since 

```
make install
```

 does that for me. 

It is definitely the 2.6.20 gentoo sources that are causing the problem. I installed the 2.6.21 gentoo sources and they boot just fine with the same options.

I hear something about needing to rebuild the toolchain after upgrading kernels. Is this correct?

Now to get sound working...

----------

## NeddySeagoon

mbreith,

You do not need to rebuild anything after a kernel upgrade except your third party kernel modules, like ndiswrapper, nvidia-drivers, ati-drivers, rt73 and so on. All this build against the kernel, so they all 'drop out' when you upgrade.

----------

## mbreith

Ok. Good. I had read somewhere that I would need to rebuild glibc and something else. I guess I will worry about that if something breaks. 

I already had to rebuild the madwifi drivers for my network card, but I was expecting that. I would have to do the same for Alsa if I had it installed already. 

That is what started this whole mess actually. The Alsa compiled into the kernel was giving me problems so I was going to recompile with it as modules. I figured that if I was going to be recompiling anyway, it may as well be with current source.

----------

## bertaboy

You have to install your SATA or PATA drivers.  They got moved around somewhat, so here's what I had to do:

```
Device Drivers > Serial ATA (prod) and Parallel ATA (experimental) drivers > ATA device support

Device Drivers > Serial ATA (prod) and Parallel ATA (experimental) drivers > ATA device support > Intel PIIX/ICH SATA support
```

Make sure you choose the right driver for the second line, however.  That's just the one that works with my chipset.  As always, you can use lspci to find out which one you need to use.

----------

## Napalm Llama

I think my problem was that I didn't enable SCSI Disk Support.  I have a question, though:  For PATA, do you need to enable anything under "ATA/ATAPI/MFM/RLL support" if you turn on all the appropriate options under "Serial ATA (prod) and Parallel ATA (experimental) drivers"?

----------

## NeddySeagoon

Napalm Llama,

The PATA options under ATA are exprimentail. that means they may destroy your data.

However, if you do use them, the old IDE stuff is not required.

----------

## Cyker

Also, IIRC the libata drivers map PATA disks to "sd?" instead of "hd?" so drive assignments might get buggered up.

----------

## Napalm Llama

Ah, that would explain why my hard disk shows up as /dev/sda.  I'm on an unusual system, and the ATA drivers are only available in the new format.

----------

## cyrxi

For those of you having the issue with the 2.6.20 kernel - can you try setting your grub (and you may need to change your fstab too) to hda instead of sda? I think you might be having the same problem I am.  I have tried everything I can think of - recompiled my kernel at least 10 times already with every recommendation people have given me and still no luck (see my other thread: https://forums.gentoo.org/viewtopic-t-563862-highlight-.html).

I accidentally discovered that I could access my hard drive through /dev/hda* when I was following the Gentoo Handbook and made a typo.  "genkernel -all" doesn't even work for me with 2.6.20.  Everything works flawlessly on /dev/sda* off the 2007.0 minimal install CD (which I believe runs 2.6.19).  

Though /dev/hda works and allows me to boot A) it's just not right and B) I get awful disk performance (~1.5 MB/sec buffered disk reads with "hdparm -tT /dev/hda").

I'm off to try 2.6.21, but I'd be really curious to see anyone else's results with 2.6.20.

----------

## cyrxi

Thank you all!  After weeks of troubleshooting I finally have my SATA drive recognized properly and working beautifully.  It was this thread that prompted me to try a different kernel version - it turns out I do know how to config a kernel properly!

Is there someone official to notify of this sort of kernel bug?

----------

## NeddySeagoon

cyrxi,

File a bug at bugs.gentoo.org  However, if its already fixed in a later version thats likely to be your answer.

Do check that your bug will not be a duplicate of an existing bug.

The Gentoo devs will pass your bug to the kernel project if needed.

----------

## mbreith

I haven't tried the 2.6.20 vanilla kernel, so I don't know if the problem would be in the gentoo patch or the incoming kernel source. I agree that filing a bug would mostly be for documentation purposes since it is fixed in later versions.

----------

## Twey

I'm getting exactly this bug in 2.6.22-r8... anyone else?

----------

## solamour

I also get the same error with 2.6.22-r8 version. I think the kernel doesn't know how to deal with the SCSI device. Any suggestions?

```

00:10.0 SCSI storage controller: LSI Logic / Symbios Logic 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev 01)
```

__

sol

----------

