diff options
author | Francis Rowe <info@gluglug.org.uk> | 2015-06-08 20:52:46 (EDT) |
---|---|---|
committer | Francis Rowe <info@gluglug.org.uk> | 2015-06-08 20:52:46 (EDT) |
commit | 8507c6adf8a3af268b8a7493339be253abb35c71 (patch) | |
tree | e0dbb0b06dcc621bf35a0d2a414c7f3ec4d611e2 /docs | |
parent | 111a64f90b5d123ff53363c9ed683cff8b95c685 (diff) | |
download | libreboot-8507c6adf8a3af268b8a7493339be253abb35c71.zip libreboot-8507c6adf8a3af268b8a7493339be253abb35c71.tar.gz libreboot-8507c6adf8a3af268b8a7493339be253abb35c71.tar.bz2 |
docs/gnulinux/grub_cbfs.html: split GRUB config guides to new doc
Diffstat (limited to 'docs')
-rw-r--r-- | docs/gnulinux/grub_cbfs.html | 133 | ||||
-rw-r--r-- | docs/gnulinux/grub_config.html | 160 | ||||
-rw-r--r-- | docs/gnulinux/index.html | 9 |
3 files changed, 184 insertions, 118 deletions
diff --git a/docs/gnulinux/grub_cbfs.html b/docs/gnulinux/grub_cbfs.html index 1813629..82cbc4b 100644 --- a/docs/gnulinux/grub_cbfs.html +++ b/docs/gnulinux/grub_cbfs.html @@ -8,12 +8,12 @@ @import url('../css/main.css'); </style> - <title>Libreboot documentation: GRUB menu</title> + <title>How to replace the default GRUB configuration file on a libreboot system</title> </head> <body> <div class="section"> - <h1 id="pagetop">How to change your default GRUB menu</h1> + <h1 id="pagetop">How to replace the default GRUB configuration file on a libreboot system</h1> <p> Libreboot uses the GRUB <a href="http://www.coreboot.org/Payloads#GRUB_2">payload</a> by default, which means that the GRUB configuration file @@ -63,13 +63,6 @@ <li><a href="#re-use_rom">Re-use the currently flashed ROM image</a></li> </ul> <li><a href="#extract_grubtest">Extract grubtest from the ROM image</a> - <li> - <a href="#example_modifications">Example modifications for <i>grubtest.cfg</i></a> - <ul> - <li><a href="#example_modifications_trisquel">Trisquel GNU/Linux-libre</a></li> - <li><a href="#example_modifications_parabola">Parabola GNU/Linux-libre</a></li> - </ul> - </li> <li><a href="#reinsert_modified_grubtest">Re-insert the modified grubtest.cfg into the ROM image</a></li> <li><a href="#test_it">Test it!</a> <li><a href="#final_steps">Final steps</a></li> @@ -145,6 +138,11 @@ </p> <p> + This is all well and good, but what should you actually put in your GRUB configuration file? + Read <a href="grub_config.html">grub_config.html</a> for more information. + </p> + + <p> <a href="#pagetop">Back to top of page.</a> </p> @@ -286,7 +284,12 @@ </p> <p> - Now you have a grubtest.cfg in the cbfstool directory. Edit it however you wish. + Now you have a grubtest.cfg in the cbfstool directory. + </p> + + <p> + This is all well and good, but what should you actually put in your GRUB configuration file? + Read <a href="grub_config.html">grub_config.html</a> for more information. </p> <p> @@ -296,116 +299,14 @@ </div> <div class="section"> - <h2 id="example_modifications">Example modifications for <i>grubtest.cfg</i></h2> - - <p> - These are some common examples of ways in which the grubtest.cfg file can be modified. - </p> - - - <div class="subsection"> - <h3 id="example_modifications_trisquel">Trisquel GNU/Linux-libre</h3> - - <p> - As an example, on my test system in /boot/grub/grub.cfg (on the HDD/SSD) I see for the main menu entry: - </p> - <ul> - <li><b>linux /boot/vmlinuz-3.15.1-gnu.nonpae root=UUID=3a008e14-4871-497b-95e5-fb180f277951 ro crashkernel=384M-2G:64M,2G-:128M quiet splash $vt_handoff</b></li> - <li><b>initrd /boot/initrd.img-3.15.1-gnu.nonpae</b></li> - </ul> - - <p> - <b>ro</b>, <b>quiet</b>, <b>splash</b>, <b>crashkernel=384M-2G:64M,2G-:128M</b> and - <b>$vt_handoff</b> can be safely ignored. - </p> - - <p> - I use this to get my partition layout:<br/> - $ <b>lsblk</b> - </p> - - <p> - In my case, I have no /boot partition, instead /boot is on the same partition as / on sda1. - Yours might be different. In GRUB terms, sda means ahci0. 1 means msdos1, or gpt1, depending - on whether I am using MBR or GPT partitioning. Thus, /dev/sda1 is GRUB is (ahci0,msdos1) or - (ahci0,gpt1). In my case, I use MBR partitioning so it's (ahci0,msdos1). - 'msdos' is a GRUB name simply because this partitioning type is traditionally used by MS-DOS. - It doesn't mean that you have a proprietary OS. - </p> - - <p> - Trisquel doesn't keep the filenames of kernels consistent, instead it keeps old kernels and - new kernel updates are provided with the version in the filename. This can make GRUB payload - a bit tricky. Fortunately, there are symlinks /vmlinuz and /initrd.img - so if your /boot and / are on the same partition, you can set GRUB to boot from that. - These are also updated automatically when installing kernel updates from your distributions - apt-get repositories. - <b> - Note: when using <a href="http://jxself.org/linux-libre">jxself kernel releases</a>, - these are not updated at all and you have to update them manually. - </b> - </p> - - <p> - For the GRUB payload grubtest.cfg (in the 'Load Operating System' menu entry), we therefore have (in this example):<br/> - <b>set root='ahci0,msdos1'</b><br/> - <b>linux /vmlinuz root=UUID=3a008e14-4871-497b-95e5-fb180f277951</b><br/> - <b>initrd /initrd.img</b> - </p> - - <p> - Optionally, you can convert the UUID to its real device name, for example /dev/sda1 in this case. - sdX naming isn't very reliable, though, which is why UUID is used for most distributions. - </p> - - <p> - Alternatively, if your /boot is on a separate partition then you cannot rely on the /vmlinuz and /initrd.img symlinks. - Instead, go into /boot and create your own symlinks (update them manually when you install a new kernel update).<br/> - $ <b>sudo -s</b><br/> - # <b>cd /boot/</b><br/> - # <b>rm -Rf vmlinuz initrd.img</b><br/> - # <b>ln -s <u>kernel</u> ksym</b><br/> - # <b>ln -s <u>initrd</u> isym</b><br/> - # <b>exit</b> - </p> - - <p> - Replace the underlined <b>kernel</b> and <b>initrd</b> filenames above with the actual filenames, of course. - </p> - - <p> - Then your grubtest.cfg menu entry (for payload) becomes like that, for example if / was on sda2 and /boot was on sda1:<br/> - <b>set root='ahci0,msdos1'</b><br/> - <b>linux /ksym root=/dev/sda2</b><br/> - <b>initrd /isym</b> - </p> - - <p> - There are lots of possible variations so please try to adapt. - </p> - - </div> - - <div class="subsection"> - <h3 id="example_modifications_parabola">Parabola GNU/Linux-libre</h3> - - <p> - You can basically adapt the above. Note however that Parabola does not keep old kernels still installed, and the file names - are always consistent, so you don't need to boot from symlinks, you can just use the real thing directly. - </p> - </div> - - <p> - <a href="#pagetop">Back to top of page.</a> - </p> - - </div> - - <div class="section"> <h2 id="reinsert_modified_grubtest">Re-insert the modified grubtest.cfg into the ROM image</h2> <p> + So you've created your configuration. Now, how do you use it? + </p> + + <p> Delete the grubtest.cfg that remained inside the ROM:<br/> <b>$ ./cbfstool libreboot.rom remove -n grubtest.cfg</b> </p> diff --git a/docs/gnulinux/grub_config.html b/docs/gnulinux/grub_config.html new file mode 100644 index 0000000..2891ebc --- /dev/null +++ b/docs/gnulinux/grub_config.html @@ -0,0 +1,160 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + + <style type="text/css"> + @import url('../css/main.css'); + </style> + + <title>Writing a GRUB configuration file</title> +</head> + +<body> + <div class="section"> + <h1 id="pagetop">Writing a GRUB configuration file</h1> + + <p> + <a href="index.html">Back to index</a> + </p> + </div> + + <div class="section"> + + <h1>Table of Contents</h1> + + <li> + <a href="#example_modifications">Example modifications for <i>grubtest.cfg</i></a> + <ul> + <li><a href="#example_modifications_trisquel">Trisquel GNU/Linux-libre</a></li> + <li><a href="#example_modifications_parabola">Parabola GNU/Linux-libre</a></li> + </ul> + </li> + + </div> + + <div class="section"> + <h2 id="example_modifications">Example modifications for <i>grubtest.cfg</i></h2> + + <p> + These are some common examples of ways in which the grubtest.cfg file can be modified. + </p> + + + <div class="subsection"> + <h3 id="example_modifications_trisquel">Trisquel GNU/Linux-libre</h3> + + <p> + As an example, on my test system in /boot/grub/grub.cfg (on the HDD/SSD) I see for the main menu entry: + </p> + <ul> + <li><b>linux /boot/vmlinuz-3.15.1-gnu.nonpae root=UUID=3a008e14-4871-497b-95e5-fb180f277951 ro crashkernel=384M-2G:64M,2G-:128M quiet splash $vt_handoff</b></li> + <li><b>initrd /boot/initrd.img-3.15.1-gnu.nonpae</b></li> + </ul> + + <p> + <b>ro</b>, <b>quiet</b>, <b>splash</b>, <b>crashkernel=384M-2G:64M,2G-:128M</b> and + <b>$vt_handoff</b> can be safely ignored. + </p> + + <p> + I use this to get my partition layout:<br/> + $ <b>lsblk</b> + </p> + + <p> + In my case, I have no /boot partition, instead /boot is on the same partition as / on sda1. + Yours might be different. In GRUB terms, sda means ahci0. 1 means msdos1, or gpt1, depending + on whether I am using MBR or GPT partitioning. Thus, /dev/sda1 is GRUB is (ahci0,msdos1) or + (ahci0,gpt1). In my case, I use MBR partitioning so it's (ahci0,msdos1). + 'msdos' is a GRUB name simply because this partitioning type is traditionally used by MS-DOS. + It doesn't mean that you have a proprietary OS. + </p> + + <p> + Trisquel doesn't keep the filenames of kernels consistent, instead it keeps old kernels and + new kernel updates are provided with the version in the filename. This can make GRUB payload + a bit tricky. Fortunately, there are symlinks /vmlinuz and /initrd.img + so if your /boot and / are on the same partition, you can set GRUB to boot from that. + These are also updated automatically when installing kernel updates from your distributions + apt-get repositories. + <b> + Note: when using <a href="http://jxself.org/linux-libre">jxself kernel releases</a>, + these are not updated at all and you have to update them manually. + </b> + </p> + + <p> + For the GRUB payload grubtest.cfg (in the 'Load Operating System' menu entry), we therefore have (in this example):<br/> + <b>set root='ahci0,msdos1'</b><br/> + <b>linux /vmlinuz root=UUID=3a008e14-4871-497b-95e5-fb180f277951</b><br/> + <b>initrd /initrd.img</b> + </p> + + <p> + Optionally, you can convert the UUID to its real device name, for example /dev/sda1 in this case. + sdX naming isn't very reliable, though, which is why UUID is used for most distributions. + </p> + + <p> + Alternatively, if your /boot is on a separate partition then you cannot rely on the /vmlinuz and /initrd.img symlinks. + Instead, go into /boot and create your own symlinks (update them manually when you install a new kernel update).<br/> + $ <b>sudo -s</b><br/> + # <b>cd /boot/</b><br/> + # <b>rm -Rf vmlinuz initrd.img</b><br/> + # <b>ln -s <u>kernel</u> ksym</b><br/> + # <b>ln -s <u>initrd</u> isym</b><br/> + # <b>exit</b> + </p> + + <p> + Replace the underlined <b>kernel</b> and <b>initrd</b> filenames above with the actual filenames, of course. + </p> + + <p> + Then your grubtest.cfg menu entry (for payload) becomes like that, for example if / was on sda2 and /boot was on sda1:<br/> + <b>set root='ahci0,msdos1'</b><br/> + <b>linux /ksym root=/dev/sda2</b><br/> + <b>initrd /isym</b> + </p> + + <p> + There are lots of possible variations so please try to adapt. + </p> + + </div> + + <div class="subsection"> + <h3 id="example_modifications_parabola">Parabola GNU/Linux-libre</h3> + + <p> + You can basically adapt the above. Note however that Parabola does not keep old kernels still installed, and the file names + are always consistent, so you don't need to boot from symlinks, you can just use the real thing directly. + </p> + </div> + + <p> + <a href="#pagetop">Back to top of page.</a> + </p> + + </div> + + <div class="section"> + + <p> + Copyright © 2014, 2015 Francis Rowe <info@gluglug.org.uk><br/> + This document is released under the Creative Commons Attribution-ShareAlike 4.0 International Public License and all future versions. + A copy of the license can be found at <a href="../cc-by-sa-4.txt">../cc-by-sa-4.txt</a>. + </p> + + <p> + This document is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See <a href="../cc-by-sa-4.txt">../cc-by-sa-4.txt</a> for more information. + </p> + + </div> + +</body> +</html> diff --git a/docs/gnulinux/index.html b/docs/gnulinux/index.html index 341681d..7c420f6 100644 --- a/docs/gnulinux/index.html +++ b/docs/gnulinux/index.html @@ -24,8 +24,13 @@ <a href="../index.html">Back to previous index</a>. </p> <ul> - <li><a href="grub_boot_installer.html">How to install a GNU/Linux distribution</a></li> - <li><a href="grub_cbfs.html">How to change your default GRUB menu</a></li> + <li><a href="grub_boot_installer.html">How to install GNU/Linux on a libreboot system</a></li> + <li> + <a href="grub_cbfs.html">How to replace the default GRUB configuration file on a libreboot system</a> + <ul> + <li><a href="grub_config.html">Writing a GRUB configuration file</a></li> + </ul> + </li> <li> <a href="encrypted_parabola.html">Installing Parabola GNU/Linux-libre with full disk encryption (including /boot)</a> <ul> |