# [Solved] Kernel 2.6.27 (gentoo-sources), cannot boot

## h017ah

I'm having much trouble getting the gentoo-sources-2.6.27 to work on my Dell M1330, and I can't figure out what I'm doing wrong. This is a fresh install, I configured the kernel from scratch, but I must have done something horrible wrong because it crashes right after grub has finished loading the kernel.

My emerge --info: (I have to chroot into this system, of course)

```
Portage 2.2_rc12 (default/linux/x86/2008.0, gcc-4.3.2, glibc-2.8_p20080602-r0, 2.6.24-gentoo-r5 i686)

=================================================================

System uname: Linux-2.6.24-gentoo-r5-i686-Intel-R-_Core-TM-2_Duo_CPU_T7500_@_2.20GHz-with-glibc2.0

Timestamp of tree: Wed, 15 Oct 2008 18:15:01 +0000

app-shells/bash:     3.2_p39

dev-lang/python:     2.5.2-r8

sys-apps/baselayout: 2.0.0

sys-apps/openrc:     0.3.0-r1

sys-apps/sandbox:    1.2.18.1-r3

sys-devel/autoconf:  2.63

sys-devel/automake:  1.10.1-r1

sys-devel/binutils:  2.18-r3

sys-devel/gcc-config: 1.4.0-r4

sys-devel/libtool:   2.2.6a

virtual/os-headers:  2.6.26

ACCEPT_KEYWORDS="x86 ~x86"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="http://mirror.gentoo.no/"

LANG="en_US.utf8"

LDFLAGS="-Wl,-O1"

LINGUAS="en nb"

MAKEOPTS="-j4"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"

USE="aac aalib acl acpi alsa berkdb bzip2 cjk cli cracklib crypt cups dbus dri flac fortran gdbm glibc-omitfp gpm iconv isdnlog jbig jpeg jpeg2k kdeenablefinal kdehiddenvisibility midi mmx mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pcre perl png ppds pppd python readline reflection samba session spl sse sse2 sse3 ssl startup-notification svg sysfs tcpd tiff truetype unicode vorbis wavpack x86 xcomposite xorg xscreensaver xv xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en nb" USERLAND="GNU" VIDEO_CARDS="nvidia"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
```

My .config-file: http://pastebin.com/m23c8f540

A video filmed with my camera phone showing the boot-up: http://rapidshare.com/files/154646637/boottrouble.mp4.html

I think it is readable, especially if you watch it frame by frame. I can retry to film this if necessary...

cat /proc/cpuinfo:

```
processor       : 0

vendor_id       : GenuineIntel

cpu family      : 6

model           : 15

model name      : Intel(R) Core(TM)2 Duo CPU     T7500  @ 2.20GHz

stepping        : 11

cpu MHz         : 2201.000

cache size      : 4096 KB

physical id     : 0

siblings        : 2

core id         : 0

cpu cores       : 2

fdiv_bug        : no

hlt_bug         : no

f00f_bug        : no

coma_bug        : no

fpu             : yes

fpu_exception   : yes

cpuid level     : 10

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 nx lm constant_tsc arch_perfmon pebs bts pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm ida

bogomips        : 4393.03

clflush size    : 64

processor       : 1

vendor_id       : GenuineIntel

cpu family      : 6

model           : 15

model name      : Intel(R) Core(TM)2 Duo CPU     T7500  @ 2.20GHz

stepping        : 11

cpu MHz         : 2201.000

cache size      : 4096 KB

physical id     : 0

siblings        : 2

core id         : 1

cpu cores       : 2

fdiv_bug        : no

hlt_bug         : no

f00f_bug        : no

coma_bug        : no

fpu             : yes

fpu_exception   : yes

cpuid level     : 10

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 nx lm constant_tsc arch_perfmon pebs bts pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm ida

bogomips        : 4389.05

clflush size    : 64

```

Any help would be greatly appreciated! Kinda banging my head into a wall here, I'm sure I've overlooked something extremely basic...

The error message repeating itself at the end is

```
request_module: runaway loop modprobe binfmt-464c
```

Last edited by h017ah on Sat Oct 18, 2008 6:10 pm; edited 1 time in total

----------

## z3rgl1ng_z

After a google i found some info.

The problem may come from LVM and partition labels.

Can you post your fstab, lilo/grub, and partition layouts ?

----------

## h017ah

I can, but not before tomorrow morning :) (GMT+1)

----------

## heyuxiang

have you built PATA/SATA/SCSI drivers into kernel ?

if not, kernel won't find your HDD and your boot partition (though grub can find it )

----------

## pappy_mcfae

Post the results of lscpi -n, and your /etc/fstab so I can check your .confg.

Blessed be!

Pappy

----------

## h017ah

 *heyuxiang wrote:*   

> have you built PATA/SATA/SCSI drivers into kernel ?
> 
> if not, kernel won't find your HDD and your boot partition (though grub can find it )

 Yes, I have, the halt appears so early that that cannot be the problem...

 *z3rgl1ng_z wrote:*   

