LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Very quick question about GRUB... (https://www.linuxquestions.org/questions/linux-software-2/very-quick-question-about-grub-40797/)

Grim Reaper 01-08-2003 11:27 PM

Very quick question about GRUB...
 
My first time using it...and I'm having a little trouble understanding its partitioning theory...

I have one hdd, with 3 partitions.

The first being the boot partition, 32meg big, flagged with Bootable..

the next partition is my host distro (Slackware) and the next partition is my under construction LFS distro...

The GRUB boot files are on the boot partition obviously, and i want the root partition to be /dev/hda6 (which is the LFS partition)...

Grub loads fine, but the line that i have specifying where the kernel is because it comes up "File not found"

The line is as such:

kernel (hd0,0)/boot/bzImage root=/dev/hda6


how _should_ this line read with the above info?
hopefully somebody understands what im after..

EDIT:
Ignore this post, I got it goin! :D
I got it to work with this line:

kernel (hd0,0)/bzImage root=/dev/hda6

membrax 01-09-2003 02:13 AM

GRUB defines its own disk notation so that disk partitions and slices can be indicated, regardless of the operating system that they happen to hold. The following example shows the general disk syntax:

(hdn,p)
where n is the disk number (starting at 0), and p is the partition number (again, starting at 0). For example, the second partition on the third hard disk would be designated as:

(hd2,1)

For operating systems that further subdivide the hard-disk partition, this syntax adds a third field consisting of the (sub)partition letter within the slice (physical partition). For example, the a partition in the first slice on the first hard disk under FreeBSD would be designated as:

(hd0,0,a)









Some GRUB Recipes

We're now ready to look at the GRUB configuration file (grub.conf). Here are some sample lines from its first, general section:


# general section
splashimage (hd0,0)/grub/splash.xpm.gz Pretty picture behind the menu.
default 0 Default boot entry (numbering starts at 0).
timeout 30 Menu timeout period in seconds.
password -md5 xxxxxxx Use grub-md5-crypt to encode password.

These lines specify the image displayed behind the boot menu, the menu timeout period and default entry to boot, and the boot password.

The remainder of the file specifies the items on the boot menu. Here are two examples that boot the Linux operating system on the first partition on the first hard disk (selecting different kernels):

title Linux
root (hd0,0)
kernel /vmlinuz ro root=/dev/hda2
initrd /initrd.img

title Test-Linux
root (hd0,0)
kernel /vmlinuz-test ro root=/dev/hda3
initrd /initrd.img-test

The title lines indicate the menu item text. The root lines specify the partition where the boot loader is located. All directory references are assumed to be relative to the root of this partition. Thus, the location of the vmlinuz files specified in the kernel lines is in the root directory of this partition.

The kernel lines specify the path to the Linux kernel in each case, along with any parameters to be passed to it. In this case, a separate /boot partition is being used, so the root parameter is passed to the kernel; the latter indicates the location of the system root directory (such as /). Thus, we can tell that the kernel images reside at /boot/vmlinuz* from the point of view of the booted Linux system. The initrd lines similarly specify the path to the initrd.img file (if used).


All times are GMT -5. The time now is 01:27 AM.