grub_boot_installer.html 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <style type="text/css">
  7. @import url('../css/main.css');
  8. </style>
  9. <title>How to install GNU/Linux on a libreboot system</title>
  10. </head>
  11. <body>
  12. <div id="pagetop" class="section">
  13. <h1>How to install GNU/Linux on a libreboot system</h1>
  14. <p>
  15. This section relates to preparing, booting and installing a
  16. GNU/Linux distribution on your libreboot system, using nothing more than a USB flash drive (and <i>dd</i>).
  17. </p>
  18. <ul>
  19. <li><a href="#prepare">Prepare the USB drive (in GNU/Linux)</a></li>
  20. <li><a href="#encryption">Installing GNU/Linux with full disk encryption</a></li>
  21. <li><a href="#guix">GNU Guix System Distribution? (or NixOS?)</a></li>
  22. <li><a href="#trisquel_netinstall">Trisquel net install?</a></li>
  23. <li><a href="#parse_isolinux">Booting ISOLINUX images (automatic method)</a></li>
  24. <li><a href="#manual_isolinux">Booting ISOLINUX images (manual method)</a></li>
  25. <li><a href="#troubleshooting">Troubleshooting</a></li>
  26. </ul>
  27. <p>
  28. <a href="index.html">Back to previous index</a>
  29. </p>
  30. </div>
  31. <div id="prepare" class="section">
  32. <h2>Prepare the USB drive (in GNU/Linux)</h2>
  33. <p>
  34. Connect the USB drive. Check dmesg:<br/>
  35. <b>$ dmesg</b><br/>
  36. Check lsblk to confirm which drive it is:<br/>
  37. <b>$ lsblk</b>
  38. </p>
  39. <p>
  40. Check that it wasn't automatically mounted. If it was, unmount it. For example:<br/>
  41. <b>$ sudo umount /dev/sdX*</b><br/>
  42. <b># umount /dev/sdX*</b>
  43. </p>
  44. <p>
  45. dmesg told you what device it is. Overwrite the drive, writing your distro ISO to it with dd. For example:<br/>
  46. <b>$ sudo dd if=gnulinux.iso of=/dev/sdX bs=8M; sync</b><br/>
  47. <b># dd if=gnulinux.iso of=/dev/sdX bs=8M; sync</b>
  48. </p>
  49. <p>
  50. You should now be able to boot the installer from your USB drive. Continue reading, for
  51. information about how to do that.
  52. </p>
  53. <p>
  54. <a href="#pagetop">Back to top of page</a>.
  55. </p>
  56. </div>
  57. <div id="encryption" class="section">
  58. <h2>Installing GNU/Linux with full disk encryption</h2>
  59. <ul>
  60. <li><a href="encrypted_trisquel.html">Installing Trisquel GNU/Linux with full disk encryption (including /boot)</a></li>
  61. <li><a href="encrypted_parabola.html">Installing Parabola GNU/Linux with full disk encryption (including /boot)</a></li>
  62. </ul>
  63. <p>
  64. <a href="#pagetop">Back to top of page</a>.
  65. </p>
  66. </div>
  67. <div id="guix" class="section">
  68. <h2>GNU Guix System Distribution? (or NixOS?)</h2>
  69. <p>
  70. Guix and NixOS USB installers use the GRUB bootloader, unlike most GNU/Linux installers which will likely use ISOLINUX.
  71. </p>
  72. <p>
  73. To boot the Guix or NixOS live USB install, select <b><i>Search for GRUB configuration (grub.cfg) outside of CBFS</i></b> from
  74. the GRUB payload menu. After you have done that, a new menuentry will appear at the very bottom with text like
  75. <b><i>Load Config from (usb0)</i></b>; select that, and it should boot.
  76. </p>
  77. <p>
  78. Once you have installed Guix or NixOS onto the main storage device, check
  79. <a href="grub_cbfs.html#libreboot_grub_config_ondisk">grub_cbfs.html#libreboot_grub_config_ondisk</a> for hints on how
  80. to boot it.
  81. </p>
  82. <p>
  83. <i>Using GuixSD (Guix System Distribution) is recommended; it's part of GNU, and
  84. <a href="https://www.gnu.org/distros/free-distros.html">endorsed</a> by the Free Software Foundation,
  85. while being partly based on NixOS and containing some improvements over it.</i>
  86. </p>
  87. <p>
  88. <a href="#pagetop">Back to top of page</a>.
  89. </p>
  90. </div>
  91. <div id="trisquel_netinstall" class="section">
  92. <h2>Trisquel net install?</h2>
  93. <p>
  94. Tip: don't use the official net install image. Download the full GNOME ISO (the ~1.5GiB one).
  95. In this ISO, there is still the capability to boot the net install, while it also provides
  96. an easy to use live system (which you can boot from USB). This ISO also works using
  97. <i>syslinux_configfile -i</i> (the <i>Parse ISOLINUX</i> menu entries in the default
  98. GRUB configuration that libreboot uses).
  99. </p>
  100. <p>
  101. <a href="#pagetop">Back to top of page</a>.
  102. </p>
  103. </div>
  104. <div id="parse_isolinux" class="section">
  105. <h2>Booting ISOLINUX images (automatic method)</h2>
  106. <p>
  107. Boot it in GRUB using the <i>Parse ISOLINUX config (USB)</i> option.
  108. A new menu should appear in GRUB, showing the boot options for that distro; this is a GRUB menu, converted from the usual
  109. ISOLINUX menu provided by that distro.
  110. </p>
  111. <p>
  112. <a href="#pagetop">Back to top of page</a>.
  113. </p>
  114. </div>
  115. <div id="manual_isolinux" class="section">
  116. <h2>Booting ISOLINUX images (manual method)</h2>
  117. <p>
  118. <i>These are generic instructions. They may or may not be correct for your
  119. distribution. You must adapt them appropriately, for whatever GNU/Linux distribution
  120. it is that you are trying to install.</i>
  121. </p>
  122. <p>
  123. If the ISOLINUX parser or <i>Search for GRUB configuration</i> options won't work, then press C in GRUB to access the command line.<br/>
  124. grub&gt; <b>ls</b><br/>
  125. Get the device from above output, eg (usb0). Example:<br/>
  126. grub&gt; <b>cat (usb0)/isolinux/isolinux.cfg</b><br/>
  127. Either this will show the ISOLINUX menuentries for that ISO, or link to other .cfg files, for example /isolinux/foo.cfg.<br/>
  128. If it did that, then you do:<br/>
  129. grub&gt; <b>cat (usb0)/isolinux/foo.cfg</b><br/>
  130. And so on, until you find the correct menuentries for ISOLINUX.
  131. <b>The file <i>/isolinux/foo.cfg</i> is a fictional example. Do not actually
  132. use this example, unless you actually have that file, if it is appropriate.</b>
  133. </p>
  134. <p>
  135. For Trisquel (and other debian-based distros), there are typically menuentries listed in
  136. <i>/isolinux/txt.cfg</i> or <i>/isolinux/gtk.cfg</i>. For dual-architecture ISO images
  137. (i686 and x86_64), there may be separate files/directories for each architecture.
  138. Just keep searching through the image, until you find the correct ISOLINUX configuration file.
  139. </p>
  140. <p>
  141. Now look at the ISOLINUX menuentry. It'll look like:<br/>
  142. <b>
  143. kernel /path/to/kernel<br/>
  144. append PARAMETERS initrd=/path/to/initrd MAYBE_MORE_PARAMETERS<br/>
  145. </b>
  146. GRUB works the same way, but in it's own way. Example GRUB commands:<br/>
  147. grub&gt; <b>set root='usb0'</b><br/>
  148. grub&gt; <b>linux /path/to/kernel PARAMETERS MAYBE_MORE_PARAMETERS</b><br/>
  149. grub&gt; <b>initrd /path/to/initrd</b><br/>
  150. grub&gt; <b>boot</b><br/>
  151. Note: <i>usb0</i> may be incorrect. Check the output of the <i>ls</i> command in GRUB,
  152. to see a list of USB devices/partitions.
  153. Of course this will vary from distro to distro. If you did all of that correctly, then it should now be booting your USB
  154. drive in the way that you specified.
  155. </p>
  156. <p>
  157. <a href="#pagetop">Back to top of page</a>.
  158. </p>
  159. </div>
  160. <div id="troubleshooting" class="section">
  161. <h1>Troubleshooting</h1>
  162. <p>
  163. Most of these issues occur when using libreboot with coreboot's 'text mode' instead of the coreboot framebuffer.
  164. This mode is useful for booting payloads like memtest86+ which expect text-mode, but for GNU/Linux distributions
  165. it can be problematic when they are trying to switch to a framebuffer because it doesn't exist.
  166. </p>
  167. <p>
  168. In most cases, you should use the vesafb ROM images. Example filename: libreboot_ukdvorak_vesafb.rom.
  169. </p>
  170. <h2>parabola won't boot in text-mode</h2>
  171. <p>
  172. Use one of the ROM images with vesafb in the filename (uses coreboot framebuffer instead of text-mode).
  173. </p>
  174. <h2>debian-installer (trisquel net install) graphical corruption in text-mode</h2>
  175. <p>
  176. When using the ROM images that use coreboot's &quot;text mode&quot; instead of the coreboot framebuffer,
  177. booting the Trisquel net installer results in graphical corruption because it is trying to switch to a framebuffer which doesn't
  178. exist. Use that kernel parameter on the 'linux' line when booting it:<br/>
  179. <b>vga=normal fb=false</b>
  180. </p>
  181. <p>
  182. Tested in Trisquel 6 (and 7). This forces debian-installer to start in text-mode, instead of trying to switch to a framebuffer.
  183. </p>
  184. <p>
  185. If selecting text-mode from a GRUB menu created using the ISOLINUX parser, you can press E on the menu entry to add this.
  186. Or, if you are booting manually (from GRUB terminal) then just add the parameters.
  187. </p>
  188. <p>
  189. This workaround was found on the page: <a href="https://www.debian.org/releases/stable/i386/ch05s04.html">https://www.debian.org/releases/stable/i386/ch05s04.html</a>.
  190. It should also work for gNewSense, Debian and any other apt-get distro that provides debian-installer (text mode) net install method.
  191. </p>
  192. <p>
  193. <a href="#pagetop">Back to top of page</a>.
  194. </p>
  195. </div>
  196. <div class="section">
  197. <p>
  198. Copyright &copy; 2014, 2015 Francis Rowe &lt;info@gluglug.org.uk&gt;<br/>
  199. This document is released under the Creative Commons Attribution-ShareAlike 4.0 International Public License and all future versions.
  200. A copy of the license can be found at <a href="../cc-by-sa-4.txt">../cc-by-sa-4.txt</a>.
  201. </p>
  202. <p>
  203. This document is distributed in the hope that it will be useful,
  204. but WITHOUT ANY WARRANTY; without even the implied warranty of
  205. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See <a href="../cc-by-sa-4.txt">../cc-by-sa-4.txt</a> for more information.
  206. </p>
  207. </div>
  208. </body>
  209. </html>