> After a google i found some info. 
> 
> The problem may come from LVM and partition labels. 
> 
> Can you post your fstab, lilo/grub, and partition layouts ?

 I'm booting from an USB stick (you can see on the video that you can choose LiveUSB as kernel). The grub.conf looks like this:

```
default 0

timeout 3

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

title=Gentoo Linux 2.6.27

root (hd0,1)

kernel /boot/kernel-2.6.27-gentoo root=/dev/mapper/root rdinit=/linuxrc ro

initrd /boot/initramfs-gentoo

title=Gentoo Linux 2.6.27 (rescue)

root (hd0,1)

kernel /boot/kernel-2.6.27-gentoo root=/dev/sdb2 rdinit=/bin/ash ro

initrd /boot/initramfs-gentoo

title=Gentoo LiveUSB 2008.0-r1 i686

root (hd0,0)

kernel /gentoo root=/dev/ram0 init=/linuxrc nokeymap looptype=squashfs loop=/image.squashfs cdroot slowusb vga=791 nodmraid noevms nofirewire nolvm nomdadm nonfs nopcmcia dosshd dogpm nox

initrd /gentoo.igz

title=Gentoo LiveUSB 2008.0-r1 i686 (nofb)

root (hd0,0)

kernel /gentoo root=/dev/ram0 init=/linuxrc nokeymap looptype=squashfs loop=/image.squashfs cdroot slowusb nodmraid noevms nofirewire nolvm nomdadm nonfs nopcmcia dosshd dogpm nox

initrd /gentoo.igz

title=Memtest86+

root (hd0,1)

kernel /memtest
```

My device.map:

```
(hd0)   /dev/sdb

(hd1)   /dev/sda

```

So /dev/sda is my regular harddrive, and /dev/sdb is the USB stick.

I'm booting line one, and the argument root=/dev/mapper/root is because of I've got an initrd-image which decrypts /dev/sda6 to /dev/mapper/root (the argument doesn't matter anyway thanks to the initrd).

fdisk /dev/sda, p:

```
/dev/sda1   *           1       22947   184321746    7  HPFS/NTFS

/dev/sda2           22948       30401    59874255    5  Extended

/dev/sda5           22948       23135     1510078+  82  Linux swap / Solaris

/dev/sda6           23136       30401    58364113+  83  Linux
```

The idea is that when the USB stick is inserted, Linux is booted, but if no USB stick is present, Windows is booting. This works well too, it just happens that the kernel I tried to compile just fails horribly.

My /etc/fstab looks like this:

```
/dev/sdb2               /boot           ext2            noauto,noatime,nodiratime       1 2

/dev/mapper/root        /               xfs             noatime,nodiratime,logbsize=256k,logbufs=8      0 1

/dev/mapper/swap        none            swap            sw              0 0

/dev/cdrom              /mnt/cdrom      auto            noauto,ro       0 0
```

The thing is, the kernel error happens the instant it tries to boot it after grub has loaded it, so hard drive layout shouldn't really have anything to do with this error (as far as I know, of course), neither should the fact that I tell the kernel to load an initrd-image.. The initrd-image is not built into the kernel.

My lspci -n:

```
00:00.0 0600: 8086:2a00 (rev 0c)

00:01.0 0604: 8086:2a01 (rev 0c)

00:1a.0 0c03: 8086:2834 (rev 02)

00:1a.1 0c03: 8086:2835 (rev 02)

00:1a.7 0c03: 8086:283a (rev 02)

00:1b.0 0403: 8086:284b (rev 02)

00:1c.0 0604: 8086:283f (rev 02)

00:1c.1 0604: 8086:2841 (rev 02)

00:1c.3 0604: 8086:2845 (rev 02)

00:1c.5 0604: 8086:2849 (rev 02)

00:1d.0 0c03: 8086:2830 (rev 02)

00:1d.1 0c03: 8086:2831 (rev 02)

00:1d.2 0c03: 8086:2832 (rev 02)

00:1d.7 0c03: 8086:2836 (rev 02)

00:1e.0 0604: 8086:2448 (rev f2)

00:1f.0 0601: 8086:2815 (rev 02)

00:1f.1 0101: 8086:2850 (rev 02)

00:1f.2 0106: 8086:2829 (rev 02)

00:1f.3 0c05: 8086:283e (rev 02)

01:00.0 0300: 10de:0427 (rev a1)

03:01.0 0c00: 1180:0832 (rev 05)

03:01.1 0805: 1180:0822 (rev 22)

03:01.2 0880: 1180:0843 (rev 12)

03:01.3 0880: 1180:0592 (rev 12)

03:01.4 0880: 1180:0852 (rev 12)

09:00.0 0200: 14e4:1713 (rev 02)

0c:00.0 0280: 8086:4229 (rev 61)
```

----------

## z3rgl1ng_z

Don't get me wrong here, but i did not found a stick to suport a linux FS.

All sticks that i tried to format in any linux FS corupted my data or failed.

Contact the vendor and ask them what FS dose your stick suport since the most of them use FAT or VFAT, extFAT/FAT64, or new NTFS but only a few suport this FS.

And from what i see your /dev/sdb2 is formated in ext2.

----------

## h017ah

 *z3rgl1ng_z wrote:*   

> Don't get me wrong here, but i did not found a stick to suport a linux FS.
> 
> All sticks that i tried to format in any linux FS corupted my data or failed.
> 
> Contact the vendor and ask them what FS dose your stick suport since the most of them use FAT or VFAT, extFAT/FAT64, or new NTFS but only a few suport this FS.
> ...

 ? What are you talking about? I have no issue with booting from USB, this setup works on... every machine supporting USB emulation. I'm booting of USB from several computers here, including this one which I have trouble with...

The problem is not that grub/booting will not work, the problem is that the kernel crashes after ~5ms of booting.

Tried the same .config with vanilla-sources, same error.

----------

## z3rgl1ng_z

Did you had a reason to complicate things with mapping ?

Untill now i never had to use them since all my systems boot without problems, but never used a usb device for boot partition tho.

This dude had the same issue:

http://bbs.archlinux.org/viewtopic.php?id=33449

Solved by installing grub in mbr.

Others say it is related to labels, others that you compiled a module for the wrong arch.

Do you have similar setups working ? If yes can you post the mapping done on hdds, fstab, grub conf ?

Anyway strange setup  :Smile: 

----------

## h017ah

Hm, this was a nice tip actually, will test it as soon as I come home from work :) Because when you mention it, it might happen that the files in /boot/grub/ are from an old grub installation, but the grub-mbr is the most recent one found in portage!

