# Grub init=?

## sum1nil

Hello, new to Gentoo here. 

I compiled a kernel and modified the grub.conf to use it. At first it seems the boot process is ok but then:

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

Tried some various things and also got a message about not being able to make an intial console.

Gentoo is running in VirtualBox on a Vista 64bit host, and all works well with the initial install and running the 'default' kernel (except for being able to install the guest additions).

Thanks in advance for any help.

----------

## Hu

Please boot into the installation environment, mount your partitions, and post the output of nl /boot/grub/grub.conf ; nl /etc/fstab ; sfdisk -l.  Your problem is most likely because you passed an incorrect value for the root partition in the GRUB line.  We should be able to find the correct value with that output.

----------

## sum1nil

 *Hu wrote:*   

> Please boot into the installation environment, mount your partitions, and post the output of nl /boot/grub/grub.conf ; nl /etc/fstab ; sfdisk -l.  Your problem is most likely because you passed an incorrect value for the root partition in the GRUB line.  We should be able to find the correct value with that output.

 

nl fstab:

1	/dev/sda1			/boot					ext2			defaults		1 2

2	/dev/sda2			none					swap			sw			0 0

3	/dev/sda3			/					ext3			noatime		0 1

4     none				/proc					proc 			defaults		0 0

5     none				/dev/shm			       tmpfs 		defaults		0 0

6    /dev/cdrom		        /mnt/cdrom 		       auto		        noauto,user	0 0

7    cruzer(tried thumbdrive)				/proc/bus/usb	usbfs	       defaults,devmode=0666              0 0

nl grub.conf:

nl /boot/grub/grub.conf:

1 	default 1

2 	timeout 5

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

4 	## Original genkernel ##

5 	title=Gentoo Linux

6 	root (hd0,0)

7 	kernel /kernel-genkernel-x86-2.6.24-gentoo-r5 root=/dev/ram0 init=/linuxrc

		ramdisk=8192 real_root=/dev/sda3

8 	initrd /initramfs-genkernel-x86-2.6.24-gentoo-r5

9 	## My build of kernel ##

10	title Gentoo Linux 2.6.24-r7

11 	root (hd0,0)

12    kernel /boot/kernel-2.6.24-gentoo-r7 real_root=/dev/hda3

sfdisk -l:

Disk /dev/sda: 2620 cylinders, 255 heads, 63 sectors/track

Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

	Device	Boot	Start		End		#cyls		#blocks		Id		System

/dev/sda1			0+		 12               13-         104391            83             Linux

/dev/sda2			13            204             192		1542240           82             Linux swap / Solaris

/dev/sda3			205         2619           2415     19398487+           83		Linux

/dev/sda4			   0              -                 0                  0               0             Empty

When I reboot I get the error:

VFS: Cannot open root device "<NULL>" or unknown-block(8,3)

please append a correct "root=" boot option; here are the available partitions

0300    21045248  hda driver: ide-disk

  0301    104391  hda1

  0302   1542240  hda2

  0303  19398487  hda3

1600    2952386   hdc driver: ide-cdrom

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

Please forgive the terrible format. 

Thanks for any help.

----------

## gentoo_ram

I'm guessing you either don't have support for your SATA controller compiled into the kernel or you are missing SCSI disk support which also must be compiled into the kernel.

----------

## zyko

 *Quote:*   

> 9 ## My build of kernel ##
> 
> 10 title Gentoo Linux 2.6.24-r7
> 
> 11 root (hd0,0)
> ...

 

I'd try "root=/dev/sda3".

----------

## sum1nil

Changing the grub.conf line to use 'root=/dev/sda3' is an improvement I think in that it finds the root filesystem now however I get the error/prompt:

...

Using IPI No-Shortcut mode

Root-NFS: no NFS server available, giving up

VFS:  Unable to mount root fs via NFS, trying floppy

VFS:  Insert root floppy and press ENTER

Apparently I need to figure out what and how to install a NFS server. I appreciate the help and will search for a solution when I have time.

