• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Gentoo and Grub troubles

Pakman117

Senior member
I installed gentoo via stage 2 last night, and I've finally reached the point where I can supposedly boot into it. I used the dev-sources (2.6.1) kernel, so this might be the issue. My hardware is as follows:

-Athlon 900Mhz Slot A (used the -march=athlon for my make.conf file)
-Abit KA7
-256 meg RAM
-Geforce 256 DDR

I followed the gentoo handbook to the T, and when I got to this step under "Compiling the Kernel (Part 7)":

Code listing 36: Compiling the kernel

(For x86-based systems, 2.4 kernel)
# make dep && make bzImage modules modules_install

(For other systems, 2.4 kernel)
# make dep && make vmlinux modules modules_install

(For amd64-based systems, 2.6 kernel)
# make bzImage modules modules_install

(For other systems, 2.6 kernel)
# make && make modules_install <-- I chose this option, since I was planning on using the 2.6.1 kernel


Then:

(For x86-based systems)
# cp arch/i386/boot/bzImage /boot/kernel-2.4.22
# cp System.map /boot/System.map-2.4.22

(For amd64-based systems)
# cp arch/x86_64/boot/bzImage /boot/kernel-2.4.22

(For other systems) <---------- I did this option
# cp vmlinux /boot/kernel-2.4.22
# cp System.map /boot/System.map-2.4.22

Now, when I try to boot using grub, it gives me "Error 13: Invalid or unsupported executable format". I researched this and this indicates it can't find an executable linux file, like vmlinux. However, following the commands I posted before, shouldn't it? I have the gentoo handbook's same file system configuration:

/dev/hda1 = /boot
/dev/hda2 = /swap
/dev/hda3 = /

The two lines I can change in grub are:

root(hd0,0)
kernel (hd0,0)/kernel-2.6.1 root=/dev/hda3 vga=788

Any ideas are greatly appreciated. Thanks.


 
I am just getting ready to install the 2.6.1 kernel in my system but this is one of my grub entries for my current 2.4.x kernels:
title=Gentoo Linux
root (hd0,0)
kernel /boot/bzImage root=/dev/hda3

Try making an entry that looks like that but changed to reflect whatever you call your kernel. The only other simple thing I can think of off the top of my head is that are you sure you had the /boot hda1 mounted when you copied the kernel files over? If you were doing it on the install it should have been mounted but it may not have been if you were doing other stuff or had rebooted the system (/boot is not mounted by default if you follow the gentoo install guide for security reasons I believe).

Gaidin
 
ok...I am a little confuse. I just finish d/l the grub iso disk 1 and 2 (x86-1.4-20030911-cd1.iso and x86-1.4-20030911-cd2.iso) How do I go about installing from what stage and as to what version is this. I thought its like 1.4 as to what you guys are saying 2.61 or 2.4x.
 
Maybe Im just confused cause Im tired...but am I readin this right?
(For other systems) <---------- I did this option
# cp vmlinux /boot/kernel-2.4.22
# cp System.map /boot/System.map-2.4.22
And...
root(hd0,0)
kernel (hd0,0)/kernel-2.6.1 root=/dev/hda3 vga=788
If the first line exactly what you did, then you copied a 2.4.22 kernel to your /boot dir, while your grub.conf lists a 2.6.1 kernel.
 
I changed that copy line slightly, so it was linux-2.6.1. I think my problem is that I choose that option, and not the x86 one. I'm going to try that real soon, unless someone knows how I can view my /usr/src/linux directory without being able to boot into linux.
 
Originally posted by: Pakman117
I think my problem is that I choose that option, and not the x86 one.
Quite possible. The "other" option copies the uncompressed kernel (vmlinux) to /boot. Typically, x86 systems use a compressed image (vmlinuz, note the "z"). Grub may not be able to boot an uncompressed image. It couldn't a while back, but I didn't find any definite answer about the current version in a quick search.

 
It turns out that was the problem. I had to do the x86 option, the one with the BzImage. I just booted with the liveCD, chrooted into my /usr/src/linux directory, and used the correct commands. Take note anyone who has the same problem. Thanks for the suggestions guys.
 
Back
Top