# Unable to open initial console [SOLVED- PEBKAC]

## Nicias

I am installing gentoo on a new Dell D620. 

Unfortunately I need this machine for work, so I installed kubuntu on it so I could use it until gentoo is up and running.

I have four partitions 

first one is /boot, then swap, then kubuntu the gentoo.

I've installed gentoo before. I followed the handbook, but when it came time to configure the bootloader I was somewhat confused by all the crap that kubuntu put in my /boot.

I appended 

```
title   gentoo testing

root (hd0,0)

kernel /boot/kernel-gentoo-susp-test-1 root=/dev/sda4
```

To my /boot/grub/menu.lst

This produces two issues first it doesn't like the /boot. It will only make any progress if I change that to just /kernel....

One that is done, I get a kernel panic. 

Something along the lines of "Compressor: Arg! Nothing follows me in the pipeline!"

then it complains about not being able to find an "init"

what additional information could I provide to help?Last edited by Nicias on Fri Aug 24, 2007 5:59 pm; edited 2 times in total

----------

## IQgryn

Post the output of these commands (run as root):

```
fdisk -l

ls -l /boot

cat /boot/grub/device.map

cat /boot/grub/menu.lst

grep -i sata <kernel config file>
```

----------

## Nicias

These are run as root in the kubuntu environment from which I am installing (I can't lose the machine while I'm working on it)

```
robbins@ur:~$ sudo fdisk -l

Password:

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           9       72261   83  Linux

/dev/sda2              10         134     1004062+  82  Linux swap / Solaris

/dev/sda3             135        4390    34186320   83  Linux

/dev/sda4            4391        9729    42885517+  83  Linux

```

```
robbins@ur:~$ sudo ls -l /boot

total 39469

-rw-r--r-- 1 root root  414210 2007-04-15 04:07 abi-2.6.20-15-generic

-rw-r--r-- 1 root root  414274 2007-06-07 16:58 abi-2.6.20-16-generic

lrwxrwxrwx 1 root root       1 2007-08-19 13:33 boot -> .

-rw-r--r-- 1 root root   83234 2007-04-15 01:33 config-2.6.20-15-generic

-rw-r--r-- 1 root root   83217 2007-06-07 14:16 config-2.6.20-16-generic

-rw-r--r-- 1 root root   79569 2007-08-19 12:07 config-gentoo-susp-test-1

-rw-r--r-- 1 root root   79943 2007-08-19 14:43 config-gentoo-susp-test-2

-rw-r--r-- 1 root root   35321 2007-08-19 20:48 config-gentoo-susp-test-3

drwxr-xr-x 2 root root    1024 2007-08-14 10:45 grub

-rw-r--r-- 1 root root 2612916 2007-08-19 15:53 initramfs-Test3-x86-2.6.21-suspend2-r7

-rw-r--r-- 1 root root 7176308 2007-08-14 04:01 initrd.img-2.6.20-15-generic

-rw-r--r-- 1 root root 6911184 2007-04-17 01:25 initrd.img-2.6.20-15-generic.bak

-rw-r--r-- 1 root root 6946384 2007-08-14 10:45 initrd.img-2.6.20-16-generic

-rw-r--r-- 1 root root 2196096 2007-08-19 12:07 kernel-gentoo-susp-test-1

-rw-r--r-- 1 root root 2194336 2007-08-19 14:43 kernel-gentoo-susp-test-2

-rw-r--r-- 1 root root 2592528 2007-08-19 20:47 kernel-gentoo-susp-test-3

-rw-r--r-- 1 root root 2159248 2007-08-19 15:44 kernel-Test3-x86-2.6.21-suspend2-r7

drwxr-xr-x 2 root root   12288 2007-08-14 03:50 lost+found

-rw-r--r-- 1 root root   94600 2006-10-20 07:44 memtest86+.bin

-rw-r--r-- 1 root root  806942 2007-04-15 04:08 System.map-2.6.20-15-generic

-rw-r--r-- 1 root root  806992 2007-06-07 17:00 System.map-2.6.20-16-generic

-rw-r--r-- 1 root root 1027956 2007-08-19 15:44 System.map-Test3-x86-2.6.21-suspend2-r7

-rw-r--r-- 1 root root 1745100 2007-04-15 04:07 vmlinuz-2.6.20-15-generic

-rw-r--r-- 1 root root 1746636 2007-06-07 16:58 vmlinuz-2.6.20-16-generic
```

