The grub convention for drives and partitions is as follows:
(hd<d>,<p>)
Drive
sda => make <d> 0
sdb => make <d> 1
sdc => make <d> 2
etc.
Partition
1 => make <p> 0
2 => make <p> 1
3 => make <p> 2
etc.
Thus e.g. /dev/sda5 would be (hd0,4)
To configure grub, run it as root in a Terminal window:
a) If you have, or want, grub installed in the MBR then do the following:
# grub
grub> root (hd0,2) <-- specify partition where grub is to reside (sda3 in this example)
grub> setup (hd0,0) <-- install grub in MBR (sda1 in this example)
grub> quit
b) If you have, or want, grub installed in a Linux partition rather than the MBR then do the following:
# grub
grub> root (hd0,2) <-- specify where partition containing /boot resides (sda3 in this example)
grub> setup (hd0,2) <-- install grub in /boot (sda3 in this example)
grub> quit
My /boot/grub/grub.conf file corresponding the (b) above looks like this:
- Code: Select all
# grub.conf generated by the Sabayon Linux Installer
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,2)
# kernel /kernel-genkernel real_root=/dev/sda6
# initrd /initramfs-genkernel
#boot=sda3
default=0
timeout=10
splashimage=(hd0,2)/grub/splash.xpm.gz
password --md5 $1$s0K6ZclI$MTvmWuyvIPrzYz2npKAix/
title=Sabayon Linux x86-64 (2.6.29-sabayon)
root (hd0,2)
kernel /kernel-genkernel-x86_64-2.6.29-sabayon root=/dev/ram0 ramdisk=8192 real_root=/dev/sda6 quiet init=/linuxrc splash=silent,theme:sabayon vga=791 CONSOLE=/dev/tty1 elevator=as nopat resume=swap:/dev/sda7
initrd /initramfs-genkernel-x86_64-2.6.29-sabayon
title Sabayon Linux x86-64 (2.6.29-sabayon) (safe mode)
root (hd0,2)
kernel /kernel-genkernel-x86_64-2.6.29-sabayon root=/dev/ram0 ramdisk=8192 real_root=/dev/sda6 init=/linuxrc CONSOLE=/dev/tty1 resume=swap:/dev/sda7 nox acpi=off ide=nodma vga=normal
initrd /initramfs-genkernel-x86_64-2.6.29-sabayon
title Sabayon Linux x86-64 (genkernel-x86_64-2.6.27-sabayon)
root (hd0,2)
kernel /kernel-genkernel-x86_64-2.6.27-sabayon root=/dev/ram0 ramdisk=8192 real_root=/dev/sda6 quiet init=/linuxrc splash=silent,theme:sabayon vga=791 CONSOLE=/dev/tty1 elevator=as nopat resume=swap:/dev/sda7
initrd /initramfs-genkernel-x86_64-2.6.27-sabayon
title Microsoft Windows XP Professional
rootnoverify (hd0,1)
chainloader +1
Notice that the rootnoverify command for the Grub Windows XP menu entry is hd0,1 = sda2, i.e. my Windows XP partition to boot is sda2, which happens to be my Windows XP C: drive.
Maybe you just need to boot a LiveDVD/CD and edit your /boot/grub/grub.conf to point to the correct partition.
See also the post
Re: Re-loaded/Updated packages and now no access to Sabayon