Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
grub problems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
tursiops
Apprentice
Apprentice


Joined: 29 May 2004
Posts: 158
Location: Switzerland

PostPosted: Wed Aug 11, 2004 1:50 pm    Post subject: grub problems Reply with quote

Hi!

I compiled my own kernel took from the latest sources from emerge, and I wanted grub to launch this new kernel, but there is no way to change the configuration...

What can I do?

Thanks!


Last edited by tursiops on Tue Aug 17, 2004 5:15 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54813
Location: 56N 3W

PostPosted: Wed Aug 11, 2004 1:54 pm    Post subject: Reply with quote

tursiops,

You need to add a re section to /boot/grub/grub.conf like this
Code:
default 3
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

# This bit starts an old kernel
title=Gentoo-Webcam (2.4.20)
root (hd0,0)
kernel (hd0,0)/boot/linux-2.4.20-gentoo-r7 root=/dev/hda5 hdc=ide-scsi hdd=ide-scsi

# This bit starts a new kernel
title=Kernel 2.6.6 IDE Writing
root (hd0,0)
kernel (hd0,0)/linux-2.6.6 root=/dev/hda5 hdc=ide-cd hdd=ide-cd
You will have to use your own kernel parameters, not mine.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
tursiops
Apprentice
Apprentice


Joined: 29 May 2004
Posts: 158
Location: Switzerland

PostPosted: Wed Aug 11, 2004 3:12 pm    Post subject: Reply with quote

But I don't have any grub folder nor grub.conf file... And grub still work, it's really weird.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54813
Location: 56N 3W

PostPosted: Wed Aug 11, 2004 3:36 pm    Post subject: Reply with quote

tursiops,

Its on /boot, which is not mounted by default. You need to say
Code:
mount /boot

If you didn't know that, your nice new kernel will be installed in the directory called /boot (on the root partition) not in the partition called /boot which uses the directory called /boot as a mount point.

The /boot partition has a dirextory called lost+found, the /boot directory does not, so you can tell the two places apart. If fact, the directory called /boot should be empty until the /boot partition is mounted there.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
tursiops
Apprentice
Apprentice


Joined: 29 May 2004
Posts: 158
Location: Switzerland

PostPosted: Fri Aug 13, 2004 1:49 pm    Post subject: Reply with quote

Hi!

Now I mounted the boot partition, and modified the grub.conf file.
It still doesn't work. When I try to launch the new kernel, It says no file found.

What can I do?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54813
Location: 56N 3W

PostPosted: Fri Aug 13, 2004 2:16 pm    Post subject: Reply with quote

tursiops,

After you built your kernel, you should have done
Code:
mount /boot
cp arch/i386/boot/bzImage /boot/<kernel_name>

If you forgot to mount /boot, it went to the wrong place.

Please post the output of
ls -al /boot (after boot is mounted) and the content of your grub.conf.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
tursiops
Apprentice
Apprentice


Joined: 29 May 2004
Posts: 158
Location: Switzerland

PostPosted: Sat Aug 14, 2004 11:21 am    Post subject: Reply with quote

Here is my output of the boot directory:

total 6292
drwxr-xr-x 4 root root 1024 Aug 12 20:04 .
drwxr-xr-x 18 root root 4096 Jul 31 14:39 ..
-rw-r--r-- 1 root root 0 Apr 13 01:21 .keep
-rw-r--r-- 1 root root 990669 Aug 12 20:19 System.map-2.6.7-gentoo-r12
lrwxrwxrwx 1 root root 1 Jun 9 16:26 boot -> .
-rw-r--r-- 1 root root 30831 Aug 12 20:20 config-2.6.7-gentoo-r12
drwxr-xr-x 2 root root 1024 Aug 12 20:27 grub
-rw-r--r-- 1 root root 1328153 Jun 9 17:27 initrd-2.6.5-gentoo-r1
-rw-r--r-- 1 root root 1969602 Jun 9 17:20 kernel-2.6.5-gentoo-r1
-rw-r--r-- 1 root root 2069735 Aug 12 20:19 kernel-2.6.7-gentoo-r12
drwx------ 2 root root 12288 Jun 9 15:58 lost+found

And here is my grub.conf file:

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

title=Gentoo Linux 2.6.5
root (hd0,0)
kernel /kernel-2.6.5-gentoo-r1 root=/dev/ram0 init=/linuxrc real_root=/dev/hda3 vga=792
initrd /initrd-2.6.5-gentoo-r1

title Gentoo Linux 2.6.7-r12
root (hd0,0)
kernel /kernel-2-6.7-gentoo
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54813
Location: 56N 3W

PostPosted: Sat Aug 14, 2004 2:30 pm    Post subject: Reply with quote

tursiops,

You have several problems. Looking at the content of /boot, your 2.6.7 kernel is called
Quote:
kernel-2.6.7-gentoo-r12
On its own, that OK.

