# [Solved] Problem with Pappy's kernel seed

## tempuser

Recently I decided to reconfigure my kernel from one of Pappy's kernel seeds, following his guide. Previously I had been using a kernel adapted from the basic one provided by Gentoo when emerging the genkernel source. The new kernel hangs on the line '[1.228065] Switching to clocksource tsc' before eventually continuing but becoming permanently stuck on the line '[60.903790] [drm] Loading R300 Microcode'. I would be grateful if someone could help me fix my misconfigured kernel, as this is a topic I know next to nothing about.

Information:

lspci -n:

```
00:00.0 0600: 1039:0661 (rev 11)

00:01.0 0604: 1039:0003

00:02.0 0601: 1039:0964 (rev 36)

00:02.5 0101: 1039:5513 (rev 01)

00:02.7 0401: 1039:7012 (rev a0)

00:03.0 0c03: 1039:7001 (rev 0f)

00:03.1 0c03: 1039:7001 (rev 0f)

00:03.2 0c03: 1039:7001 (rev 0f)

00:03.3 0c03: 1039:7002

00:04.0 0200: 1039:0900 (rev 91)

00:05.0 0101: 1039:0180 (rev 01)

00:0b.0 0200: 168c:0013 (rev 01)

01:00.0 0300: 1002:4153

01:00.1 0380: 1002:4173
```

cat /proc/cpuinfo

```
processor       : 0

vendor_id       : GenuineIntel

cpu family      : 15

model           : 4

model name      : Intel(R) Celeron(R) CPU 3.20GHz

stepping        : 9

cpu MHz         : 3207.185

cache size      : 256 KB

fdiv_bug        : no

hlt_bug         : no

f00f_bug        : no

coma_bug        : no

fpu             : yes

fpu_exception   : yes

cpuid level     : 5

wp              : yes

flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm constant_tsc up pebs bts pni dtes64 monitor ds_cpl tm2 cid cx16 xtpr lahf_lm

bogomips        : 6414.37

clflush size    : 64

cache_alignment : 128

address sizes   : 36 bits physical, 48 bits virtual

power management:
```

Last good config:

http://ompldr.org/vYTFwYg

Problem config:

http://ompldr.org/vYTFwZA

I also need support for these filesystems: ext2-4, fat, ntfs, proc, swap and tmpfs.Last edited by tempuser on Tue Aug 30, 2011 6:17 pm; edited 1 time in total

----------

## NeddySeagoon

tempuser,

Welcome to Gentoo.

You appear to have told the kernel to switch to a framebuffer console but you have not actually made a framebuffer console driver.

This means the kernel will switch away from the old VGA driver to a plain black screen.  Other than getting black text on a black background, everything should still work.

Either turn off framebuffer console support or choose a framebuffer driver. The vesa framebuffer driver is a good choice.

Turn off CONFIG_EXT3_FS=y as you have 

```
CONFIG_EXT4_FS=y

CONFIG_EXT4_USE_FOR_EXT23=y
```

```
# CONFIG_NTFS_FS is not set
```

is good.  emerge ntfs-3g for ntfs support. The filesystem type will be ntfs3g

Make all your changes using menuconfig

----------

## tempuser

NeddySeagoon thank you for replying.

I have taken your advice and now my kernel hangs on '[2.195506] [<c14a7d367>] ? kernel_thread helper + 0x6/0xd'.

 *NeddySeagoon wrote:*   

> You appear to have told the kernel to switch to a framebuffer console but you have not actually made a framebuffer console driver.
> 
> This means the kernel will switch away from the old VGA driver to a plain black screen.  Other than getting black text on a black background, everything should still work.
> 
> Either turn off framebuffer console support or choose a framebuffer driver. The vesa framebuffer driver is a good choice.

 

I have tried turning on the radeon framebuffer (I have an old radeon card), however other than changing the appearance of the console it made no difference, as noted above the kernel still hung, but on a different line. I was also unsucessful in simply disabling framebuffer console support, menuconfig did not want to let me. However my previous configuration was intentional, I was replicating what was suggested here - http://www.gentoo.org/doc/en/xorg-config.xml, specifically:

 *The X Server Configuration HOWTO wrote:*   

> Device Drivers --->
> 
>   Graphics support --->
> 
>     Support for frame buffer devices --->
> ...

 

Also you may have noted this is how my previous working kernel was configured, which seemed to cause no problems.

 *NeddySeagoon wrote:*   

> 
> 
> ```
> # CONFIG_NTFS_FS is not set
> ```
> ...

 

Yes, I already have ntfs-3g installed and working.

My current config:

http://ompldr.org/vYTI5cw

----------

## tempuser

Anyone?

----------

## NeddySeagoon

tempuser,

```
'[2.195506] [<c14a7d367>] ? kernel_thread helper + 0x6/0xd'. 
```

Is either a piece of a kernel panic or a kernel oops. Is there any text thats starts Kernel Panic ... or Oops ...