```
robbins@ur:~$ cat /boot/grub/device.map

(hd0)   /dev/sda

```

This one is a bit big, blame it on Kubuntu

```
robbins@ur:~$ cat /boot/grub/menu.lst

# menu.lst - See: grub(8), info grub, update-grub(8)

#            grub-install(8), grub-floppy(8),

#            grub-md5-crypt, /usr/share/doc/grub

#            and /usr/share/doc/grub-doc/.

## default num

# Set the default entry to the entry number NUM. Numbering starts from 0, and

# the entry number 0 is the default if the command is not used.

#

# You can specify 'saved' instead of a number. In this case, the default entry

# is the entry saved with the command 'savedefault'.

# WARNING: If you are using dmraid do not change this entry to 'saved' or your

# array will desync and will not let you boot your system.

default         0

## timeout sec

# Set a timeout, in SEC seconds, before automatically booting the default entry

# (normally the first entry defined).

timeout         3

## hiddenmenu

# Hides the menu by default (press ESC to see the menu)

hiddenmenu

# Pretty colours

#color cyan/blue white/blue

## password ['--md5'] passwd

# If used in the first section of a menu file, disable all interactive editing

# control (menu entry editor and command-line)  and entries protected by the

# command 'lock'

# e.g. password topsecret

#      password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/

# password topsecret

#

# examples

#

# title         Windows 95/98/NT/2000

# root          (hd0,0)

# makeactive

# chainloader   +1

#

# title         Linux

# root          (hd0,1)

# kernel        /vmlinuz root=/dev/hda2 ro

#

#

# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST

## lines between the AUTOMAGIC KERNELS LIST markers will be modified

## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##

## default kernel options

## default kernel options for automagic boot options

## If you want special options for specific kernels use kopt_x_y_z

## where x.y.z is kernel version. Minor versions can be omitted.

## e.g. kopt=root=/dev/hda1 ro

##      kopt_2_6_8=root=/dev/hdc1 ro

##      kopt_2_6_8_2_686=root=/dev/hdc2 ro

# kopt=root=UUID=d5e8aa82-f4c5-494e-a28d-6f3e01ae0809 ro

## Setup crashdump menu entries

## e.g. crashdump=1

# crashdump=0

## default grub root device

## e.g. groot=(hd0,0)

# groot=(hd0,0)

## should update-grub create alternative automagic boot options

## e.g. alternative=true

##      alternative=false

# alternative=true

## should update-grub lock alternative automagic boot options

## e.g. lockalternative=true

##      lockalternative=false

# lockalternative=false

## additional options to use with the default boot option, but not with the

## alternatives

## e.g. defoptions=vga=791 resume=/dev/hda5

# defoptions=quiet splash

## should update-grub lock old automagic boot options

## e.g. lockold=false

##      lockold=true

# lockold=false

## Xen hypervisor options to use with the default Xen boot option

# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option

# xenkopt=console=tty0

## altoption boot targets option

## multiple altoptions lines are allowed

## e.g. altoptions=(extra menu suffix) extra boot options

##      altoptions=(recovery) single

# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst

## only counts the first occurence of a kernel, not the

## alternative kernel options

## e.g. howmany=all

##      howmany=7

# howmany=all

## should update-grub create memtest86 boot option

## e.g. memtest86=true

##      memtest86=false

# memtest86=true

## should update-grub adjust the value of the default booted system

## can be true or false

# updatedefaultentry=false

## ## End Default Options ##

title           Ubuntu, kernel 2.6.20-16-generic

root            (hd0,0)

kernel          /vmlinuz-2.6.20-16-generic root=UUID=d5e8aa82-f4c5-494e-a28d-6f3e01ae0809 ro quiet splash

initrd          /initrd.img-2.6.20-16-generic

quiet

savedefault

title           Ubuntu, kernel 2.6.20-16-generic (recovery mode)

root            (hd0,0)

kernel          /vmlinuz-2.6.20-16-generic root=UUID=d5e8aa82-f4c5-494e-a28d-6f3e01ae0809 ro single

initrd          /initrd.img-2.6.20-16-generic

title           Ubuntu, kernel 2.6.20-15-generic

root            (hd0,0)

kernel          /vmlinuz-2.6.20-15-generic root=UUID=d5e8aa82-f4c5-494e-a28d-6f3e01ae0809 ro quiet splash

initrd          /initrd.img-2.6.20-15-generic

quiet

savedefault

title           Ubuntu, kernel 2.6.20-15-generic (recovery mode)

root            (hd0,0)

kernel          /vmlinuz-2.6.20-15-generic root=UUID=d5e8aa82-f4c5-494e-a28d-6f3e01ae0809 ro single

initrd          /initrd.img-2.6.20-15-generic

title           Ubuntu, memtest86+

root            (hd0,0)

kernel          /memtest86+.bin

quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

title   gentoo testing

root (hd0,0)

kernel /boot/kernel-gentoo-susp-test-3 root=/dev/sda4

```

