|
⇤ ← Revision 1 as of 2005-03-25 13:12:52
Size: 629
Comment:
|
Size: 2358
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 2: | Line 2: |
| Oops. | = GRUB = ---- |
| Line 4: | Line 5: |
| I deleted this page accidentally, while purging Spam. | == Configuration == The GRUB configuration file is /boot/grub/menu.lst. In some places you will see references to /etc/grub.conf, but that file does not exists in debian (note: at least not in my machine) |
| Line 6: | Line 8: |
| Here's Google's cached version. | It must contain at least these lines: {{{ default=0 timeout=30 # To boot the default kernel title Debian Linux root (hd0,1) kernel /boot/vmlinuz root=LABEL=/ initrd /boot/initrd.img }}} |
| Line 8: | Line 19: |
| GRUB | == Quick command overview == * '''default''': the default OS to boot if you do not hit any key (surprised?). Note the first is the 0. * '''timeout:''' the time in seconds to wait before the default OS is booted. * '''tittle:''' the text that is going to appear in the menu. Starts a OS section until other ''tittle'' line is found. * '''root:''' the partition where /boot directory is. All paths will be relative to this partition, so we do not need to especify it for each file * '''kernel:''' the linux kernel image to load along with all the options for it * '''initrd:''' the initrd image to boot the kernel with. |
| Line 10: | Line 27: |
| Please note that the paths are relative to the partion. If you have a /boot partition the you should write: {{{ kernel ''vmlinuz root=LABEL='' initrd /initrd.img }}} |
|
| Line 11: | Line 33: |
| == GRUB device and partition naming == Grub uses numbers to name hard disk and partitions begining with 0. This is a bit confusing for the linux user used to call hda1 the first disk - first partition. A simple table illustrates it: |
|
| Line 12: | Line 36: |
| The GRUB configuration file is /boot/grub/grub.conf that has SymLink s to /boot/grub/menu.lst and /etc/grub.conf | || || linux || grub || || First IDE bus, master || hda || hd0 || || First IDE bus, master, first primary partition || hda1 || hd0,0 || || First IDE bus, slave, first extended partition || hdb5 || hd1,4 || |
| Line 14: | Line 41: |
| If you do not know where /boot lives just exec grub and try to find a file, example: {{{ grub> kernel (hd0,1)/bo }}} |
|
| Line 15: | Line 46: |
| /boot/grub/grub.conf | And press tab, if boot is found in that partition the line will be completed. This works also on the boot menu. For example, I have windoze in hda1 a /boot partition on hda2: {{{ grub> kernel (hd0,0)/vm (<- I press TAB here) Error 15: File not found }}} {{{ grub> kernel (hd0,1)/vm (<- I press TAB again, then completes to vmlinuz) Possible files are: vmlinuz-2.6.10-1-k7 vmlinuz.old vmlinuz-2.6.11.old vmlinuz vmlinuz-2.6.11 }}} |
| Line 17: | Line 56: |
It must contain at least this lines: default=0 timeout=30 title Debian Linux (2.4.) root (hd0,7) Kernel /vmlinuz-2.4.22-1 root=LABEL=/ initrd /initrd-2.4.22.img The first line is the text that is going to appear in the menu. The second is the /boot directory path. The third is the kernel to load. initrd is optional. |
So I see /boot is in hd0,1 |
GRUB
Configuration
The GRUB configuration file is /boot/grub/menu.lst. In some places you will see references to /etc/grub.conf, but that file does not exists in debian (note: at least not in my machine)
It must contain at least these lines:
default=0 timeout=30 # To boot the default kernel title Debian Linux root (hd0,1) kernel /boot/vmlinuz root=LABEL=/ initrd /boot/initrd.img
Quick command overview
default: the default OS to boot if you do not hit any key (surprised?). Note the first is the 0.
timeout: the time in seconds to wait before the default OS is booted.
tittle: the text that is going to appear in the menu. Starts a OS section until other tittle line is found.
root: the partition where /boot directory is. All paths will be relative to this partition, so we do not need to especify it for each file
kernel: the linux kernel image to load along with all the options for it
initrd: the initrd image to boot the kernel with.
Please note that the paths are relative to the partion. If you have a /boot partition the you should write:
kernel ''vmlinuz root=LABEL='' initrd /initrd.img
GRUB device and partition naming
Grub uses numbers to name hard disk and partitions begining with 0. This is a bit confusing for the linux user used to call hda1 the first disk - first partition. A simple table illustrates it:
|
linux |
grub |
First IDE bus, master |
hda |
hd0 |
First IDE bus, master, first primary partition |
hda1 |
hd0,0 |
First IDE bus, slave, first extended partition |
hdb5 |
hd1,4 |
If you do not know where /boot lives just exec grub and try to find a file, example:
grub> kernel (hd0,1)/bo
And press tab, if boot is found in that partition the line will be completed. This works also on the boot menu. For example, I have windoze in hda1 a /boot partition on hda2:
grub> kernel (hd0,0)/vm (<- I press TAB here) Error 15: File not found
grub> kernel (hd0,1)/vm (<- I press TAB again, then completes to vmlinuz) Possible files are: vmlinuz-2.6.10-1-k7 vmlinuz.old vmlinuz-2.6.11.old vmlinuz vmlinuz-2.6.11
So I see /boot is in hd0,1
