Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GRUB always manages to find my kernel
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
ChrisAbela
n00b
n00b


Joined: 28 Apr 2012
Posts: 5

PostPosted: Sat Apr 28, 2012 8:26 pm    Post subject: GRUB always manages to find my kernel Reply with quote

This is my /boot/grub/grub.conf

Quote:
default 0
timeout 30

title Gentoo
root (hd0,0)
kernel /boot/kernel root=/dev/sda3

title Gentoo2
root (hd0,0)
kernel /kernel root=/dev/sda3


My installation process was copied from http://www.gentoo.org/doc/en/gentoo-x86-quickinstall.xml wherein the the kernel is referred as /boot/kernel. However Grub looks in /dev/sda1 for the kernel where it should find it under as /kernel, so I wrote Gentoo2.

I successfully boot from both Gentoo and Gentoo2. I confirm that /boot in /dev/sda3 is empty unless /dev/sda1 is mounted. Why?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Apr 28, 2012 8:53 pm    Post subject: Reply with quote

ChrisAbela,

Your system contains two places called /boot.

One is a directory on your root filesystem. This should always be empty as it used as a mount point to attach your boot partition when you want to install a new kernel.

Grub cannot use the filesystem tree to load the kernel, mostly because the filesystem tree doesn't exist until after the kernel is loaded and the init process is well underway.
If the kernel is loaded, grubs job is done.

Code:
title Gentoo
root (hd0,0)
kernel /boot/kernel root=/dev/sda3

and
Code:
title Gentoo2
root (hd0,0)
kernel /kernel root=/dev/sda3
both point to the same kernel file.
Its worth looking at the lines in your boot stanza.
The title line is use to populate the grub menu
The root (hd0,0) is grubspeak for where to find the files referenced further down the boot stanza. Thats the first partition on the first drive discovered by the BIOS. Normally /dev/sda1
The kernel line says to load a file called kernel in the top level of (hd0,0)
Indeed you can write
Code:
 kernel (hd0,0)/kernel ...
if you wish and not have a root (hd0,0) at all.
The rest of the kernel line is passed to the kernel as a space separated list of paramters. Grub does nothing with them at all.
_________________
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
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