We will know in a couple of hours time :) Thanks for the tip :)

As for the complicated setup, I have done an initrd-solution based on http://gentoo-wiki.com/SECURITY_System_Encryption_DM-Crypt_with_LUKS, a fully encrypted solution, and that needs to boot from a USB stick (dont want the initrd to reside on the hdd) so that the initrd-image can decrypt and mount the root filesystem, and the switch_root to continue booting...

The USB stick then becomes the key for the system :) Very neat for protecting the files on your laptop, in case of stealing or other things...

----------

## z3rgl1ng_z

Interesting solution...

Anyway, edit your post if it is resolved  :Smile: 

----------

## h017ah

No dice..

I removed /boot/grub-directory, reinstalled grub, grub-install --no-floppy /dev/sdb with correct device.map... same error, does not boot.

What does it mean when every line in the kernel log starts with "[     2.837452]" (just random example), the numbers are seconds, it seems... never seen that before. You can see it on the video, the left column...

Edit: nevermind, I ... think I found something out. *brb*

----------

## z3rgl1ng_z

You have that messages apear due to this:

```
Kernel hacking  --->

  [*] Show timing information on printks

```

The help for this module:

```
   Selecting this option causes timing information to be                                                                                                                    

   included in printk output.  This allows you to measure                                                                                                                   

   the interval between kernel operations, including bootup                                                                                                                 

   operations.  This is useful for identifying long delays                                                                                                                  

   in kernel startup. 
```

Bad luck with this boot setup  :Smile: 

----------

## h017ah

Ok, I think I can set this as SOLVED... soon, at least.

The problem is not the kernel, it boots, I have just done something weird with my initrd-image...

The kernel booted just fine when I removed the initrd-line. So... I'll set this to solved when/if I find out what I'm doing wrong with my initramfs.

Thanks for help :)

----------

## pappy_mcfae

Critiques: Actually, there are numerous problems with your kernel. Frankly, I can't believe that your system runs. Considering all the stuff you had enabled that slows the system down, you should consider yourself fortunate to have a system that doesn't take ten minutes to boot. Also, you shouldn't enable intel DRI when you don't have an intel video chip in your system. Also, you can use native nvidia frame buffer support instead of user space vesa.

I have cleaned up your kernel .config, and given in the Pappy touch. I'm thinking that you'll have a lot better results and operation with the kernel I've set up for you. If you're interested click here. It's only there for a month.

Blessed be!

Pappy

----------

## h017ah

Hehe, the Pappy touch :D

Thanks for your valuable time! About nvidiafb, I have experienced lots of trouble getting it to play well with the proprietary nvidia-drivers for X, and userspace vesa has always worked extremely well. I know it is a bit slower than native framebuffer drivers, but when you get something that always works, no matter how much Ctrl+Alt+F1, F7 you press, that's worth a lot. 1280x800 works nicely too :)

Will say to my defense that this was a first configure, and not a specially tweaked one :) Nice to get some help to weed out the uneccessary things, though! Just so frustrating to see it crash, and then having no clue as for where to look for errors...

Still struggling a bit though, I can't find out what I'm doing wrong with my initrd, but I think I'll return later with a detailed error description if I don't get anywhere by tonight.

----------

## h017ah

Well, it worked nicely when I just used the CONFIG_INITRAMFS_SOURCE-option to build the initrd image for me, so I think I can set this as solved :)

Thanks for all help! :)

----------

## pappy_mcfae

You are most welcome. Happy Gentooing!

Blessed be!

Pappy

----------