here are the results of the grep for my three most recent kernels

```
robbins@ur:/boot$ grep -i sata config-gentoo-susp-test-1

CONFIG_SATA_AHCI=y

CONFIG_SATA_SVW=m

CONFIG_SATA_MV=m

CONFIG_SATA_NV=m

CONFIG_SATA_QSTOR=m

CONFIG_SATA_PROMISE=m

CONFIG_SATA_SX4=m

CONFIG_SATA_SIL=m

CONFIG_SATA_SIL24=m

CONFIG_SATA_SIS=m

CONFIG_SATA_ULI=m

CONFIG_SATA_VIA=m

CONFIG_SATA_VITESSE=m

CONFIG_SATA_INIC162X=m

CONFIG_SATA_ACPI=y

```

```
robbins@ur:/boot$ grep -i sata config-gentoo-susp-test-2

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 is not set

# CONFIG_SATA_VIA is not set

# CONFIG_SATA_VITESSE is not set

# CONFIG_SATA_INIC162X is not set

CONFIG_SATA_ACPI=y

```

```
robbins@ur:/boot$ grep -i sata config-gentoo-susp-test-3

CONFIG_SATA_AHCI=y

CONFIG_SATA_SVW=y

# CONFIG_SATA_MV is not set

CONFIG_SATA_NV=y

# CONFIG_SATA_QSTOR is not set

# CONFIG_SATA_PROMISE is not set

# CONFIG_SATA_SX4 is not set

CONFIG_SATA_SIL=y

# CONFIG_SATA_SIL24 is not set

# CONFIG_SATA_SIS is not set

# CONFIG_SATA_ULI is not set

CONFIG_SATA_VIA=y

# CONFIG_SATA_VITESSE is not set

# CONFIG_SATA_INIC162X is not set

CONFIG_SATA_ACPI=y

```

Thanks!

----------

## IQgryn

Assuming that you have selected the right SATA driver, and that you also have whatever filesystem Gentoo's / is on compiled into the kernel (not a module) as well, I would need the exact output that you get when trying to boot from the Gentoo kernel.  Maybe a picture?

----------

## Nicias

ok, here we go:

```

NET: Registered protocal family 17

ieee80211: 802.11 data/management/control stack, git-1.1.13

ieee80211: copyright (C) 2004-2007 Intel Corporation <jketreno@linux.intel.com>

Using IPI No Shortcut mode

Suspend v2.2.10

Suspend2 Userspace Storage Manager Support Registered

Suspend2 Basic User Interface Support Registered

Suspend2 Compressor Support Registered

Suspend2 Block I/O Support Registered

Suspend2 Swap Allocator Support Registered

Suspend2 File Allocator Support Registered

Suspend2 Userspace UI Support Registered

input: PS/2 Mouse as /class/input/input4

input: ALpsPS/2 ALPS GlidePoiint as /class/input/input5

No Storage Allocator is currently active. Rechecking whether we can use one.

Supsend2: Resume2 parameter is empty, suspending will be disabled.

Compression Driver: Arg! Nothing follows me in the pipeline.

Compressor didn't initialize okay.

Suspend2: Initialize modules failed.

kjournald starting. Commit interval 5 seconds.

EXT3-fs: mounted filesystem with ordered data mode.

VFS: mounted root (ext3 filesystem) readonly

warning: unable to open initial console

kernel panic - not syncing: no init found. Try passing init= option to kernel.

```

