LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo
User Name
Password
Gentoo This forum is for the discussion of Gentoo Linux.

Notices

Reply
 
Search this Thread
Old 02-25-2012, 08:19 AM   #1
cristi92b
Member
 
Registered: May 2011
Posts: 82

Rep: Reputation: Disabled
Kernel panic after installing gentoo


After installing gentoo using kernel 3.2.1-r2 without genkernel I got the following error message:
Code:
[ 2.352411] Kernel panic - not syncing: VFS: Unable to mount rootfs on unknown-block(2,0)
I guess I forgot to include some kernel modules.
Is there any way I can recompile the kernel without installing gentoo again? Do you know which modules I forgot to include?

fdisk -l /dev/sda

Code:
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x9509763e

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      102400    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2              13       32651   262160384    7  HPFS/NTFS
Partition 2 does not end on cylinder boundary.
/dev/sda3           32651      112465   641105920    7  HPFS/NTFS
Partition 3 does not end on cylinder boundary.
/dev/sda4          112465      121602    73392128    5  Extended
Partition 4 does not end on cylinder boundary.
/dev/sda5   *      112465      112469       32768   83  Linux
/dev/sda6          112469      115131    21381120   83  Linux
/dev/sda7          115131      115196      524288   82  Linux swap / Solaris
/dev/sda8          115197      115201       32768   83  Linux
/dev/sda9          115201      117863    21381120   83  Linux
/dev/sda10         117863      117928      524288   82  Linux swap / Solaris
/dev/sda11         117928      117932       32768   83  Linux
/dev/sda12         117932      121536    28950528   83  Linux
/dev/sda13         121537      121602      523264   82  Linux swap / Solaris

Gentoo mountpoints:
/dev/sda5 is /boot
/dev/sda6 is /
/dev/sda7 is /swap

My grub.conf :
Code:
# This is a sample grub.conf for use with Genkernel, per the Gentoo handbook
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2
# If you are not using Genkernel and you need help creating this file, you
# should consult the handbook. Alternatively, consult the grub.conf.sample that
# is included with the Grub documentation.

default 0
timeout 30
splashimage=(hd0,4)/grub/splash.xpm.gz

title Windows 7
rootnoverify (hd0,0)
makeactive
chainloader +1

title Gentoo Linux 3.2.1-r2
root (hd0,4)
kernel /kernel-3.2.1-gentoo-r2 ro root=/dev/sda6 

title Arch Linux
root (hd0,10)
kernel /vmlinuz-linux root=/dev/sda12 ro vga=795
initrd /initramfs-linux.img

title Arch Linux Fallback
root (hd0,10)
kernel /vmlinuz-linux root=/dev/sda12 ro vga=795
initrd /initramfs-linux-fallback.img

title Slackware64 13.37
root (hd0,7)
kernel /vmlinuz-huge-2.6.37.6 root=/dev/sda9
initrd /config-huge-2.6.37.6

title Slackware64 13.37 Failsafe
root (hd0,7)
kernel /vmlinuz-generic-2.6.37.6 root=/dev/sda9
initrd /config-generic-2.6.37.6

#root (hd0,0)
#kernel /boot/kernel-genkernel-x86-2.6.24-gentoo-r5 root=/dev/ram0 real_root=/dev/sda3
#initrd /boot/initramfs-genkernel-x86-2.6.24-gentoo-r5




# vim:ft=conf:

EDIT:

chrooted again using Gentoo CD and recompiled kernel (and copied bzImage to /boot) , but I get same error message. I uploaded kernel config file. Also, startx doesn't work:

Code:
(EE) Failed to load module "vesa"
(EE) Failed to load module "fbdev"
vesa and fbdev are included in USE flags.

----------------------

I will come back after I will install it again.
Attached Files
File Type: txt kernelconfig.txt (79.5 KB, 0 views)

Last edited by cristi92b; 02-25-2012 at 12:51 PM.
 
Old 02-25-2012, 04:04 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,127

Rep: Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985
genkernel uses an initrd. You will need one too unless you build all the required support to mount the root into the kernel (i.e. not as modules).
I've never used genkernel, and tended to use my own config. Means you doing the legwork for your box. Things are significantly easier these days - try "make localyesconfig".
 
Old 02-25-2012, 06:42 PM   #3
cristi92b
Member
 
Registered: May 2011
Posts: 82

Original Poster
Rep: Reputation: Disabled
So if I type "make localyesconfig" it will generate an initrd image?
 
Old 02-25-2012, 08:16 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,127

Rep: Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985
No, it won't - perhaps you didn't read the bit after "unless".
"make --help" will list the options and a brief description. After that, a good search engine is invaluable - gentoo has always had good doco.
 
Old 02-26-2012, 05:10 AM   #5
cristi92b
Member
 
Registered: May 2011
Posts: 82

Original Poster
Rep: Reputation: Disabled
I recompiled the kernel and I included all the filesystems (not as modules) excepting the experimental ones. It still gives the same error, but now it loads nouveau before the kernel panic, see the picture I uploaded.

Code:
mount /dev/sda6 /mnt/gentoo
mount /dev/sda5 /mnt/gentoo/boot
mount -t proc none /mnt/gentoo/proc
mount --rbind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"
cd /usr/src/linux-3.2.1-gentoo-r1
make clean
make menuconfig
make localyesconfig
make && make modules_install
cp -L arch/x86_64/boot/bzImage /boot/kernel-3.2.1-gentoo-r1
reboot

/etc/fstab :

Code:
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't 
# needed); notail increases performance of ReiserFS (at the expense of storage 
# efficiency).  It's safe to drop the noatime options if you want and to 
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#

# <fs>			<mountpoint>	<type>		<opts>		<dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/BOOT		/boot		ext2		noauto,noatime	1 2
/dev/ROOT		/		ext4		defaults,noatime		0 1
/dev/SWAP		none		swap		sw		0 0
/dev/cdrom		/mnt/cdrom	auto		noauto,ro	0 0
/dev/fd0		/mnt/floppy	auto		noauto		0 0

proc			/proc		proc		defaults	0 0
shm			/dev/shm	tmpfs		nodev,nosuid,noexec	0 0
Thank you for your answers!
Attached Images
File Type: jpg photo.jpg (266.5 KB, 3 views)
 
Old 02-26-2012, 12:57 PM   #6
cristi92b
Member
 
Registered: May 2011
Posts: 82

Original Poster
Rep: Reputation: Disabled
I forgot to include Nvidia SATA driver, now it works.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gentoo - Kernel Panic - Help :( Gentoo-Gav Linux - Newbie 20 04-26-2009 07:46 PM
Kernel not loading - Kernel Panic in Grub - 2.6.23-gentoo-r6 rahulthewall3000 Linux - Kernel 2 02-11-2008 02:33 PM
Installing gentoo: kernel panic umbraphasmatis Linux - General 1 01-12-2007 10:38 PM
gentoo: kernel panic not syncing asquante Linux - Newbie 6 11-11-2006 10:37 PM
Kernel Panic in Gentoo palmem Linux - General 1 11-06-2004 01:16 PM


All times are GMT -5. The time now is 12:00 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration