Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Grub does not boot Gentoo (but boots Debian and MSWinXP)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
AoP
n00b
n00b


Joined: 02 Jul 2005
Posts: 4

PostPosted: Sat Jul 02, 2005 6:39 am    Post subject: Grub does not boot Gentoo (but boots Debian and MSWinXP) Reply with quote

Good morning everyone,

I tried to find a solution for my problem with the help of Google and this board's search engine, but I suppose that either I lack good search terms or this problem might not occur too often.

Situation is as follows:
I installed Gentoo 2005.0rc5 (had the installation CD around and felt a bit reluctant to download and burn another ISO with 2005.0) all the way from stage1. To build the kernel, I used the original sources from kernel.org (because I had a linux-2.6.12.tar.bz2 on my Debian partition) and the kernel config which works perfectly with Debian. The kernel compiled successfully and I modified Debian's /boot/grub/menu.lst to include Gentoo as follows:
Quote:

title Gentoo Linux, Kernel 2.6.12 w ht
root (hd0,5)
kernel /boot/kernel-2.6.12shgen root=/dev/hda6 ro
initrd /boot/initrd.img-2.6.12shgen
savedefault
boot


Basically, I just copied and modified the Debian entry to suit the Gentoo values.
After rebooting, I can now select "Gentoo Linux, Kernel 2.6.12 w ht" from grub's menu but all that I get is a new screen with
Quote:

Booting "Gentoo Linux, Kernel 2.6.12 w ht"

root (hd0,5)


- then the machine's dead. I can only force a reboot by using the reset button. Gentoo's /etc/fstab should be just fine - I copied and altered Debian's to suit Gentoo's settings.
The fstab looks like this:

Quote:

proc /proc proc defaults 0 0
/dev/hda6 / reiserfs notail 0 1
/dev/sda1 /home reiserfs defaults,user 0 0
/dev/hda2 none swap sw 0 0
/dev/hdc /media/cdrom0 iso9660 ro,user,noauto 0 0
/dev/hdd /media/cdrom1 iso9660 ro,user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0

# Winxp

/dev/hda1 /winxp1 auto user,noauto 0 0
/dev/sda2 /winxp2 auto user,noauto 0 0

# Debian

/dev/hda5 /mnt/debian reiserfs rw,user,noauto 0 0


Any helpful advice is appreciated. I'm getting pretty desperate about this as I used to have 2004.1 and 2004.2 installed successfully on older machines already. Should you feel like I did not post any relevant information, please tell me so and I'll do that.

Thanks in advance!
Back to top
View user's profile Send private message
ohm314
n00b
n00b


Joined: 02 Jul 2005
Posts: 43
Location: Switzerland

PostPosted: Sat Jul 02, 2005 6:59 am    Post subject: Reply with quote

Hi AoP

I think the reason why your gentoo doesnt boot is because you gave grub the wrong location to look for the kernel

Quote:

title Gentoo Linux, Kernel 2.6.12 w ht
root (hd0,5)
kernel /boot/kernel-2.6.12shgen root=/dev/hda6 ro
initrd /boot/initrd.img-2.6.12shgen
savedefault
boot


with the root (hd0,5) you usually point to the /boot partition, that means, on the next line, where you tell grub what the name of your kernel is, you have to omit the /boot (that wasnt too clear, was it? its still early in the morning... :-)

thats how your grub.conf should look, in my opinion:

Quote:

title Gentoo Linux, Kernel 2.6.12 w ht
root (hd0,5)
kernel /kernel-2.6.12shgen root=/dev/hda6 ro
initrd /boot/initrd.img-2.6.12shgen
savedefault
boot


btw. the root=/dev/hda6 tells the kernel where your root partiton is (the one that is mounted as / ) ah, and if I wasnt wrong about all that I said, then the fstab has nothing to do with that all, that comes much later in the boot process into play

have a nice day

ohm314
Back to top
View user's profile Send private message
AoP
n00b
n00b


Joined: 02 Jul 2005
Posts: 4

PostPosted: Sat Jul 02, 2005 8:34 am    Post subject: Reply with quote

Hi ohm314,

thanks for the hints but that didn't work either. I saw that the Gentoo manual suggests to do it that way, but the result was the same.
Back to top
View user's profile Send private message
ohm314
n00b
n00b


Joined: 02 Jul 2005
Posts: 43
Location: Switzerland

PostPosted: Sat Jul 02, 2005 9:45 am    Post subject: Reply with quote

hmm..

Can you rule out the possibility that its not a problem with the kernel?

you could perhaps try to get into the grub console when booting and enter the commands from grub.conf for the gentoo part by hand

Code:

> root (hd0,5)
> kernel /kernel-2.6.12shgen root=/dev/hda6
> initrd /initrd.img-2.6.12shgen
> boot


grub has a bashlike command and filename completion, so you can actually check if it finds the kernel and the initrd where you expect it to be...

I know this is kind of a stupid suggestion - but better than nothing at all..

greets
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Sat Jul 02, 2005 5:46 pm    Post subject: Re: Grub does not boot Gentoo (but boots Debian and MSWinXP) Reply with quote

AoP wrote:
Basically, I just copied and modified the Debian entry to suit the Gentoo values.
After rebooting, I can now select "Gentoo Linux, Kernel 2.6.12 w ht" from grub's menu but all that I get is a new screen with
Quote:

Booting "Gentoo Linux, Kernel 2.6.12 w ht"

root (hd0,5)


- then the machine's dead. I can only force a reboot by using the reset button.

Since you have a known good Debian kernel, you could try booting Gentoo with that. If this works, you would just need to reconfigure/recompile your Gentoo kernel so that it works properly.

When you boot up to the GRUB menu, highlight the Debian entry, then press <e> twice to edit the kernel line. Change the root=/dev/hda5 to root=/dev/hda6, press <enter>, and press <b> to boot the modified entry.
Back to top
View user's profile Send private message
AoP
n00b
n00b


Joined: 02 Jul 2005
Posts: 4

PostPosted: Sat Jul 02, 2005 7:37 pm    Post subject: Re: Grub does not boot Gentoo (but boots Debian and MSWinXP) Reply with quote

cyrillic wrote:

AoP wrote:

- then the machine's dead. I can only force a reboot by using the reset button.

Since you have a known good Debian kernel, you could try booting Gentoo with that. If this works, you would just need to reconfigure/recompile your Gentoo kernel so that it works properly.


Thanks for your instructions - booting the Debian kernel on the Gentoo root device worked indeed!
But I still have no clue what the difference between the two kernels would be - I'm sure I used the original .config-file.
Anyways, I'll try again and see what happens.
Thanks so far - I'll post the results of my next try.
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Sat Jul 02, 2005 9:03 pm    Post subject: Reply with quote

Does the Debian kernel add patches like the gentoo-sources kernel?

You should be able to share a kernel between the distros, and not need a different one for each one.
Back to top
View user's profile Send private message
AoP
n00b
n00b


Joined: 02 Jul 2005
Posts: 4

PostPosted: Sat Jul 02, 2005 9:54 pm    Post subject: Reply with quote

Headrush wrote:
Does the Debian kernel add patches like the gentoo-sources kernel?


I used the original sources from kernel.org but compiled a Debian-binary via make-kpkg instead of make && make modules_install.
But yes, Debian offers precompiled kernels for a number of x86-architectures and some "optimised" sources, too.

Headrush wrote:

You should be able to share a kernel between the distros, and not need a different one for each one.


Looks like I'll seriously have to consider that as an option, because my tries to recompile the kernel brought only the same result as described above.

Thanks everyone so far. I'm still open to suggestions, but at least I'll be able to work with Gentoo now.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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