----------

## Nicias

I've been using the suspend2 sources. Changing to gentoo-sources removed the complaints about the compressor, but there is still the complaint about init.

----------

## IQgryn

What do these commands give you (run within the Gentoo chroot)? 

```
ls -l /sbin/init

emerge -pv sysvinit

equery belongs /sbin/init
```

----------

## Nicias

```
ur / # ls -l /sbin/init

-rwxr-xr-x 1 root root 32156 2007-04-19 20:50 /sbin/init
```

```
ur / # emerge -pv sysvinit

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R   ] sys-apps/sysvinit-2.86-r8  USE="(-ibm) (-selinux) -static" 101 kB

Total: 1 package (1 reinstall), Size of downloads: 101 kB
```

```
ur / # equery belongs /sbin/init

[ Searching for file(s) /sbin/init in *... ]

sys-apps/sysvinit-2.86-r8 (/sbin/init)
```

Does that provide any information?

----------

## IQgryn

Nothing helpful, unfortunately.  You could try re-emerging sysvinit, but I doubt it will help.  Also try starting the kernel with init=/sbin/init on the command line.  Finally, make sure that /sbin is part of the root partition, and double-check that the hardware and filesystem drivers for the root partition are all included as built-ins, not modules.

----------

## Nicias

Everything gentoo except /boot is on one partition. The filesystem is definitely in the kernel (ext3) I assume the problem is then that I am missing a device driver :/ Wish I knew what it was. (I think I tried init=/sbin/init, but I'll try now after reinstalling sysvinit. )

----------

## IQgryn

Post your kernel config to something like http://pastebin.ca and I'll take a look at it after work.

----------

## Nicias

now the error is "unable to execute init"

----------

## Nicias

thanks!

I put it up at

http://pastebin.ca/665626

and the output of lspci -v

http://pastebin.ca/665656

----------

## IQgryn

 *Nicias wrote:*   

> (from kernel config)
> 
> CONFIG_ATA=y
> 
> # CONFIG_ATA_NONSTANDARD is not set
> ...

 

I would try disabling the filesystem debugging first (you shouldn't need that unless you're a fs developer).  If that doesn't help, I'd enable all of the SATA drivers, to verify that it's not a problem with a missing driver.  Based on a quick Google search, I think that the CONFIG_SATA_AHCI option is the one you're looking for.

----------

## Nicias

No joy. I disabled the debuging, no love. 

I enabled that particular SATA config, no love

I enabled all the ones marked at worst "Experimental" no love

I enabled all of them, no love.

The only difference was the amount of unused memory freed by the kernel before it paniced.

Any other suggestions?

----------

## IQgryn

Look through the output of lsmod from the kubuntu setup for a clue as to what you might be missing.  Also look at the kernel config for the kubuntu setup.  Note that kubuntu uses modules with an initrd; if you'd rather not use the initrd (it's kind of a nuisance), then you'll have to build everything critical (hd drivers, fs, etc) in instead of building it as a module.

----------

## Nicias

So I tried the brute force approach of changing all the "=m"'s in the kubuntu config to "=y"s, Not surprising, that didn't work. Next I will try and just change the "=m's" that correspond to things I need to load modules to "=y"'s. How can I figure out where the various modules are created in menuconfig?

----------

## Nicias

The whole thing was my bad. I had noauto rather then auto in the fstab line for /mnt/gentoo, so it wasn't getting mounted, My gentoo install was at /dev/sda3/mnt/gentoo rather then /dev/sda4

----------

## PaulBredbury

See ebuild for Ubuntu kernel.

----------

