View previous topic :: View next topic |
Author |
Message |
rustysail n00b
Joined: 01 Jul 2007 Posts: 2
|
Posted: Wed Sep 19, 2007 8:57 pm Post subject: Grub won't boot Gentoo |
|
|
Hello all!
I have just installed gentoo using the handbook. I am fairly certain that I did everything correctly. I am dual-booting ubuntu and gentoo, and I installed gentoo using a stage-3 tarball and chrooting into the partitions from ubuntu. I used gentoo-sources instead of the genkernel. When I finally got to the step of rebooting, grub wouldn't boot gentoo. Here is the exact error:
Code: | [ 9.529447] VFS: Cannot open root device "sda5" or unknown-block (0,0)
[ 9.529507] Please append a correct "root=" boot option; here are the available partitions:
[ 9.529576] Kernel panic - not syncing, VFS: Unable to mount root fs on unknown-block (0,0) |
Further Information:
Dell Dimension 3000
Dual booting with Ubuntu Feisty Fawn
Here is my grub.conf
Code: | # 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 30
## 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=b261a170-a3ef-4c2c-924b-9d395e1012f0 ro
## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0
## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,1)
## 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 ##
splashimage=(hd0,1)/grub/splash.xpm.gz
title Ubuntu, kernel 2.6.20-16-generic
root (hd0,1)
kernel /vmlinuz-2.6.20-16-generic root=UUID=b261a170-a3ef-4c2c-924b-9d395e1012f0 ro quiet splash
initrd /initrd.img-2.6.20-16-generic
quiet
savedefault
title Gentoo, kernel 2.6.22-gentoo-r5
root (hd0,1)
kernel /boot/kernel-2.6.22-gentoo-r5 root=/dev/sda5
title Ubuntu, kernel 2.6.20-16-generic (recovery mode)
root (hd0,1)
kernel /vmlinuz-2.6.20-16-generic root=UUID=b261a170-a3ef-4c2c-924b-9d395e1012f0 ro single
initrd /initrd.img-2.6.20-16-generic
title Ubuntu, kernel 2.6.20-15-generic
root (hd0,1)
kernel /vmlinuz-2.6.20-15-generic root=UUID=b261a170-a3ef-4c2c-924b-9d395e1012f0 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,1)
kernel /vmlinuz-2.6.20-15-generic root=UUID=b261a170-a3ef-4c2c-924b-9d395e1012f0 ro single
initrd /initrd.img-2.6.20-15-generic
title Ubuntu, memtest86+
root (hd0,1)
kernel /memtest86+.bin
quiet
### END DEBIAN AUTOMAGIC KERNELS LIST
|
Things I have tried:
Changed to hda5. Ubuntu uses sda even though I think that is wrong.
Switched from Ubuntu's grub to Gentoo's grub.
re-installed gentoo multiple times making sure I paid attention to every detail of the handbook.
Thanks a lot for the help. I really appreciate it. I have been trying to set this up all summer, and now that it is fall and my friend who knew a little more than me is off at college, I thought I could use some more experienced help. Thanks a lot.
Please let me know if any other information would be helpful. |
|
Back to top |
|
|
Habbit Apprentice
Joined: 01 Sep 2007 Posts: 237 Location: 3.7137 W, 40.3873 N
|
Posted: Wed Sep 19, 2007 9:23 pm Post subject: |
|
|
Since the kernel does not offer you _any_ partitions, it seems that you did not include support for your HD controller in your kernel (or you built it as a module, which is no good since you are not bundling it into an initrd). You can find your controller chipset from Ubuntu with the "lspci" command.
On the other hand, /dev/sda5 is normal if your hard drive is a SATA drive (which are managed by the SCSI subsystem, and even some PATA drives are if you use libata). The device name can even be different between Gentoo and Ubuntu for a PATA drive if one uses the libata PATA controllers and the other uses the old, ide PATA controllers. _________________
Code: | ~ $ objdump -d ./habbit_mind
90 xchg %rax, %rax
EB FD jmp $-3 |
|
|
Back to top |
|
|
Habbit Apprentice
Joined: 01 Sep 2007 Posts: 237 Location: 3.7137 W, 40.3873 N
|
Posted: Wed Sep 19, 2007 9:31 pm Post subject: |
|
|
By the way, if you have both a PATA and a SATA controller, which is extremely possible since it is the most common setup on desktop computers nowadays, you will probably want to have only the libata-based drivers for both PATA and SATA. instead of the ide drivers for PATA and libata for SATA, since this will give you a smaller kernel, and thus a faster system. _________________
Code: | ~ $ objdump -d ./habbit_mind
90 xchg %rax, %rax
EB FD jmp $-3 |
|
|
Back to top |
|
|
nixnut Bodhisattva
Joined: 09 Apr 2004 Posts: 10974 Location: the dutch mountains
|
Posted: Thu Sep 20, 2007 5:06 pm Post subject: |
|
|
It's not grub that's the problem here. Your kernel is missing the driver for your sata controller. Boot the livecd and see which drivers it loads with lsmod. Or check with lspci which sata controller your machine has and find out which kernel driver you need and make sure you include that driver in your kernel configuration. Search around the forums for more information. You're not exactly the first with this problem. _________________ Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered
talk is cheap. supply exceeds demand |
|
Back to top |
|
|
bobber205 Guru
Joined: 23 Aug 2006 Posts: 561 Location: Oregon
|
Posted: Sat Sep 22, 2007 4:36 am Post subject: |
|
|
I had the exact same problem before. The above poster is spot on (as usual) _________________ Never Forget The Expat 2.0! |
|
Back to top |
|
|
rustysail n00b
Joined: 01 Jul 2007 Posts: 2
|
Posted: Sat Sep 22, 2007 4:54 am Post subject: |
|
|
You guys are definitely right about this, but for some reason I can't fix it.
After configuring the kernel, I do make && make modules_install and at first it works. Then weird error messages pop up. It starts working again. Finally when it gets to what would be the end, Every program I have open including that terminal shuts down while my computer is slowed to a halt and freezes up. The oddest part is that once all this is over, my home folder opens up in the GUI file browser.
I tried using a minimal cd to configure the kernel, but I get the same errors, and it doesn't do anything. The errors come and go so fast, that i can't read them, and my terminal shuts down, so I can't copy and paste. It is something about mismatched and starts with vmlinux. I have no idea whats going on.
Thanks for the help. |
|
Back to top |
|
|
bobber205 Guru
Joined: 23 Aug 2006 Posts: 561 Location: Oregon
|
Posted: Sat Sep 22, 2007 5:57 am Post subject: |
|
|
Boot your LiveCD. do a /etc/init.d/sshd start. be sure to set a root password.
on a another linux machine or using putty on windows ssh into your box and copy and paste your /usr/src/linux/.config file. _________________ Never Forget The Expat 2.0! |
|
Back to top |
|
|
pedm n00b
Joined: 09 Oct 2007 Posts: 3 Location: MA, USA
|
Posted: Wed Oct 10, 2007 11:54 pm Post subject: |
|
|
Sorry to bring up an old post, but is there any reason that genkernel would compile a kernel that won't work on a sata and pata system? (I'm having this same exact problem.) _________________ PDM |
|
Back to top |
|
|
nixnut Bodhisattva
Joined: 09 Apr 2004 Posts: 10974 Location: the dutch mountains
|
Posted: Thu Oct 11, 2007 4:40 pm Post subject: |
|
|
Yes, genkernel doesn't know your hardware and so you need to tell it which drivers should be included in the kernel. Using the genkernel --menuconfig option will start a helper application where you can configure your kernel.
The problem with sata drivers is that such drivers must be loaded or the kernel can't read the disks. That means that if you need such a driver it needs to be either built-in in the kernel or a module in an initramfs file. Otherwise the kernel needs the driver to read the disk, but first needs to read the disk to find the driver. _________________ Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered
talk is cheap. supply exceeds demand |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|