Looking at grub.conf youo have used the name
Quote:
kernel-2-6.7-gentoo
On its own, thats OK too.

Taken togther, its a problem. Grub is looking for one kernel file any you have provided one with a different name. The names can be anything you want, but they must be the same in both places.

The other problem is that you haven't provided the new kernel with any parameters. A good start would be root=/dev/hda3 vga=792.

That will make your kernel line say
Code:
kernel /kernel-2-6.7-gentoo root=/dev/hda3 vga=792
before you fix the names.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
tursiops
Apprentice
Apprentice


Joined: 29 May 2004
Posts: 158
Location: Switzerland

PostPosted: Mon Aug 16, 2004 6:30 pm    Post subject: Reply with quote

Hi!

I've just done what you said but it still say that the file cannot be found.

What can I do more?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54813
Location: 56N 3W

PostPosted: Mon Aug 16, 2004 6:49 pm    Post subject: Reply with quote

tursiops,

Post ls -al /boot and the content of grub.conf again
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
tursiops
Apprentice
Apprentice


Joined: 29 May 2004
Posts: 158
Location: Switzerland

PostPosted: Tue Aug 17, 2004 12:20 pm    Post subject: Reply with quote

Everything is the same, I just changed the grub.conf file exactly as you told me to.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54813
Location: 56N 3W

PostPosted: Tue Aug 17, 2004 4:31 pm    Post subject: Reply with quote

tursiops,

I left it for you to resolve the mismatched names between what grub.conf says and the name of the kernel in /boot

The
Quote:
Code:
kernel /kernel-2-6.7-gentoo root=/dev/hda3 vga=792
was not intended to work - just illustrate a point.

Match the names exactly, and you should be away.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
tursiops
Apprentice
Apprentice


Joined: 29 May 2004
Posts: 158
Location: Switzerland

PostPosted: Tue Aug 17, 2004 5:17 pm    Post subject: Reply with quote

So what's intended to work? I don't have a clue right now....
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54813
Location: 56N 3W

PostPosted: Tue Aug 17, 2004 5:39 pm    Post subject: Reply with quote

tursiops,

Your kernel is called /boot/kernel-2.6.7-gentoo-r12

So a kernel line in grub.conf of
kernel /kernel-2-6.7-gentoo-r12 root=/dev/hda3 vga=792

would be a good place to start. The bits in bold must match exactly.

This in place of the last line of this bit in grub.conf:-
Quote:
title Gentoo Linux 2.6.7-r12
root (hd0,0)
kernel /kernel-2-6.7-gentoo

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
tursiops
Apprentice
Apprentice


Joined: 29 May 2004
Posts: 158
Location: Switzerland

PostPosted: Tue Aug 17, 2004 6:08 pm    Post subject: Reply with quote

So now my grub.conf will look like this:

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

title=Gentoo Linux 2.6.5
root (hd0,0)
kernel /kernel-2.6.5-gentoo-r1 root=/dev/ram0 init=/linuxrc real_root=/dev/hda3 vga=792
initrd /initrd-2.6.5-gentoo-r1

title Gentoo Linux 2.6.7-r12
root (hd0,0)
kernel /kernel-2-6.7-gentoo-r12 root=/dev/hda3 vga=792

Is it ok?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54813
Location: 56N 3W

PostPosted: Tue Aug 17, 2004 6:13 pm    Post subject: Reply with quote

tursiops,

That looks good what happened when you tried it ?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
tursiops
Apprentice
Apprentice


Joined: 29 May 2004
Posts: 158
Location: Switzerland

PostPosted: Wed Aug 18, 2004 11:03 am    Post subject: Reply with quote

Same problem, "file not found"
Back to top
View user's profile Send private message
ja_david
n00b
n00b


Joined: 18 Aug 2004
Posts: 1

PostPosted: Wed Aug 18, 2004 2:45 pm    Post subject: Reply with quote

I had the same problem yesterday. (I'm a newbie and installing my first gentoo form last friday :) ). And I don't know why, but helped me this:
root (hd0,0)
kernel (hd0,0)/boot/kernel ...etc.

So just try to add whole path to your kernel.
Back to top
View user's profile Send private message
tursiops
Apprentice
Apprentice


Joined: 29 May 2004
Posts: 158
Location: Switzerland

PostPosted: Thu Aug 19, 2004 3:19 pm    Post subject: Reply with quote

I tried to add boot/ before kernel, but there no way to getting it work :-(
Back to top
View user's profile Send private message
tursiops
Apprentice
Apprentice


Joined: 29 May 2004
Posts: 158
Location: Switzerland

PostPosted: Sun Aug 22, 2004 1:01 pm    Post subject: Reply with quote

Hi all!

It's solved now, I just had to replace the - for a . and it works!

Thanks all!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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