openbsd.html 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  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 OpenBSD on a libreboot system</title>
  10. </head>
  11. <body>
  12. <div id="pagetop" class="section">
  13. <h1>How to install OpenBSD on a libreboot system</h1>
  14. <p>
  15. This section relates to preparing, booting and installing a
  16. OpenBSD distribution on your libreboot system, using nothing more than a USB flash drive (and <i>dd</i>). They've only been tested on a Lenovo ThinkPad x200.
  17. </p>
  18. <ul>
  19. <li><a href="#prepare">Prepare the USB drive (in OpenBSD)</a></li>
  20. <li><a href="#noencryption">Installing OpenBSD without full disk encryption</a></li>
  21. <li><a href="#encryption">Installing OpenBSD with full disk encryption</a></li>
  22. <li><a href="#bootuing">Booting</a></li>
  23. <li><a href="#configuring_grub">Configuring Grub</a></li>
  24. <li><a href="#troubleshooting">Troubleshooting</a></li>
  25. </ul>
  26. <p>
  27. <a href="index.html">Back to previous index</a>
  28. </p>
  29. </div>
  30. <div class="section">
  31. <p>
  32. <b>This section is only for the GRUB payload. For depthcharge (used on CrOS devices in libreboot), instructions
  33. have yet to be written in the libreboot documentation.</b>
  34. </p>
  35. </div>
  36. <div id="prepare" class="section">
  37. <h2>Prepare the USB drive (in OpenBSD)</h2>
  38. <p>
  39. Connect the USB drive. Check dmesg:<br/>
  40. <b>$ dmesg | tail</b><br/>
  41. Check to confirm which drive it is, for example, if you think its sd3:<br/>
  42. <b>$ disklabel sd3</b>
  43. </p>
  44. <p>
  45. Check that it wasn't automatically mounted. If it was, unmount it. For example:<br/>
  46. <b>$ doas umount /dev/sd3i</b><br/>
  47. </p>
  48. <p>
  49. dmesg told you what device it is. Overwrite the drive, writing the OpenBSD installer to it with dd. For example:<br/>
  50. <b>$ doas dd if=install60.fs of=/dev/rsdXc bs=1M; sync</b><br/>
  51. </p>
  52. <p>
  53. You should now be able to boot the installer from your USB drive. Continue reading, for
  54. information about how to do that.
  55. </p>
  56. <p>
  57. <a href="#pagetop">Back to top of page</a>.
  58. </p>
  59. </div>
  60. <div id="noencryption" class="section">
  61. <h2>Installing OpenBSD without full disk encryption</h2>
  62. <p>
  63. Press C in GRUB to access the command line:
  64. </p>
  65. <p>
  66. grub> <b>kopenbsd (usb0,openbsd1)/6.0/amd64/bsd.rd</b>
  67. </p>
  68. <p>
  69. It will start booting into the OpenBSD installer. Follow the normal process for installing OpenBSD.
  70. </p>
  71. <p>
  72. <a href="#pagetop">Back to top of page</a>.
  73. </p>
  74. </div>
  75. <div id="encryption" class="section">
  76. <h2>Installing OpenBSD with full disk encryption</h2>
  77. <p>
  78. Not working. You can modify the above procedure (installation w/o encryption) to install OpenBSD using full disk encryption, and it appears to work, except that its not yet clear how to actually <i>boot</i> an OpenBSD+FDE installation using libreboot+Grub2. If you get it working, please let us know.
  79. </p>
  80. <p>
  81. <a href="#pagetop">Back to top of page</a>.
  82. </p>
  83. </div>
  84. <div id="booting" class="section">
  85. <h2>Booting</h2>
  86. <p>
  87. Press C in GRUB to access the command line:
  88. </p>
  89. <p>
  90. grub> <b>kopenbsd -r sd0a (ahci0,openbsd1)/bsd</b>
  91. </p>
  92. <p>
  93. OpenBSD will start booting. Yay!
  94. </p>
  95. <p>
  96. <a href="#pagetop">Back to top of page</a>.
  97. </p>
  98. </div>
  99. <div id="configuring_grub" class="section">
  100. <h2>Configuring Grub</h2>
  101. <p>
  102. If you don't want to drop to the GRUB command line and type in a command to boot OpenBSD every time, you can create a GRUB configuration that's aware of your OpenBSD installation and that will automatically be used by libreboot.
  103. </p>
  104. <p>
  105. On your OpenBSD root partition, create the <b>/grub</b> directory and add the file <b>libreboot_grub.cfg</b> to it. Inside the <b>libreboot_grub.cfg</b> add these lines:
  106. <p><b>
  107. default=0
  108. timeout=3
  109. menuentry "OpenBSD" {<br>
  110. &nbsp;&nbsp;&nbsp;&nbsp;kopenbsd -r sd0a (ahci0,openbsd1)/bsd<br>
  111. }<br>
  112. </b></p>
  113. <p>The next time you boot, you'll see the old Grub menu for a few seconds, then you'll see the a new menu with only OpenBSD on the list. After 3 seconds OpenBSD will boot, or you can hit enter to boot.
  114. <p>
  115. <a href="#pagetop">Back to top of page</a>.
  116. </p>
  117. </div>
  118. <div id="troubleshooting" class="section">
  119. <h1>Troubleshooting</h1>
  120. <p>
  121. Most of these issues occur when using libreboot with coreboot's 'text mode' instead of the coreboot framebuffer.
  122. This mode is useful for booting payloads like memtest86+ which expect text-mode, but for OpenBSD distributions
  123. it can be problematic when they are trying to switch to a framebuffer because it doesn't exist.
  124. </p>
  125. <p>
  126. In most cases, you should use the vesafb ROM images. Example filename: libreboot_ukdvorak_vesafb.rom.
  127. </p>
  128. <h2>won't boot...something about file not found</h2>
  129. <p>
  130. You device names (i.e. usb0, usb1, sd0, sd1, wd0, ahci0, hd0, etc) and numbers may differ. Use TAB completion.
  131. </p>
  132. <p>
  133. <a href="#pagetop">Back to top of page</a>.
  134. </p>
  135. </div>
  136. <div class="section">
  137. <p>
  138. Copyright &copy; 2014, 2015 Leah Rowe &lt;info@minifree.org&gt;<br/>
  139. Permission is granted to copy, distribute and/or modify this document
  140. under the terms of the Creative Commons Attribution-ShareAlike 4.0 International license
  141. or any later version published by Creative Commons;
  142. A copy of the license can be found at <a href="../cc-by-sa-4.0.txt">../cc-by-sa-4.0.txt</a>
  143. </p>
  144. <p>
  145. Updated versions of the license (when available) can be found at
  146. <a href="https://creativecommons.org/licenses/by-sa/4.0/legalcode">https://creativecommons.org/licenses/by-sa/4.0/legalcode</a>
  147. </p>
  148. <p>
  149. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
  150. EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
  151. AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
  152. ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
  153. IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
  154. WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
  155. PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
  156. ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
  157. KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
  158. ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
  159. </p>
  160. <p>
  161. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
  162. TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
  163. NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
  164. INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
  165. COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
  166. USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
  167. ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
  168. DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
  169. IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
  170. </p>
  171. <p>
  172. The disclaimer of warranties and limitation of liability provided
  173. above shall be interpreted in a manner that, to the extent
  174. possible, most closely approximates an absolute disclaimer and
  175. waiver of all liability.
  176. </p>
  177. </div>
  178. </body>
  179. </html>