Thankfully, I can just revert to my previous snapshot of Gentoo 64 bit using VirtualBox. The snapshot is using the unaltered kernel placed during the initial install.

The only reason I am even messing with the kernel is to get the VirtualBox additions to install. After a clean install of Gentoo 64 bit on VirtualBox, when I tried to install the Linux Additions I would get an error message saying:

Run 'make oldconfig && make prepare' on kernel src to fix it

I changed directory to /usr/src/linux and ran 'make oldconfig && make prepare' but trying to install the Linux additions always gave the same error and errors about no auto.conf or version.h. After making a new kernel (r7) even though uname -r reports I am running the original kernel (r5) changes the error message while installing VirtualBox Linux additions to:

   vboxadd_test: disagrees about version of symbol struct_module

I have no idea about symbol struct_module. I can start the X server in a functional GUI but most of it is drawn off the screen so I wanted to use VirtualBox's X driver in hopes to have a graphical interface for Gentoo.

I appreciate any help. I am only a hobbyist but I enjoy learning about Linux/Gentoo.

Thanks everybody. Merry Christmas.

----------

## Hu

Use the [code] tag to preserve layout a bit better.

 *sum1nil wrote:*   

> Changing the grub.conf line to use 'root=/dev/sda3' is an improvement I think in that it finds the root filesystem now however I get the error/prompt:
> 
> ...
> 
> Using IPI No-Shortcut mode
> ...

 

No, this is because you configured your kernel with support for root over NFS.  I doubt you need this, so you should remove it.  That will not help with your boot failure, but it will shrink the kernel and remove a misleading failure.

Have you included support for your root filesystem in the kernel?  If you are not sure, post the output of grep -E '^[^#]' /path/to/kernel/.config ; file -s /dev/sda3.  The output from file will probably reiterate that your root filesystem is an ext3 volume, as you wrote in your /etc/fstab, but we should confirm that.

 *sum1nil wrote:*   

> After making a new kernel (r7) even though uname -r reports I am running the original kernel (r5) changes the error message while installing VirtualBox Linux additions to:
> 
>    vboxadd_test: disagrees about version of symbol struct_module

 

If uname -r says -r5, then you are still running the old kernel.  This may or may not matter for VirtualBox, depending on how their build process works, and on where your kernel sources symbolic link points.  What is the value of ls -l /usr/src/linux ; ls -l -H /usr/src/linux?

It looks like they are probing for some kernel symbol, and cannot handle the value it has now.

 *sum1nil wrote:*   

> I have no idea about symbol struct_module. I can start the X server in a functional GUI but most of it is drawn off the screen so I wanted to use VirtualBox's X driver in hopes to have a graphical interface for Gentoo.

 

We may be able to fix this in some other way.  What is the output of emerge --info --verbose ; nl /etc/X11/xorg.conf when you boot the installation media and chroot into the installed system?

----------

## sum1nil

I think I am going about this all wrong. 

The liveCD recognizes the Virtualbox 'video card' and sets up the X server and desktop environment perfectly; all is well when I boot from the liveCD.

How would I install Gentoo onto my hard drive in such a way that it would be an exact copy of the Gentoo that starts from the liveCD and would include a proper X configuration (if that makes sense).

 :Shocked: 

----------

## Xake

sum1nil: first make sure support for your filesystem and you controller is compiled into your kernel.

I think you are smissing one of them. Or support for SCSI disks compiled into kernel.

Observe: NOT as modules, it will just not work.

Or use "emerge genkernel && genkernel all" and use he kernel and initrd that leaves behind. It will give you (almost) the same config as with the LiveCD, and totally unoptimized for your machine...

----------

## sum1nil

I really appreciate the helpful nature of the forums.

I got X server to work. It actually was so easy I could kick myself now; just had to select the vesa driver from the card database. 

I still don't know the why to the other probs but will work at them. Lots to learn.

Thanks again all.  :Very Happy: 

----------