Both messages mean something nasty happened, a panic means the kernel can't continue, an Oops may allow processing to continue.

Have you ever changed the kernel .config file with a text editor?

Using the radeonfb driver in the kernel will prevent the radeon Xorg driver from finding your hardware, as the kernel driver will already have taken control.

What do you have in /proc/cpuinfo and /proc/interrupts ?

----------

## tempuser

Thank you for replying again NeddySeagoon.

 *NeddySeagoon wrote:*   

> Have you ever changed the kernel .config file with a text editor?

 

No.

 *NeddySeagoon wrote:*   

> Using the radeonfb driver in the kernel will prevent the radeon Xorg driver from finding your hardware, as the kernel driver will already have taken control.

 

Noted and changed to vesa.

 *NeddySeagoon wrote:*   

> tempuser,
> 
> ```
> '[2.195506] [<c14a7d367>] ? kernel_thread helper + 0x6/0xd'. 
> ```
> ...

 

Yes, after making the above change I can see that there is a message: '[123.402424] Kernel panic - not syncing: VFS: unable to mount root fs on unknown-block (8, :Cool: '. <- Note smiley unintentional...

 *NeddySeagoon wrote:*   

> What do you have in /proc/cpuinfo and /proc/interrupts ?

 

/proc/interrupts:

           CPU0       

  0:        130   IO-APIC-edge      timer

  1:          2   IO-APIC-edge      i8042

  8:          2   IO-APIC-edge      rtc0

  9:          0   IO-APIC-fasteoi   acpi

 12:          4   IO-APIC-edge      i8042

 14:          0   IO-APIC-edge      pata_sis

 15:         44   IO-APIC-edge      pata_sis

 16:       1730   IO-APIC-fasteoi   radeon

 17:       4434   IO-APIC-fasteoi   sata_sis

 18:          0   IO-APIC-fasteoi   SiS SI7012

 19:        710   IO-APIC-fasteoi   eth0

 20:        897   IO-APIC-fasteoi   ohci_hcd:usb2

 21:          0   IO-APIC-fasteoi   ohci_hcd:usb3

 22:       8692   IO-APIC-fasteoi   ohci_hcd:usb4

 23:          4   IO-APIC-fasteoi   ehci_hcd:usb1

NMI:          0   Non-maskable interrupts

LOC:     111712   Local timer interrupts

SPU:          0   Spurious interrupts

PMI:          0   Performance monitoring interrupts

IWI:          0   IRQ work interrupts

RES:          0   Rescheduling interrupts

CAL:          0   Function call interrupts

TLB:          0   TLB shootdowns

TRM:          0   Thermal event interrupts

THR:          0   Threshold APIC interrupts

MCE:          0   Machine check exceptions

MCP:          2   Machine check polls

ERR:          0

MIS:          0

/proc/cpuinfo I have already posted.

----------

## NeddySeagoon

tempuser,

```
VFS: unable to mount root fs on unknown-block (8 ... 
```

Now we are getting somewhere.

That message tells the kernel major and minor device numbers that its trying to mount as root. You can looks them up in /usr/src/linux/Documentation/devices.txt as its a disc, we know its a block device.

```
  8 block       SCSI disk devices (0-15)

                  0 = /dev/sda          First SCSI disk whole disk

                 16 = /dev/sdb          Second SCSI disk whole disk

                 32 = /dev/sdc          Third SCSI disk whole disk

                    ...

                240 = /dev/sdp          Sixteenth SCSI disk whole disk
```

The missing minor number makes it difficult for me but as you get a non zero major device number, the kernel can get to your HDD but not read what it finds there. There are two typical causes. Your root=/dev/sd.. statement is not correct, or your root filesystem driver is not built into the kernel.

----------

## tempuser

 *NeddySeagoon wrote:*   

> Your root=/dev/sd.. statement is not correct, or your root filesystem driver is not built into the kernel.

 

My / directory is ext4 and my /boot ext2. As to my root=/dev/sd.. statement I have only defined it in my lilo.conf as far as I know, for which it is correct and works perfectly well for other kernel configs.

----------

## whiteghost

afaik pappy's seeds do not come with ext4 enabled.

did you eneable it?

----------

## NeddySeagoon

tempuser,

What are the sizes of your good and bad kernels ?

Its a long time since I used lilo and I have a feeling it has a maximum file size that it can load.

----------

## tempuser

 *NeddySeagoon wrote:*   

> Its a long time since I used lilo and I have a feeling it has a maximum file size that it can load.

 

Good - 4.6M

Bad - 3.5M

I've never heard of such a limit, and although it may exist I can assure you i've used much bigger kernels than these in the past...

----------

## NeddySeagoon

tempuser,

```
Good - 4.6M

Bad - 3.5M 
```

Well that rules that one out as bad < good

----------

## tempuser

I think the fact my good config still compiles and works well shows it must be something I have presumably left out. I just don't know what...

----------

## NeddySeagoon

