/[gentoo]/xml/htdocs/doc/en/handbook/hb-install-x86+amd64-bootloader.xml
Gentoo

Diff of /xml/htdocs/doc/en/handbook/hb-install-x86+amd64-bootloader.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.37 Revision 1.38
2<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> 2<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3 3
4<!-- The content of this document is licensed under the CC-BY-SA license --> 4<!-- The content of this document is licensed under the CC-BY-SA license -->
5<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 5<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
6 6
7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-x86+amd64-bootloader.xml,v 1.37 2013/12/18 07:38:48 swift Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-x86+amd64-bootloader.xml,v 1.38 2013/12/18 10:13:54 swift Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<version>21</version> 11<version>22</version>
12<date>2013-12-18</date> 12<date>2013-12-18</date>
13 13
14<section> 14<section>
15<title>Making your Choice</title> 15<title>Making your Choice</title>
16<subsection> 16<subsection>
249default=gentoo <comment># When the timeout has passed, boot the "gentoo" section</comment> 249default=gentoo <comment># When the timeout has passed, boot the "gentoo" section</comment>
250 250
251image=/boot/<keyval id="kernel-name"/> 251image=/boot/<keyval id="kernel-name"/>
252 label=gentoo <comment># Name we give to this section</comment> 252 label=gentoo <comment># Name we give to this section</comment>
253 read-only <comment># Start with a read-only root. Do not alter!</comment> 253 read-only <comment># Start with a read-only root. Do not alter!</comment>
254 root=/dev/sda3 <comment># Location of the root filesystem</comment> 254 root=/dev/sda4 <comment># Location of the root filesystem</comment>
255 255
256image=/boot/<keyval id="kernel-name"/> 256image=/boot/<keyval id="kernel-name"/>
257 label=gentoo.rescue <comment># Name we give to this section</comment> 257 label=gentoo.rescue <comment># Name we give to this section</comment>
258 read-only <comment># Start with a read-only root. Do not alter!</comment> 258 read-only <comment># Start with a read-only root. Do not alter!</comment>
259 root=/dev/sda3 <comment># Location of the root filesystem</comment> 259 root=/dev/sda4 <comment># Location of the root filesystem</comment>
260 append="init=/bin/bb" <comment># Launch the Gentoo static rescue shell</comment> 260 append="init=/bin/bb" <comment># Launch the Gentoo static rescue shell</comment>
261 261
262<comment># The next two lines are only if you dualboot with a Windows system.</comment> 262<comment># The next two lines are only if you dualboot with a Windows system.</comment>
263<comment># In this case, Windows is hosted on /dev/sda6.</comment> 263<comment># In this example, Windows is hosted on /dev/sda6.</comment>
264other=/dev/sda6 264other=/dev/sda6
265 label=windows 265 label=windows
266</pre> 266</pre>
267 267
268<note> 268<note>
278 278
279<pre caption="LILO snippet for initramfs-enabled kernel builds"> 279<pre caption="LILO snippet for initramfs-enabled kernel builds">
280image=/boot/<keyval id="kernel-name"/> 280image=/boot/<keyval id="kernel-name"/>
281 label=gentoo 281 label=gentoo
282 read-only 282 read-only
283 <i>append="real_root=/dev/sda3"</i> 283 <i>append="real_root=/dev/sda4"</i>
284 <i>initrd=/boot/<keyval id="genkernel-initrd" /></i> 284 <i>initrd=/boot/<keyval id="genkernel-initrd" /></i>
285</pre> 285</pre>
286 286
287<p> 287<p>
288If you need to pass any additional options to the kernel, add an 288If you need to pass any additional options to the kernel, add an
292 292
293<pre caption="Using append to add kernel options"> 293<pre caption="Using append to add kernel options">
294image=/boot/<keyval id="kernel-name"/> 294image=/boot/<keyval id="kernel-name"/>
295 label=gentoo 295 label=gentoo
296 read-only 296 read-only
297 root=/dev/sda3 297 root=/dev/sda4
298 <i>append="video=uvesafb:mtrr,ywrap,1024x768-32@85"</i> 298 <i>append="video=uvesafb:mtrr,ywrap,1024x768-32@85"</i>
299</pre> 299</pre>
300 300
301<p> 301<p>
302If you're using a 2.6.7 or higher kernel and you jumpered your harddrive 302If you're using a 2.6.7 or higher kernel and you jumpered your harddrive
353<body> 353<body>
354 354
355<p> 355<p>
356The most critical part of understanding GRUB is getting comfortable with how 356The most critical part of understanding GRUB is getting comfortable with how
357GRUB refers to hard drives and partitions. Your Linux partition 357GRUB refers to hard drives and partitions. Your Linux partition
358<path>/dev/sda1</path> will most likely be called <path>(hd0,0)</path> under 358<path>/dev/sda2</path> will most likely be called <path>(hd0,1)</path> under
359GRUB. Notice the parentheses around the <path>hd0,0</path> - they are 359GRUB. Notice the parentheses around the <path>hd0,1</path> - they are
360required. 360required.
361</p> 361</p>
362 362
363<p> 363<p>
364Hard drives count from zero rather than "a" and partitions start at zero 364Hard drives count from zero rather than "a" and partitions start at zero
438default 0 438default 0
439<comment># How many seconds to wait before the default listing is booted.</comment> 439<comment># How many seconds to wait before the default listing is booted.</comment>
440timeout 30 440timeout 30
441<comment># Nice, fat splash-image to spice things up :) 441<comment># Nice, fat splash-image to spice things up :)
442# Comment out if you don't have a graphics card installed</comment> 442# Comment out if you don't have a graphics card installed</comment>
443splashimage=(hd0,0)/boot/grub/splash.xpm.gz 443splashimage=(hd0,1)/boot/grub/splash.xpm.gz
444 444
445title Gentoo Linux <keyval id="kernel-version"/> 445title Gentoo Linux <keyval id="kernel-version"/>
446<comment># Partition where the kernel image (or operating system) is located</comment> 446<comment># Partition where the kernel image (or operating system) is located</comment>
447root (hd0,0) 447root (hd0,1)
448kernel /boot/<keyval id="kernel-name"/> root=/dev/sda3 448kernel /boot/<keyval id="kernel-name"/> root=/dev/sda3
449 449
450title Gentoo Linux <keyval id="kernel-version"/> (rescue) 450title Gentoo Linux <keyval id="kernel-version"/> (rescue)
451<comment># Partition where the kernel image (or operating system) is located</comment> 451<comment># Partition where the kernel image (or operating system) is located</comment>
452root (hd0,0) 452root (hd0,1)
453kernel /boot/<keyval id="kernel-name"/> root=/dev/sda3 init=/bin/bb 453kernel /boot/<keyval id="kernel-name"/> root=/dev/sda3 init=/bin/bb
454 454
455<comment># The next four lines are only if you dualboot with a Windows system.</comment> 455<comment># The next four lines are only if you dualboot with a Windows system.</comment>
456<comment># In this case, Windows is hosted on /dev/sda6.</comment> 456<comment># In this case, Windows is hosted on /dev/sda6.</comment>
457title Windows XP 457title Windows XP
466initramfs file and telling the initramfs where your real root device is at: 466initramfs file and telling the initramfs where your real root device is at:
467</p> 467</p>
468 468
469<pre caption="GRUB snippet for initramfs-enabled kernel builds"> 469<pre caption="GRUB snippet for initramfs-enabled kernel builds">
470title Gentoo Linux <keyval id="kernel-version"/> 470title Gentoo Linux <keyval id="kernel-version"/>
471root (hd0,0) 471root (hd0,1)
472kernel /boot/<keyval id="kernel-version"/> <i>real_</i>root=/dev/sda3 472kernel /boot/<keyval id="kernel-version"/> <i>real_</i>root=/dev/sda3
473<i>initrd /boot/<keyval id="genkernel-initrd"/></i> 473<i>initrd /boot/<keyval id="genkernel-initrd"/></i>
474</pre> 474</pre>
475 475
476<p> 476<p>
477If you used a different partitioning scheme and/or kernel image, adjust 477If you used a different partitioning scheme and/or kernel image, adjust
478accordingly. However, make sure that anything that follows a GRUB-device (such 478accordingly. However, make sure that anything that follows a GRUB-device (such
479as <path>(hd0,0)</path>) is relative to the mountpoint, not the root. In other 479as <path>(hd0,1)</path>) is relative to the mountpoint, not the root. In other
480words, <path>(hd0,0)/grub/splash.xpm.gz</path> is in reality 480words, <path>(hd0,1)/grub/splash.xpm.gz</path> is in reality
481<path>/boot/grub/splash.xpm.gz</path> since <path>(hd0,0)</path> is 481<path>/boot/grub/splash.xpm.gz</path> since <path>(hd0,1)</path> is
482<path>/boot</path>. 482<path>/boot</path>.
483</p> 483</p>
484 484
485<p> 485<p>
486Besides, if you chose to use a different partitioning scheme and did not put 486Besides, if you chose to use a different partitioning scheme and did not put
617<p> 617<p>
618The tab completion mechanism of GRUB can be used from within GRUB. 618The tab completion mechanism of GRUB can be used from within GRUB.
619For instance, if you type in "<c>root (</c>" followed by a TAB, you will 619For instance, if you type in "<c>root (</c>" followed by a TAB, you will
620be presented with a list of devices (such as <path>hd0</path>). If you 620be presented with a list of devices (such as <path>hd0</path>). If you
621type in "<c>root (hd0,</c>" followed by a TAB, you will receive a list 621type in "<c>root (hd0,</c>" followed by a TAB, you will receive a list
622of available partitions to choose from (such as <path>hd0,0</path>). 622of available partitions to choose from (such as <path>hd0,1</path>).
623</p> 623</p>
624 624
625<p> 625<p>
626By using the tab completion, setting up GRUB should be not that hard. 626By using the tab completion, setting up GRUB should be not that hard.
627Now go on, configure GRUB, shall we? :-) 627Now go on, configure GRUB, shall we? :-)
628</p> 628</p>
629 629
630<pre caption="Installing GRUB in the MBR"> 630<pre caption="Installing GRUB in the MBR">
631grub&gt; <i>root (hd0,0)</i> <comment>(Specify where your /boot partition resides)</comment> 631grub&gt; <i>root (hd0,1)</i> <comment>(Specify where your /boot partition resides)</comment>
632grub&gt; <i>setup (hd0)</i> <comment>(Install GRUB in the MBR)</comment> 632grub&gt; <i>setup (hd0)</i> <comment>(Install GRUB in the MBR)</comment>
633grub&gt; <i>quit</i> <comment>(Exit the GRUB shell)</comment> 633grub&gt; <i>quit</i> <comment>(Exit the GRUB shell)</comment>
634</pre> 634</pre>
635 635
636<note> 636<note>
637If you want to install GRUB in a certain partition instead of the MBR, 637If you want to install GRUB in a certain partition instead of the MBR,
638you have to alter the <c>setup</c> command so it points to the right 638you have to alter the <c>setup</c> command so it points to the right
639partition. For instance, if you want GRUB installed in 639partition. For instance, if you want GRUB installed in
640<path>/dev/sda3</path>, then the command becomes <c>setup (hd0,2)</c>. 640<path>/dev/sda4</path>, then the command becomes <c>setup (hd0,4)</c>.
641Few users however want to do this. 641Few users however want to do this.
642</note> 642</note>
643 643
644<p> 644<p>
645If you have more questions regarding GRUB, please consult the <uri 645If you have more questions regarding GRUB, please consult the <uri

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38

  ViewVC Help
Powered by ViewVC 1.1.20