2

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

grub.conf

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

title Gentoo Linux 2.6.34-r6
root (hd0,0)
kernel /boot/kernel-2.6.34-gentoo-r6 root=/dev/ram0 real_root=/dev/sda3
vim:ft=conf:

fdisk -l

Device Boot Start End Blocks Id System
/dev/sda1 * 1 5 40131 83 Linux
/dev/sda2   6 71 530145 82 Linux swap / Solaris
/dev/sda3   72 1044 7815622+ 83 Linux

so im having trouble getting gentoo to boot, how can I change it from looking for root at block(1,0) to block(0,0) which is where my root partition is created? I though setting it to look to that hdd in grub is all I needed? that is my first guess to what might be causing the problem but not sure why it is giving this error. please advise...

JB87
  • 23
  • 1
  • 6

3 Answers3

1

Youre trying to boot up an init ram block device (initrd), but you havent provided an initrd to grub, so /dev/ram0 doesnt exist.

Additionally initrd is old school. If youre building a new server, you should be using initramfs not initrd, and you shouldnt specify root= at all, it is taken care of automatically.

If youre not using and initrd or initramfs, you should change the root= to be root=/dev/sda3 and remove the real_root=

phemmer
  • 5,789
  • 2
  • 26
  • 35
0

Did you create your file system on /dev/sda3 (mkfs.ext3 /dev/sda3 or whatever filesystem you want)?

Does your kernel have that file system driver included in the kernel (Y in the kernel menus) and not a module (M in the kernel menus)? If not, you'll have to boot from the livecd and redo your kernel config from the chroot.

Also, it looks like you're trying to use /dev/ram0 as your root file system, but the kernel you're specifying isn't a genkernel from what it looks like. You also aren't loading the initrd/initramfs, which would be required to boot from /dev/ram0 as in genkernel. Try root=/dev/sda3.

I'm thinking you mixed up the genkernel guide and the normal guide... IMHO, they shouldn't be on the same page, because I've totally done this.

0

Try:

title Gentoo Linux 2.6.34-r6
kernel /boot/kernel-2.6.34-gentoo-r6 root=/dev/sda3
root (hd0,0)

and make to run:

grub
root (hd0,0)
setup (hd0)
quit

then try rebooting...

Alexandre Nizoux
  • 498
  • 1
  • 4
  • 15