tempuser,

See if diff <path/to/old/config> </path/to/new/config> helps.

Post both configs and I'll have a look.

Did you derive the new config from the old one, using make oldconfig ?

----------

## tempuser

Thank you again for replying,

 *NeddySeagoon wrote:*   

> tempuser,
> 
> See if diff <path/to/old/config> </path/to/new/config> helps.
> 
> Post both configs and I'll have a look.
> ...

 

 *tempuser wrote:*   

> Recently I decided to reconfigure my kernel from one of Pappy's kernel seeds, following his guide. Previously I had been using a kernel adapted from the basic one provided by Gentoo when emerging the genkernel source.*snip*
> 
> Last good config:
> 
> http://ompldr.org/vYTFwYg

 

 *tempuser wrote:*   

> My current config:
> 
> http://ompldr.org/vYTI5cw

 

Since they are deliberately not derived from one another, I'm not sure of the use of using diff.

----------

## NeddySeagoon

tempuser,

From diff Good Bad

```
227c207

< CONFIG_LBDAF=y

---

> # CONFIG_LBDAF is not set

```

 CONFIG_LBDAF is needed for read/write support on ext4. The kernel help says  

```
The ext4 filesystem requires that this feature be enabled in

order to support filesystems that have the huge_file feature

enabled. Otherwise, it will refuse to mount in the read-write

mode any filesystems that use the huge_file feature, which is

enabled by default by mke2fs.ext4.
```

All of the CONFIG_INLINE... 

```
247c227

< CONFIG_INLINE_SPIN_UNLOCK=y

---

> # CONFIG_INLINE_SPIN_UNLOCK is not set

249c229

< CONFIG_INLINE_SPIN_UNLOCK_IRQ=y

---

> # CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set

256c236

< CONFIG_INLINE_READ_UNLOCK=y

---

> # CONFIG_INLINE_READ_UNLOCK is not set

258c238

< CONFIG_INLINE_READ_UNLOCK_IRQ=y

---

> # CONFIG_INLINE_READ_UNLOCK_IRQ is not set

265c245

< CONFIG_INLINE_WRITE_UNLOCK=y

---

> # CONFIG_INLINE_WRITE_UNLOCK is not set

267c247

< CONFIG_INLINE_WRITE_UNLOCK_IRQ=y

---

> # CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set
```

are sppedups.  They tell gcc to inline this code instead of making a function call.  Its faster as you save the call and return but makes your kernel bigger.

You have a P4 CPU, so should set the Intel options on here. MCE means Machine Check Exception.  You will get a warning if your CPU starts making detectable errors. The AMD options are no use to you.

```
357,358c331,332

< CONFIG_X86_MCE_INTEL=y

< CONFIG_X86_MCE_AMD=y

---

> # CONFIG_X86_MCE_INTEL is not set

> # CONFIG_X86_MCE_AMD is not set
```

```
1468c1187

< CONFIG_VT_HW_CONSOLE_BINDING=y

---

> # CONFIG_VT_HW_CONSOLE_BINDING is not set
```

may not be needed but it ensures your console is output to a Virtual Terminal

```
> CONFIG_LEGACY_PTYS=y
```

 is not needed.

```
> CONFIG_FB_RADEON=y
```

should be off or the Radeon Xorg driver won't work. Choose the vesafb driver if you must have a framebuffer console.

```
> CONFIG_IO_DELAY_NONE=y
```

can be a bad thing. It allows the kernel to write to I/O ports on hardware faster then the hardware can accept. Use the default.

There are two thinks there that can stop booting, CONFIG_LBDAF and CONFIG_IO_DELAY_NONE.  The others are just nice to have, that I noticed reading diff.

If CONFIG_LBDAF is off in Pappys x86 seeds, you should point out that its needed for read/write operations on a default ext4 filesystem.

----------

## tempuser

O.K. i've made the above changes and the kernel will actually boot. However unfortunately only after very long hangs at the same two messages:

[    1.234082] Switching to clocksource tsc

[   60.904377] [drm] Loading R300 Microcode

Fortunately I can now provide my /var/log/dmesg:

http://ompldr.org/vYTN6aQ

along with my current .config:

http://ompldr.org/vYTN6aA

----------

## DirtyHairy

The radeon driver cannot locate the firmware for your card. You'll either have to install x11-drivers/radeon-ucode or build the firmware into the kernel.

----------

## tempuser

 *DirtyHairy wrote:*   

> The radeon driver cannot locate the firmware for your card. You'll either have to install x11-drivers/radeon-ucode or build the firmware into the kernel.

 

My radeon card is too old to require radeon-ucode, however enabling 'Device Drivers  ---> Generic Driver Options  ---> Include in-kernel firmware blobs in kernel binary' solved it, thank you. I also thank everyone else who responded to my posts, I now consider this problem solved.

----------

## DirtyHairy

Uups, you're correct  :Wink:  In this case, "make firmware_install" would've the trick.

----------

