LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Gentoo (https://www.linuxquestions.org/questions/gentoo-87/)
-   -   GRUB editing ? (https://www.linuxquestions.org/questions/gentoo-87/grub-editing-752343/)

vibinlakshman 09-03-2009 05:12 AM

GRUB editing ?
 
I'm trying to install fresh Gentoo installation in /dev/sda6 , so what would be the argument for "root" in GRUB menulist

jomen 09-03-2009 07:56 AM

There are two places where the word "root" is used.

root (hd0,5)
would mean /dev/hda6 or /dev/sda6
and is the place where the grub files are - this is the place of the /boot directory

Then there is the kernel line - which looks something like this:
kernel /vmlinuz-2.6.30-gentoo-r4 root=/dev/hda6 vga=792

/vmlinuz-xxx here is relative to the previously set root (hd0,5)

it means the path: /boot/vmlinuz-xxx

and
root=/dev/hda6 is the partition holding the filesystems /

If you have no separate partition for /boot then these are the same.

root (hd0,5) is the grub way of saying: /dev/hda6 - it starts to count from 0 for the 1-st partition

HTH

vibinlakshman 09-03-2009 11:29 PM

Quote:

Originally Posted by jomen (Post 3668209)
There are two places where the word "root" is used.

root (hd0,5)
would mean /dev/hda6 or /dev/sda6
and is the place where the grub files are - this is the place of the /boot directory

Then there is the kernel line - which looks something like this:
kernel /vmlinuz-2.6.30-gentoo-r4 root=/dev/hda6 vga=792

/vmlinuz-xxx here is relative to the previously set root (hd0,5)

it means the path: /boot/vmlinuz-xxx

and
root=/dev/hda6 is the partition holding the filesystems /


HTH

Yes I understood ,but one thing to clarify

title Gentoo {Testing ..}
root (hd0,5)
kernel /boot/linux-2.6.30-gentoo-r5 root=/dev/sda6

This is my menulist content for Gentoo , but after that /boot I dont have that vmlinuz , instead this I'm having starting as (linux-2.6..) .
Is there any fault , coz I'm having Grub Error 15 while trying to execute Gentoo

jomen 09-04-2009 02:41 AM

Did you use the handbook?
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml
It specifically suggests to have a separate /boot partition.

If you use the
make menuconfig,
make,
make install,
make install_modules
routine of building the kernel - then you will have a file "vmlinuz" as well as a file vmlinuz-2.6.30-gentoo-r5
if you install kernel 2.6.30-gentoo-r5
They are both the same.

and end up with something similar to this (my actual install - I have the previous kernel-version there also)
Code:

ls -lh /boot/
total 12M
-rw-r--r-- 1 root root 836K Sep  4 01:40 System.map
-rw-r--r-- 1 root root 826K Aug 13 21:13 System.map-2.6.30-gentoo-r4
-rw-r--r-- 1 root root 836K Sep  4 01:40 System.map-2.6.30-gentoo-r5
-rw-r--r-- 1 root root 839K Aug 22 20:00 System.map-2.6.30-gentoo-r5.old
-rw-r--r-- 1 root root 839K Aug 22 20:00 System.map.old
lrwxrwxrwx 1 root root    1 Aug 11 15:01 boot -> .
-rw-r--r-- 1 root root  69K Sep  4 01:40 config
-rw-r--r-- 1 root root  69K Aug 13 21:13 config-2.6.30-gentoo-r4
-rw-r--r-- 1 root root  69K Sep  4 01:40 config-2.6.30-gentoo-r5
-rw-r--r-- 1 root root  69K Aug 22 20:00 config-2.6.30-gentoo-r5.old
-rw-r--r-- 1 root root  69K Aug 22 20:00 config.old
drwxr-xr-x 2 root root 4.0K Aug 23 01:19 grub
-rw-r--r-- 1 root root 1.4M Sep  4 01:40 vmlinuz
-rw-r--r-- 1 root root 1.6M Aug 13 21:13 vmlinuz-2.6.30-gentoo-r4
-rw-r--r-- 1 root root 1.4M Sep  4 01:40 vmlinuz-2.6.30-gentoo-r5
-rw-r--r-- 1 root root 1.5M Aug 22 20:00 vmlinuz-2.6.30-gentoo-r5.old
-rw-r--r-- 1 root root 1.5M Aug 22 20:00 vmlinuz.old

If /boot is empty then you made an error.
Know if you use a separate partition for /boot - which has to be mounted - or if you don't.

If there is a problem, verify the steps into chroot are correct.
1.) mount your / partition
2.) create a /boot directory there (just once)
3.) mount the other partition - the small one which will hold grub and kernel - onto the /boot directory of the first partition.
http://www.gentoo.org/doc/en/handboo...ap=4#doc_chap5
Skip 2.) and 3.) if you just use one partition.

This might help too:
http://www.gentoo.org/doc/en/grub-er....xml#doc_chap4

sploot 09-13-2009 11:37 AM

Quote:

Originally Posted by jomen (Post 3668209)
root (hd0,5)
would mean /dev/hda6 or /dev/sda6
and is the place where the grub files are - this is the place of the /boot directory

Could it also be the case that if both /dev/hda and /dev/sda are present, the boot partition is actually located on root(hd1,5)?

Just a thought.

--Sploot


All times are GMT -5. The time now is 10:17 PM.