diff options
Diffstat (limited to 'docs/bsd')
-rw-r--r-- | docs/bsd/freebsd.html | 290 | ||||
-rw-r--r-- | docs/bsd/freebsd.md | 227 | ||||
-rw-r--r-- | docs/bsd/index.html | 86 | ||||
-rw-r--r-- | docs/bsd/index.md | 57 | ||||
-rw-r--r-- | docs/bsd/netbsd.html | 301 | ||||
-rw-r--r-- | docs/bsd/netbsd.md | 244 | ||||
-rw-r--r-- | docs/bsd/openbsd.html | 325 | ||||
-rw-r--r-- | docs/bsd/openbsd.md | 265 |
8 files changed, 793 insertions, 1002 deletions
diff --git a/docs/bsd/freebsd.html b/docs/bsd/freebsd.html deleted file mode 100644 index 99960882..00000000 --- a/docs/bsd/freebsd.html +++ /dev/null @@ -1,290 +0,0 @@ -<!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>How to install FreeBSD on a libreboot system</title> -</head> - -<body> - <div id="pagetop" class="section"> - <h1>How to install FreeBSD on a libreboot system</h1> - <p> - This section relates to preparing, booting and installing - FreeBSD 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. - </p> - <p> - It is expected that you use text mode in libreboot (txtmode images), - for the early boot process in FreeBSD. - <strong>Booting the installer results in a red flickering text display, - and doesn't boot.</strong> - </p> - <p> - Thanks go to ioxcide in <a href="https://www.reddit.com/r/BSD/comments/53jt70/libreboot_and_bsds/">this Reddit post</a> - for the initial instructions. - </p> - <p> - TODO: test FreeBSD more extensively, and make sure it works (and fix it if it does not). - Instructions are provided here, to boot and install FreeBSD but we're - not sure whether it is currently fully compatible with libreboot. - </p> - <ul> - <li><a href="#prepare">Prepare the USB drive (in FreeBSD)</a></li> - <li><a href="#noencryption">Installing FreeBSD without full disk encryption</a></li> - <li><a href="#encryption">Installing FreeBSD with full disk encryption</a></li> - <li><a href="#booting">Booting</a></li> - <li><a href="#configuring_grub">Configuring Grub</a></li> - <li><a href="#troubleshooting">Troubleshooting</a></li> - </ul> - <p> - <a href="./">Back to previous index</a> - </p> - </div> - - <div class="section"> - <p> - <b>This section is only for the GRUB payload. For depthcharge (used on CrOS devices in libreboot), instructions - have yet to be written in the libreboot documentation.</b> - </p> - </div> - - <div id="prepare" class="section"> - - <p> - freebsd.img is the installation image for FreeBSD. Adapt - the filename accordingly, for whatever FreeBSD version you use. - </p> - - <h2>Prepare the USB drive (in FreeBSD)</h2> - <p> - <a href="https://www.freebsd.org/doc/handbook/bsdinstall-pre.html">This page</a> - on the FreeBSD website shows how to create a bootable USB drive - for installing FreeBSD. Use the <em>dd</em> on that page. - </p> - - <h2>Prepare the USB drive (in NetBSD)</h2> - <p> - <a href="https://wiki.netbsd.org/tutorials/how_to_install_netbsd_from_an_usb_memory_stick/">This page</a> - on the NetBSD website shows how to create a NetBSD bootable USB drive - from within NetBSD itself. You should use the <em>dd</em> method - documented there; you can use this with any ISO, including - FreeBSD. - </p> - - <h2>Prepare the USB drive (in LibertyBSD or OpenBSD)</h2> - - <p> - If you downloaded your ISO on a LibertyBSD or OpenBSD system, - here is how to create the bootable FreeBSD USB drive: - </p> - - <p> - Connect the USB drive. Check dmesg:<br/> - <b>$ dmesg | tail</b><br/> - - Check to confirm which drive it is, for example, if you think its sd3:<br/> - <b>$ disklabel sd3</b> - </p> - - <p> - Check that it wasn't automatically mounted. If it was, unmount it. For example:<br/> - <b>$ doas umount /dev/sd3i</b><br/> - </p> - - <p> - dmesg told you what device it is. Overwrite the drive, writing the FreeBSD installer to it with dd. For example:<br/> - <b>$ doas dd if=freebsd.img of=/dev/rsdXc bs=1M; sync</b><br/> - </p> - - <p> - You should now be able to boot the installer from your USB drive. Continue reading, for - information about how to do that. - </p> - - <p> - <a href="#pagetop">Back to top of page</a>. - </p> - - <h2>Prepare the USB drive (in GNU+Linux)</h2> - - <p> - If you downloaded your ISO on a GNU+Linux system, - here is how to create the bootable FreeBSD USB drive: - </p> - - <p> - Connect the USB drive. Check dmesg:<br/> - <b>$ dmesg</b><br/> - - Check lsblk to confirm which drive it is:<br/> - <b>$ lsblk</b> - </p> - - <p> - Check that it wasn't automatically mounted. If it was, unmount it. For example:<br/> - <b>$ sudo umount /dev/sdX*</b><br/> - <b># umount /dev/sdX*</b> - </p> - - <p> - dmesg told you what device it is. Overwrite the drive, writing your distro ISO to it with dd. For example:<br/> - <b>$ sudo dd if=freebsd.img of=/dev/sdX bs=8M; sync</b><br/> - <b># dd if=freebsd.img of=/dev/sdX bs=8M; sync</b> - </p> - - <p> - You should now be able to boot the installer from your USB drive. Continue reading, for - information about how to do that. - </p> - - <p> - <a href="#pagetop">Back to top of page</a>. - </p> - - </div> - - - <div id="noencryption" class="section"> - - <h2>Installing FreeBSD without full disk encryption</h2> - - <p> - Press C in GRUB to access the command line: - </p> - <p> - grub> <b>kfreebsd (usb0,gpt3)/boot/kernel/kernel</b><br/> - grub> <b>set FreeBSD.vfs.mountfrom=ufs:/dev/da1p3</b><br/> - grub> <b>boot</b> - </p> - <p> - It will start booting into the FreeBSD installer. Follow the normal process for installing FreeBSD. - </p> - - <p> - <a href="#pagetop">Back to top of page</a>. - </p> - - </div> - - <div id="encryption" class="section"> - - <h2>Installing FreeBSD with full disk encryption</h2> - - <p> - TODO - </p> - - <p> - <a href="#pagetop">Back to top of page</a>. - </p> - - </div> - - <div id="booting" class="section"> - - <h2 id="booting">Booting</h2> - - <p> - TODO - </p> - - <p> - <a href="#pagetop">Back to top of page</a>. - </p> - - </div> - - <div id="configuring_grub" class="section"> - - <h2>Configuring Grub</h2> - - <p> - TODO - </p> - <p> - <a href="#pagetop">Back to top of page</a>. - </p> - - </div> - - <div id="troubleshooting" class="section"> - - <h1>Troubleshooting</h1> - - <p> - Most of these issues occur when using libreboot with coreboot's 'text mode' instead of the coreboot framebuffer. - This mode is useful for booting payloads like memtest86+ which expect text-mode, but for FreeBSD - it can be problematic when they are trying to switch to a framebuffer because it doesn't exist. - </p> - - <p> - In most cases, you should use the vesafb ROM images. Example filename: libreboot_ukdvorak_vesafb.rom. - </p> - - <h2>won't boot...something about file not found</h2> - <p> - Your device names (i.e. usb0, usb1, sd0, sd1, wd0, ahci0, hd0, etc) and numbers may differ. Use TAB completion. - </p> - - <p> - <a href="#pagetop">Back to top of page</a>. - </p> - - </div> - - <div class="section"> - - <p> - Copyright © 2016 Leah Rowe <info@minifree.org><br/> - Copyright © 2016 Scott Bonds <scott@ggr.com><br/> - Permission is granted to copy, distribute and/or modify this document - under the terms of the Creative Commons Attribution-ShareAlike 4.0 International license - or any later version published by Creative Commons; - - A copy of the license can be found at <a href="../cc-by-sa-4.0.txt">../cc-by-sa-4.0.txt</a> - </p> - - <p> - Updated versions of the license (when available) can be found at - <a href="https://creativecommons.org/licenses/by-sa/4.0/legalcode">https://creativecommons.org/licenses/by-sa/4.0/legalcode</a> - </p> - - <p> - UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE - EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS - AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF - ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, - IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, - WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, - ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT - KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT - ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. - </p> - <p> - TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE - TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, - NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, - INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, - COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR - USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR - DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR - IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. - </p> - <p> - The disclaimer of warranties and limitation of liability provided - above shall be interpreted in a manner that, to the extent - possible, most closely approximates an absolute disclaimer and - waiver of all liability. - </p> - - </div> - -</body> -</html> diff --git a/docs/bsd/freebsd.md b/docs/bsd/freebsd.md new file mode 100644 index 00000000..35590994 --- /dev/null +++ b/docs/bsd/freebsd.md @@ -0,0 +1,227 @@ +<div id="pagetop" class="section"> + +How to install FreeBSD on a libreboot system +============================================ + +This section relates to preparing, booting and installing FreeBSD on +your libreboot system, using nothing more than a USB flash drive (and +*dd*). They\'ve only been tested on a Lenovo ThinkPad x200. + +It is expected that you use text mode in libreboot (txtmode images), for +the early boot process in FreeBSD. **Booting the installer results in a +red flickering text display, and doesn\'t boot.** + +Thanks go to ioxcide in [this Reddit +post](https://www.reddit.com/r/BSD/comments/53jt70/libreboot_and_bsds/) +for the initial instructions. + +TODO: test FreeBSD more extensively, and make sure it works (and fix it +if it does not). Instructions are provided here, to boot and install +FreeBSD but we\'re not sure whether it is currently fully compatible +with libreboot. + +- [Prepare the USB drive (in FreeBSD)](#prepare) +- [Installing FreeBSD without full disk encryption](#noencryption) +- [Installing FreeBSD with full disk encryption](#encryption) +- [Booting](#booting) +- [Configuring Grub](#configuring_grub) +- [Troubleshooting](#troubleshooting) + +[Back to previous index](./) + +</div> + +<div class="section"> + +**This section is only for the GRUB payload. For depthcharge (used on +CrOS devices in libreboot), instructions have yet to be written in the +libreboot documentation.** + +</div> + +<div id="prepare" class="section"> + +freebsd.img is the installation image for FreeBSD. Adapt the filename +accordingly, for whatever FreeBSD version you use. + +Prepare the USB drive (in FreeBSD) +---------------------------------- + +[This page](https://www.freebsd.org/doc/handbook/bsdinstall-pre.html) on +the FreeBSD website shows how to create a bootable USB drive for +installing FreeBSD. Use the *dd* on that page. + +Prepare the USB drive (in NetBSD) +--------------------------------- + +[This +page](https://wiki.netbsd.org/tutorials/how_to_install_netbsd_from_an_usb_memory_stick/) +on the NetBSD website shows how to create a NetBSD bootable USB drive +from within NetBSD itself. You should use the *dd* method documented +there; you can use this with any ISO, including FreeBSD. + +Prepare the USB drive (in LibertyBSD or OpenBSD) +------------------------------------------------ + +If you downloaded your ISO on a LibertyBSD or OpenBSD system, here is +how to create the bootable FreeBSD USB drive: + +Connect the USB drive. Check dmesg:\ +**\$ dmesg | tail**\ +Check to confirm which drive it is, for example, if you think its sd3:\ +**\$ disklabel sd3** + +Check that it wasn\'t automatically mounted. If it was, unmount it. For +example:\ +**\$ doas umount /dev/sd3i**\ + +dmesg told you what device it is. Overwrite the drive, writing the +FreeBSD installer to it with dd. For example:\ +**\$ doas dd if=freebsd.img of=/dev/rsdXc bs=1M; sync**\ + +You should now be able to boot the installer from your USB drive. +Continue reading, for information about how to do that. + +[Back to top of page](#pagetop). + +Prepare the USB drive (in GNU+Linux) +------------------------------------ + +If you downloaded your ISO on a GNU+Linux system, here is how to create +the bootable FreeBSD USB drive: + +Connect the USB drive. Check dmesg:\ +**\$ dmesg**\ +Check lsblk to confirm which drive it is:\ +**\$ lsblk** + +Check that it wasn\'t automatically mounted. If it was, unmount it. For +example:\ +**\$ sudo umount /dev/sdX\***\ +**\# umount /dev/sdX\*** + +dmesg told you what device it is. Overwrite the drive, writing your +distro ISO to it with dd. For example:\ +**\$ sudo dd if=freebsd.img of=/dev/sdX bs=8M; sync**\ +**\# dd if=freebsd.img of=/dev/sdX bs=8M; sync** + +You should now be able to boot the installer from your USB drive. +Continue reading, for information about how to do that. + +[Back to top of page](#pagetop). + +</div> + +<div id="noencryption" class="section"> + +Installing FreeBSD without full disk encryption +----------------------------------------------- + +Press C in GRUB to access the command line: + +grub> **kfreebsd (usb0,gpt3)/boot/kernel/kernel**\ +grub> **set FreeBSD.vfs.mountfrom=ufs:/dev/da1p3**\ +grub> **boot** + +It will start booting into the FreeBSD installer. Follow the normal +process for installing FreeBSD. + +[Back to top of page](#pagetop). + +</div> + +<div id="encryption" class="section"> + +Installing FreeBSD with full disk encryption +-------------------------------------------- + +TODO + +[Back to top of page](#pagetop). + +</div> + +<div id="booting" class="section"> + +Booting +------- + +TODO + +[Back to top of page](#pagetop). + +</div> + +<div id="configuring_grub" class="section"> + +Configuring Grub +---------------- + +TODO + +[Back to top of page](#pagetop). + +</div> + +<div id="troubleshooting" class="section"> + +Troubleshooting +=============== + +Most of these issues occur when using libreboot with coreboot\'s \'text +mode\' instead of the coreboot framebuffer. This mode is useful for +booting payloads like memtest86+ which expect text-mode, but for FreeBSD +it can be problematic when they are trying to switch to a framebuffer +because it doesn\'t exist. + +In most cases, you should use the vesafb ROM images. Example filename: +libreboot\_ukdvorak\_vesafb.rom. + +won\'t boot\...something about file not found +--------------------------------------------- + +Your device names (i.e. usb0, usb1, sd0, sd1, wd0, ahci0, hd0, etc) and +numbers may differ. Use TAB completion. + +[Back to top of page](#pagetop). + +</div> + +<div class="section"> + +Copyright © 2016 Leah Rowe <info@minifree.org>\ +Copyright © 2016 Scott Bonds <scott@ggr.com>\ +Permission is granted to copy, distribute and/or modify this document +under the terms of the Creative Commons Attribution-ShareAlike 4.0 +International license or any later version published by Creative +Commons; A copy of the license can be found at +[../cc-by-sa-4.0.txt](../cc-by-sa-4.0.txt) + +Updated versions of the license (when available) can be found at +<https://creativecommons.org/licenses/by-sa/4.0/legalcode> + +UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE EXTENT +POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS AND +AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND +CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, IMPLIED, STATUTORY, +OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, WARRANTIES OF TITLE, +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, +ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OR ABSENCE +OF ERRORS, WHETHER OR NOT KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF +WARRANTIES ARE NOT ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT +APPLY TO YOU. + +TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU +ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) OR +OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, CONSEQUENTIAL, +PUNITIVE, EXEMPLARY, OR OTHER LOSSES, COSTS, EXPENSES, OR DAMAGES +ARISING OUT OF THIS PUBLIC LICENSE OR USE OF THE LICENSED MATERIAL, EVEN +IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSSES, +COSTS, EXPENSES, OR DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT +ALLOWED IN FULL OR IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + +The disclaimer of warranties and limitation of liability provided above +shall be interpreted in a manner that, to the extent possible, most +closely approximates an absolute disclaimer and waiver of all liability. + +</div> diff --git a/docs/bsd/index.html b/docs/bsd/index.html deleted file mode 100644 index 845e33e1..00000000 --- a/docs/bsd/index.html +++ /dev/null @@ -1,86 +0,0 @@ -<!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>BSD projects</title> -</head> - -<body> - - <div class="section"> - - <h1 id="pagetop">BSD projects</h1> - <p> - This section relates to dealing with BSD projects: preparing bootable USB drives, - changing the default GRUB menu and so on. - </p> - <p> - <b>This section is only for the *GRUB* payload. For depthcharge, instructions have yet to be written.</b> - </p> - <p> - <a href="../">Back to previous index</a>. - </p> - <ul> - <li><a href="netbsd.html">How to install NetBSD on a libreboot system</a></li> - <li><a href="openbsd.html">How to install LibertyBSD or OpenBSD on a libreboot system</a></li> - <li><a href="freebsd.html">How to install FreeBSD on a libreboot system</a></li> - </ul> - - </div> - - <div class="section"> - - <p> - Copyright © 2016 Scott Bonds <scott@ggr.com><br/> - Permission is granted to copy, distribute and/or modify this document - under the terms of the Creative Commons Attribution-ShareAlike 4.0 International license - or any later version published by Creative Commons; - - A copy of the license can be found at <a href="../cc-by-sa-4.0.txt">../cc-by-sa-4.0.txt</a> - </p> - - <p> - Updated versions of the license (when available) can be found at - <a href="https://creativecommons.org/licenses/by-sa/4.0/legalcode">https://creativecommons.org/licenses/by-sa/4.0/legalcode</a> - </p> - - <p> - UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE - EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS - AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF - ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, - IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, - WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, - ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT - KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT - ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. - </p> - <p> - TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE - TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, - NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, - INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, - COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR - USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR - DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR - IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. - </p> - <p> - The disclaimer of warranties and limitation of liability provided - above shall be interpreted in a manner that, to the extent - possible, most closely approximates an absolute disclaimer and - waiver of all liability. - </p> - - </div> - -</body> -</html> diff --git a/docs/bsd/index.md b/docs/bsd/index.md new file mode 100644 index 00000000..7593aea8 --- /dev/null +++ b/docs/bsd/index.md @@ -0,0 +1,57 @@ +<div class="section"> + +BSD projects {#pagetop} +============ + +This section relates to dealing with BSD projects: preparing bootable +USB drives, changing the default GRUB menu and so on. + +**This section is only for the \*GRUB\* payload. For depthcharge, +instructions have yet to be written.** + +[Back to previous index](../). + +- [How to install NetBSD on a libreboot system](netbsd.html) +- [How to install LibertyBSD or OpenBSD on a libreboot + system](openbsd.html) +- [How to install FreeBSD on a libreboot system](freebsd.html) + +</div> + +<div class="section"> + +Copyright © 2016 Scott Bonds <scott@ggr.com>\ +Permission is granted to copy, distribute and/or modify this document +under the terms of the Creative Commons Attribution-ShareAlike 4.0 +International license or any later version published by Creative +Commons; A copy of the license can be found at +[../cc-by-sa-4.0.txt](../cc-by-sa-4.0.txt) + +Updated versions of the license (when available) can be found at +<https://creativecommons.org/licenses/by-sa/4.0/legalcode> + +UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE EXTENT +POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS AND +AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND +CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, IMPLIED, STATUTORY, +OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, WARRANTIES OF TITLE, +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, +ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OR ABSENCE +OF ERRORS, WHETHER OR NOT KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF +WARRANTIES ARE NOT ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT +APPLY TO YOU. + +TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU +ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) OR +OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, CONSEQUENTIAL, +PUNITIVE, EXEMPLARY, OR OTHER LOSSES, COSTS, EXPENSES, OR DAMAGES +ARISING OUT OF THIS PUBLIC LICENSE OR USE OF THE LICENSED MATERIAL, EVEN +IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSSES, +COSTS, EXPENSES, OR DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT +ALLOWED IN FULL OR IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + +The disclaimer of warranties and limitation of liability provided above +shall be interpreted in a manner that, to the extent possible, most +closely approximates an absolute disclaimer and waiver of all liability. + +</div> diff --git a/docs/bsd/netbsd.html b/docs/bsd/netbsd.html deleted file mode 100644 index 2fab9f99..00000000 --- a/docs/bsd/netbsd.html +++ /dev/null @@ -1,301 +0,0 @@ -<!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>How to install NetBSD on a libreboot system</title> -</head> - -<body> - <div id="pagetop" class="section"> - <h1>How to install NetBSD on a libreboot system</h1> - <p> - This section relates to preparing, booting and installing - NetBSD on your libreboot system, using nothing more than a USB flash drive (and <i>dd</i>). They've only been tested on a librebooted ThinkPad X60. - </p> - <p> - It is expected that you use text mode in libreboot (txtmode images), - for the early boot process in NetBSD. - <strong>Suspend/hibernate is broken, according to at least 1 user.</strong> - </p> - <p> - Thanks go to ioxcide in <a href="https://www.reddit.com/r/BSD/comments/53jt70/libreboot_and_bsds/">this Reddit post</a> - for the initial instructions. - </p> - <ul> - <li><a href="#prepare">Prepare the USB drive (in NetBSD)</a></li> - <li><a href="#noencryption">Installing NetBSD without full disk encryption</a></li> - <li><a href="#encryption">Installing NetBSD with full disk encryption</a></li> - <li><a href="#booting">Booting</a></li> - <li><a href="#configuring_grub">Configuring Grub</a></li> - <li><a href="#troubleshooting">Troubleshooting</a></li> - </ul> - <p> - <a href="./">Back to previous index</a> - </p> - </div> - - <div class="section"> - <p> - <b>This section is only for the GRUB payload. For depthcharge (used on CrOS devices in libreboot), instructions - have yet to be written in the libreboot documentation.</b> - </p> - </div> - - <div id="prepare" class="section"> - - <p> - netbsd.iso is the installation image for NetBSD. Adapt - the filename accordingly, for your version of NetBSD. - </p> - - <h2>Prepare the USB drive (in NetBSD)</h2> - <p> - <a href="https://wiki.netbsd.org/tutorials/how_to_install_netbsd_from_an_usb_memory_stick/">This page</a> - on the NetBSD website shows how to create a NetBSD bootable USB drive - from within NetBSD itself. You should use the <em>dd</em> method - documented there. - </p> - - <h2>Prepare the USB drive (in FreeBSD)</h2> - <p> - <a href="https://www.freebsd.org/doc/handbook/bsdinstall-pre.html">This page</a> - on the FreeBSD website shows how to create a bootable USB drive - for installing FreeBSD. Use the <em>dd</em> on that page. You can - also use the same instructions with a NetBSD ISO image. - </p> - - <h2>Prepare the USB drive (in LibertyBSD or NetBSD)</h2> - - <p> - If you downloaded your ISO on a LibertyBSD or NetBSD system, - here is how to create the bootable NetBSD USB drive: - </p> - - <p> - Connect the USB drive. Check dmesg:<br/> - <b>$ dmesg | tail</b><br/> - - Check to confirm which drive it is, for example, if you think its sd3:<br/> - <b>$ disklabel sd3</b> - </p> - - <p> - Check that it wasn't automatically mounted. If it was, unmount it. For example:<br/> - <b>$ doas umount /dev/sd3i</b><br/> - </p> - - <p> - dmesg told you what device it is. Overwrite the drive, writing the NetBSD installer to it with dd. For example:<br/> - <b>$ doas netbsd.iso of=/dev/rsdXc bs=1M; sync</b><br/> - </p> - - <p> - You should now be able to boot the installer from your USB drive. Continue reading, for - information about how to do that. - </p> - - <p> - <a href="#pagetop">Back to top of page</a>. - </p> - - <h2>Prepare the USB drive (in GNU+Linux)</h2> - - <p> - If you downloaded your ISO on a GNU+Linux system, - here is how to create the bootable NetBSD USB drive: - </p> - - <p> - Connect the USB drive. Check dmesg:<br/> - <b>$ dmesg</b><br/> - - Check lsblk to confirm which drive it is:<br/> - <b>$ lsblk</b> - </p> - - <p> - Check that it wasn't automatically mounted. If it was, unmount it. For example:<br/> - <b>$ sudo umount /dev/sdX*</b><br/> - <b># umount /dev/sdX*</b> - </p> - - <p> - dmesg told you what device it is. Overwrite the drive, writing your distro ISO to it with dd. For example:<br/> - <b>$ sudo dd if=install60.fs of=/dev/sdX bs=8M; sync</b><br/> - <b># dd if=netbsd.iso of=/dev/sdX bs=8M; sync</b> - </p> - - <p> - You should now be able to boot the installer from your USB drive. Continue reading, for - information about how to do that. - </p> - - <p> - <a href="#pagetop">Back to top of page</a>. - </p> - - </div> - - - <div id="noencryption" class="section"> - - <h2>Installing NetBSD without full disk encryption</h2> - - <p> - You might have to use an external USB keyboard during the installation. - Press C to access the GRUB terminal. - </p> - <p> - grub> <b>knetbsd -r sd0a (usb0,netbsd1)/netbsd</b><br/> - grub> <b>boot</b> - </p> - <p> - It will start booting into the NetBSD installer. Follow the normal process for installing NetBSD. - </p> - - <p> - <a href="#pagetop">Back to top of page</a>. - </p> - - </div> - - <div id="encryption" class="section"> - - <h2>Installing NetBSD with full disk encryption</h2> - - <p> - TODO - </p> - - <p> - <a href="#pagetop">Back to top of page</a>. - </p> - - </div> - - <div id="booting" class="section"> - - <h2 id="booting">Booting</h2> - - <p> - Press C in GRUB to access the command line: - </p> - <p> - grub> <b>knetbsd -r wd0a (ahci0,netbsd1)/netbsd</b><br/> - grub> <b>boot</b> - </p> - <p> - NetBSD will start booting. Yay! - </p> - - <p> - <a href="#pagetop">Back to top of page</a>. - </p> - - </div> - - <div id="configuring_grub" class="section"> - - <h2>Configuring Grub</h2> - - <p> - If you don't want to drop to the GRUB command line and type in a command to boot NetBSD every time, you can create a GRUB configuration that's aware of your NetBSD installation and that will automatically be used by libreboot. - </p> - <p> - On your NetBSD 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: - <p><b> - default=0 - timeout=3 - menuentry "NetBSD" {<br> - knetbsd -r wd0a (ahci0,netbsd1)/netbsd<br> - }<br> - </b></p> - <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 NetBSD on the list. After 3 seconds NetBSD will boot, or you can hit enter to boot. - <p> - <a href="#pagetop">Back to top of page</a>. - </p> - - </div> - - <div id="troubleshooting" class="section"> - - <h1>Troubleshooting</h1> - - <p> - Most of these issues occur when using libreboot with coreboot's 'text mode' instead of the coreboot framebuffer. - This mode is useful for booting payloads like memtest86+ which expect text-mode, but for NetBSD - it can be problematic when they are trying to switch to a framebuffer because it doesn't exist. - </p> - - <p> - In most cases, you should use the vesafb ROM images. Example filename: libreboot_ukdvorak_vesafb.rom. - </p> - - <h2>won't boot...something about file not found</h2> - <p> - Your device names (i.e. usb0, usb1, sd0, sd1, wd0, ahci0, hd0, etc) and numbers may differ. Use TAB completion. - </p> - - <p> - <a href="#pagetop">Back to top of page</a>. - </p> - - </div> - - <div class="section"> - - <p> - Copyright © 2016 Leah Rowe <info@minifree.org><br/> - Copyright © 2016 Scott Bonds <scott@ggr.com><br/> - Permission is granted to copy, distribute and/or modify this document - under the terms of the Creative Commons Attribution-ShareAlike 4.0 International license - or any later version published by Creative Commons; - - A copy of the license can be found at <a href="../cc-by-sa-4.0.txt">../cc-by-sa-4.0.txt</a> - </p> - - <p> - Updated versions of the license (when available) can be found at - <a href="https://creativecommons.org/licenses/by-sa/4.0/legalcode">https://creativecommons.org/licenses/by-sa/4.0/legalcode</a> - </p> - - <p> - UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE - EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS - AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF - ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, - IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, - WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, - ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT - KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT - ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. - </p> - <p> - TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE - TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, - NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, - INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, - COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR - USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR - DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR - IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. - </p> - <p> - The disclaimer of warranties and limitation of liability provided - above shall be interpreted in a manner that, to the extent - possible, most closely approximates an absolute disclaimer and - waiver of all liability. - </p> - - </div> - -</body> -</html> diff --git a/docs/bsd/netbsd.md b/docs/bsd/netbsd.md new file mode 100644 index 00000000..6a43ef0f --- /dev/null +++ b/docs/bsd/netbsd.md @@ -0,0 +1,244 @@ +<div id="pagetop" class="section"> + +How to install NetBSD on a libreboot system +=========================================== + +This section relates to preparing, booting and installing NetBSD on your +libreboot system, using nothing more than a USB flash drive (and *dd*). +They\'ve only been tested on a librebooted ThinkPad X60. + +It is expected that you use text mode in libreboot (txtmode images), for +the early boot process in NetBSD. **Suspend/hibernate is broken, +according to at least 1 user.** + +Thanks go to ioxcide in [this Reddit +post](https://www.reddit.com/r/BSD/comments/53jt70/libreboot_and_bsds/) +for the initial instructions. + +- [Prepare the USB drive (in NetBSD)](#prepare) +- [Installing NetBSD without full disk encryption](#noencryption) +- [Installing NetBSD with full disk encryption](#encryption) +- [Booting](#booting) +- [Configuring Grub](#configuring_grub) +- [Troubleshooting](#troubleshooting) + +[Back to previous index](./) + +</div> + +<div class="section"> + +**This section is only for the GRUB payload. For depthcharge (used on +CrOS devices in libreboot), instructions have yet to be written in the +libreboot documentation.** + +</div> + +<div id="prepare" class="section"> + +netbsd.iso is the installation image for NetBSD. Adapt the filename +accordingly, for your version of NetBSD. + +Prepare the USB drive (in NetBSD) +--------------------------------- + +[This +page](https://wiki.netbsd.org/tutorials/how_to_install_netbsd_from_an_usb_memory_stick/) +on the NetBSD website shows how to create a NetBSD bootable USB drive +from within NetBSD itself. You should use the *dd* method documented +there. + +Prepare the USB drive (in FreeBSD) +---------------------------------- + +[This page](https://www.freebsd.org/doc/handbook/bsdinstall-pre.html) on +the FreeBSD website shows how to create a bootable USB drive for +installing FreeBSD. Use the *dd* on that page. You can also use the same +instructions with a NetBSD ISO image. + +Prepare the USB drive (in LibertyBSD or NetBSD) +----------------------------------------------- + +If you downloaded your ISO on a LibertyBSD or NetBSD system, here is how +to create the bootable NetBSD USB drive: + +Connect the USB drive. Check dmesg:\ +**\$ dmesg | tail**\ +Check to confirm which drive it is, for example, if you think its sd3:\ +**\$ disklabel sd3** + +Check that it wasn\'t automatically mounted. If it was, unmount it. For +example:\ +**\$ doas umount /dev/sd3i**\ + +dmesg told you what device it is. Overwrite the drive, writing the +NetBSD installer to it with dd. For example:\ +**\$ doas netbsd.iso of=/dev/rsdXc bs=1M; sync**\ + +You should now be able to boot the installer from your USB drive. +Continue reading, for information about how to do that. + +[Back to top of page](#pagetop). + +Prepare the USB drive (in GNU+Linux) +------------------------------------ + +If you downloaded your ISO on a GNU+Linux system, here is how to create +the bootable NetBSD USB drive: + +Connect the USB drive. Check dmesg:\ +**\$ dmesg**\ +Check lsblk to confirm which drive it is:\ +**\$ lsblk** + +Check that it wasn\'t automatically mounted. If it was, unmount it. For +example:\ +**\$ sudo umount /dev/sdX\***\ +**\# umount /dev/sdX\*** + +dmesg told you what device it is. Overwrite the drive, writing your +distro ISO to it with dd. For example:\ +**\$ sudo dd if=install60.fs of=/dev/sdX bs=8M; sync**\ +**\# dd if=netbsd.iso of=/dev/sdX bs=8M; sync** + +You should now be able to boot the installer from your USB drive. +Continue reading, for information about how to do that. + +[Back to top of page](#pagetop). + +</div> + +<div id="noencryption" class="section"> + +Installing NetBSD without full disk encryption +---------------------------------------------- + +You might have to use an external USB keyboard during the installation. +Press C to access the GRUB terminal. + +grub> **knetbsd -r sd0a (usb0,netbsd1)/netbsd**\ +grub> **boot** + +It will start booting into the NetBSD installer. Follow the normal +process for installing NetBSD. + +[Back to top of page](#pagetop). + +</div> + +<div id="encryption" class="section"> + +Installing NetBSD with full disk encryption +------------------------------------------- + +TODO + +[Back to top of page](#pagetop). + +</div> + +<div id="booting" class="section"> + +Booting +------- + +Press C in GRUB to access the command line: + +grub> **knetbsd -r wd0a (ahci0,netbsd1)/netbsd**\ +grub> **boot** + +NetBSD will start booting. Yay! + +[Back to top of page](#pagetop). + +</div> + +<div id="configuring_grub" class="section"> + +Configuring Grub +---------------- + +If you don\'t want to drop to the GRUB command line and type in a +command to boot NetBSD every time, you can create a GRUB configuration +that\'s aware of your NetBSD installation and that will automatically be +used by libreboot. + +On your NetBSD root partition, create the **/grub** directory and add +the file **libreboot\_grub.cfg** to it. Inside the +**libreboot\_grub.cfg** add these lines: + +**default=0 timeout=3 menuentry \"NetBSD\" {\ + knetbsd -r wd0a (ahci0,netbsd1)/netbsd\ +}\ +** + +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 NetBSD on the list. After 3 +seconds NetBSD will boot, or you can hit enter to boot. + +[Back to top of page](#pagetop). + +</div> + +<div id="troubleshooting" class="section"> + +Troubleshooting +=============== + +Most of these issues occur when using libreboot with coreboot\'s \'text +mode\' instead of the coreboot framebuffer. This mode is useful for +booting payloads like memtest86+ which expect text-mode, but for NetBSD +it can be problematic when they are trying to switch to a framebuffer +because it doesn\'t exist. + +In most cases, you should use the vesafb ROM images. Example filename: +libreboot\_ukdvorak\_vesafb.rom. + +won\'t boot\...something about file not found +--------------------------------------------- + +Your device names (i.e. usb0, usb1, sd0, sd1, wd0, ahci0, hd0, etc) and +numbers may differ. Use TAB completion. + +[Back to top of page](#pagetop). + +</div> + +<div class="section"> + +Copyright © 2016 Leah Rowe <info@minifree.org>\ +Copyright © 2016 Scott Bonds <scott@ggr.com>\ +Permission is granted to copy, distribute and/or modify this document +under the terms of the Creative Commons Attribution-ShareAlike 4.0 +International license or any later version published by Creative +Commons; A copy of the license can be found at +[../cc-by-sa-4.0.txt](../cc-by-sa-4.0.txt) + +Updated versions of the license (when available) can be found at +<https://creativecommons.org/licenses/by-sa/4.0/legalcode> + +UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE EXTENT +POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS AND +AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND +CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, IMPLIED, STATUTORY, +OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, WARRANTIES OF TITLE, +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, +ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OR ABSENCE +OF ERRORS, WHETHER OR NOT KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF +WARRANTIES ARE NOT ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT +APPLY TO YOU. + +TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU +ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) OR +OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, CONSEQUENTIAL, +PUNITIVE, EXEMPLARY, OR OTHER LOSSES, COSTS, EXPENSES, OR DAMAGES +ARISING OUT OF THIS PUBLIC LICENSE OR USE OF THE LICENSED MATERIAL, EVEN +IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSSES, +COSTS, EXPENSES, OR DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT +ALLOWED IN FULL OR IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + +The disclaimer of warranties and limitation of liability provided above +shall be interpreted in a manner that, to the extent possible, most +closely approximates an absolute disclaimer and waiver of all liability. + +</div> diff --git a/docs/bsd/openbsd.html b/docs/bsd/openbsd.html deleted file mode 100644 index 751e884a..00000000 --- a/docs/bsd/openbsd.html +++ /dev/null @@ -1,325 +0,0 @@ -<!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>How to install LibertyBSD or OpenBSD on a libreboot system</title> -</head> - -<body> - <div id="pagetop" class="section"> - <h1>How to install LibertyBSD or OpenBSD on a libreboot system</h1> - <p> - NOTE: This guide was written for OpenBSD by the person who contributed - it, but the libreboot project recommends LibertyBSD. - LibertyBSD is a version of OpenBSD without proprietary software - in the repositories (OpenBSD distributes firmware blobs for - devices inside its kernel). - Go to the <a href="http://libertybsd.net/">LibertyBSD website</a> - -- TODO: test on LibertyBSD and prioritise that in this guide. - </p> - <p> - This section relates to preparing, booting and installing - OpenBSD 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. - </p> - <ul> - <li><a href="#prepare">Prepare the USB drive (in OpenBSD)</a></li> - <li><a href="#noencryption">Installing OpenBSD without full disk encryption</a></li> - <li><a href="#encryption">Installing OpenBSD with full disk encryption</a></li> - <li><a href="#booting">Booting</a></li> - <li><a href="#configuring_grub">Configuring Grub</a></li> - <li><a href="#troubleshooting">Troubleshooting</a></li> - </ul> - <p> - <a href="./">Back to previous index</a> - </p> - </div> - - <div class="section"> - <p> - <b>This section is only for the GRUB payload. For depthcharge (used on CrOS devices in libreboot), instructions - have yet to be written in the libreboot documentation.</b> - </p> - </div> - - <div id="prepare" class="section"> - - <p> - install60.fs is the installation image for OpenBSD 6.0. Adapt - the filename accordingly, for a different OpenBSD version or - LibertyBSD. - </p> - - <h2>Prepare the USB drive (in LibertyBSD or OpenBSD)</h2> - - <p> - If you downloaded your ISO on a LibertyBSD or OpenBSD system, - here is how to create the bootable LibertyBSD/OpenBSD USB drive: - </p> - - <p> - Connect the USB drive. Check dmesg:<br/> - <b>$ dmesg | tail</b><br/> - - Check to confirm which drive it is, for example, if you think its sd3:<br/> - <b>$ disklabel sd3</b> - </p> - - <p> - Check that it wasn't automatically mounted. If it was, unmount it. For example:<br/> - <b>$ doas umount /dev/sd3i</b><br/> - </p> - - <p> - dmesg told you what device it is. Overwrite the drive, writing the OpenBSD installer to it with dd. For example:<br/> - <b>$ doas dd if=install60.fs of=/dev/rsdXc bs=1M; sync</b><br/> - </p> - - <p> - You should now be able to boot the installer from your USB drive. Continue reading, for - information about how to do that. - </p> - - <p> - <a href="#pagetop">Back to top of page</a>. - </p> - - <h2>Prepare the USB drive (in NetBSD)</h2> - <p> - <a href="https://wiki.netbsd.org/tutorials/how_to_install_netbsd_from_an_usb_memory_stick/">This page</a> - on the NetBSD website shows how to create a NetBSD bootable USB drive - from within NetBSD itself. You should use the <em>dd</em> method - documented there. This will also work with the OpenBSD image. - </p> - - <h2>Prepare the USB drive (in FreeBSD)</h2> - <p> - <a href="https://www.freebsd.org/doc/handbook/bsdinstall-pre.html">This page</a> - on the FreeBSD website shows how to create a bootable USB drive - for installing FreeBSD. Use the <em>dd</em> on that page. You can - also use the same instructions with a OpenBSD ISO image. - </p> - - <h2>Prepare the USB drive (in GNU+Linux)</h2> - - <p> - If you downloaded your ISO on a GNU+Linux system, - here is how to create the bootable OpenBSD USB drive: - </p> - - <p> - Connect the USB drive. Check dmesg:<br/> - <b>$ dmesg</b><br/> - - Check lsblk to confirm which drive it is:<br/> - <b>$ lsblk</b> - </p> - - <p> - Check that it wasn't automatically mounted. If it was, unmount it. For example:<br/> - <b>$ sudo umount /dev/sdX*</b><br/> - <b># umount /dev/sdX*</b> - </p> - - <p> - dmesg told you what device it is. Overwrite the drive, writing your distro ISO to it with dd. For example:<br/> - <b>$ sudo dd if=install60.fs of=/dev/sdX bs=8M; sync</b><br/> - <b># dd if=install60.fs of=/dev/sdX bs=8M; sync</b> - </p> - - <p> - You should now be able to boot the installer from your USB drive. Continue reading, for - information about how to do that. - </p> - - <p> - <a href="#pagetop">Back to top of page</a>. - </p> - - </div> - - - <div id="noencryption" class="section"> - - <h2>Installing OpenBSD without full disk encryption</h2> - - <p> - Press C in GRUB to access the command line: - </p> - <p> - grub> <b>kopenbsd (usb0,openbsd1)/6.0/amd64/bsd.rd</b><br/> - grub> <b>boot</b> - </p> - <p> - It will start booting into the OpenBSD installer. Follow the normal process for installing OpenBSD. - </p> - - <p> - <a href="#pagetop">Back to top of page</a>. - </p> - - </div> - - <div id="encryption" class="section"> - - <h2>Installing OpenBSD with full disk encryption</h2> - - <p> - 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. - </p> - - <p> - If booting in text mode (framebuffer mode might also work), it - might be possible to chainload the OpenBSD or LibertyBSD bootloader - from the MBR section on the internal storage device. This way, - it would be possible to boot with an encrypted OpenBSD or - LibertyBSD installation. Please let us know (contact details - are on the libreboot homepage) if you get it working this way. - </p> - <p> - Alternatively, it would be good to port OpenBSD either natively - as a coreboot payload, or port it to libpayload (payload library - in coreboot; it has a basic C library and a few functions for - certain operations e.g. text/bitmap). <strong>This would be ideal, - because then it would be possible to boot a truly fully encrypted - OpenBSD or LibertyBSD installation, by putting everything in - the flash chip.</strong> - </p> - <p> - Alternatively, modifying GRUB to support booting fully encrypted - OpenBSD installations would be possible, but probably not feasible; - it's an alien codebase to the OpenBSD project, not tightly integrated - and the OpenBSD bootloader already works. - </p> - - <p> - <a href="#pagetop">Back to top of page</a>. - </p> - - </div> - - <div id="booting" class="section"> - - <h2 id="booting">Booting</h2> - - <p> - Press C in GRUB to access the command line: - </p> - <p> - grub> <b>kopenbsd -r sd0a (ahci0,openbsd1)/bsd</b><br/> - grub> <b>boot</b> - </p> - <p> - OpenBSD will start booting. Yay! - </p> - - <p> - <a href="#pagetop">Back to top of page</a>. - </p> - - </div> - - <div id="configuring_grub" class="section"> - - <h2>Configuring Grub</h2> - - <p> - 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. - </p> - <p> - 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: - <p><b> - default=0 - timeout=3 - menuentry "OpenBSD" {<br> - kopenbsd -r sd0a (ahci0,openbsd1)/bsd<br> - }<br> - </b></p> - <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. - <p> - <a href="#pagetop">Back to top of page</a>. - </p> - - </div> - - <div id="troubleshooting" class="section"> - - <h1>Troubleshooting</h1> - - <p> - Most of these issues occur when using libreboot with coreboot's 'text mode' instead of the coreboot framebuffer. - This mode is useful for booting payloads like memtest86+ which expect text-mode, but for OpenBSD - it can be problematic when they are trying to switch to a framebuffer because it doesn't exist. - </p> - - <p> - In most cases, you should use the vesafb ROM images. Example filename: libreboot_ukdvorak_vesafb.rom. - </p> - - <h2>won't boot...something about file not found</h2> - <p> - Your device names (i.e. usb0, usb1, sd0, sd1, wd0, ahci0, hd0, etc) and numbers may differ. Use TAB completion. - </p> - - <p> - <a href="#pagetop">Back to top of page</a>. - </p> - - </div> - - <div class="section"> - - <p> - Copyright © 2016 Scott Bonds <scott@ggr.com><br/> - Copyright © 2016 Leah Rowe <info@minifree.org><br/> - Permission is granted to copy, distribute and/or modify this document - under the terms of the Creative Commons Attribution-ShareAlike 4.0 International license - or any later version published by Creative Commons; - - A copy of the license can be found at <a href="../cc-by-sa-4.0.txt">../cc-by-sa-4.0.txt</a> - </p> - - <p> - Updated versions of the license (when available) can be found at - <a href="https://creativecommons.org/licenses/by-sa/4.0/legalcode">https://creativecommons.org/licenses/by-sa/4.0/legalcode</a> - </p> - - <p> - UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE - EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS - AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF - ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, - IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, - WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, - ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT - KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT - ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. - </p> - <p> - TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE - TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, - NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, - INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, - COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR - USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR - DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR - IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. - </p> - <p> - The disclaimer of warranties and limitation of liability provided - above shall be interpreted in a manner that, to the extent - possible, most closely approximates an absolute disclaimer and - waiver of all liability. - </p> - - </div> - -</body> -</html> diff --git a/docs/bsd/openbsd.md b/docs/bsd/openbsd.md new file mode 100644 index 00000000..18d27fbb --- /dev/null +++ b/docs/bsd/openbsd.md @@ -0,0 +1,265 @@ +<div id="pagetop" class="section"> + +How to install LibertyBSD or OpenBSD on a libreboot system +========================================================== + +NOTE: This guide was written for OpenBSD by the person who contributed +it, but the libreboot project recommends LibertyBSD. LibertyBSD is a +version of OpenBSD without proprietary software in the repositories +(OpenBSD distributes firmware blobs for devices inside its kernel). Go +to the [LibertyBSD website](http://libertybsd.net/) \-- TODO: test on +LibertyBSD and prioritise that in this guide. + +This section relates to preparing, booting and installing OpenBSD on +your libreboot system, using nothing more than a USB flash drive (and +*dd*). They\'ve only been tested on a Lenovo ThinkPad x200. + +- [Prepare the USB drive (in OpenBSD)](#prepare) +- [Installing OpenBSD without full disk encryption](#noencryption) +- [Installing OpenBSD with full disk encryption](#encryption) +- [Booting](#booting) +- [Configuring Grub](#configuring_grub) +- [Troubleshooting](#troubleshooting) + +[Back to previous index](./) + +</div> + +<div class="section"> + +**This section is only for the GRUB payload. For depthcharge (used on +CrOS devices in libreboot), instructions have yet to be written in the +libreboot documentation.** + +</div> + +<div id="prepare" class="section"> + +install60.fs is the installation image for OpenBSD 6.0. Adapt the +filename accordingly, for a different OpenBSD version or LibertyBSD. + +Prepare the USB drive (in LibertyBSD or OpenBSD) +------------------------------------------------ + +If you downloaded your ISO on a LibertyBSD or OpenBSD system, here is +how to create the bootable LibertyBSD/OpenBSD USB drive: + +Connect the USB drive. Check dmesg:\ +**\$ dmesg | tail**\ +Check to confirm which drive it is, for example, if you think its sd3:\ +**\$ disklabel sd3** + +Check that it wasn\'t automatically mounted. If it was, unmount it. For +example:\ +**\$ doas umount /dev/sd3i**\ + +dmesg told you what device it is. Overwrite the drive, writing the +OpenBSD installer to it with dd. For example:\ +**\$ doas dd if=install60.fs of=/dev/rsdXc bs=1M; sync**\ + +You should now be able to boot the installer from your USB drive. +Continue reading, for information about how to do that. + +[Back to top of page](#pagetop). + +Prepare the USB drive (in NetBSD) +--------------------------------- + +[This +page](https://wiki.netbsd.org/tutorials/how_to_install_netbsd_from_an_usb_memory_stick/) +on the NetBSD website shows how to create a NetBSD bootable USB drive +from within NetBSD itself. You should use the *dd* method documented +there. This will also work with the OpenBSD image. + +Prepare the USB drive (in FreeBSD) +---------------------------------- + +[This page](https://www.freebsd.org/doc/handbook/bsdinstall-pre.html) on +the FreeBSD website shows how to create a bootable USB drive for +installing FreeBSD. Use the *dd* on that page. You can also use the same +instructions with a OpenBSD ISO image. + +Prepare the USB drive (in GNU+Linux) +------------------------------------ + +If you downloaded your ISO on a GNU+Linux system, here is how to create +the bootable OpenBSD USB drive: + +Connect the USB drive. Check dmesg:\ +**\$ dmesg**\ +Check lsblk to confirm which drive it is:\ +**\$ lsblk** + +Check that it wasn\'t automatically mounted. If it was, unmount it. For +example:\ +**\$ sudo umount /dev/sdX\***\ +**\# umount /dev/sdX\*** + +dmesg told you what device it is. Overwrite the drive, writing your +distro ISO to it with dd. For example:\ +**\$ sudo dd if=install60.fs of=/dev/sdX bs=8M; sync**\ +**\# dd if=install60.fs of=/dev/sdX bs=8M; sync** + +You should now be able to boot the installer from your USB drive. +Continue reading, for information about how to do that. + +[Back to top of page](#pagetop). + +</div> + +<div id="noencryption" class="section"> + +Installing OpenBSD without full disk encryption +----------------------------------------------- + +Press C in GRUB to access the command line: + +grub> **kopenbsd (usb0,openbsd1)/6.0/amd64/bsd.rd**\ +grub> **boot** + +It will start booting into the OpenBSD installer. Follow the normal +process for installing OpenBSD. + +[Back to top of page](#pagetop). + +</div> + +<div id="encryption" class="section"> + +Installing OpenBSD with full disk encryption +-------------------------------------------- + +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 *boot* an +OpenBSD+FDE installation using libreboot+Grub2. If you get it working, +please let us know. + +If booting in text mode (framebuffer mode might also work), it might be +possible to chainload the OpenBSD or LibertyBSD bootloader from the MBR +section on the internal storage device. This way, it would be possible +to boot with an encrypted OpenBSD or LibertyBSD installation. Please let +us know (contact details are on the libreboot homepage) if you get it +working this way. + +Alternatively, it would be good to port OpenBSD either natively as a +coreboot payload, or port it to libpayload (payload library in coreboot; +it has a basic C library and a few functions for certain operations e.g. +text/bitmap). **This would be ideal, because then it would be possible +to boot a truly fully encrypted OpenBSD or LibertyBSD installation, by +putting everything in the flash chip.** + +Alternatively, modifying GRUB to support booting fully encrypted OpenBSD +installations would be possible, but probably not feasible; it\'s an +alien codebase to the OpenBSD project, not tightly integrated and the +OpenBSD bootloader already works. + +[Back to top of page](#pagetop). + +</div> + +<div id="booting" class="section"> + +Booting +------- + +Press C in GRUB to access the command line: + +grub> **kopenbsd -r sd0a (ahci0,openbsd1)/bsd**\ +grub> **boot** + +OpenBSD will start booting. Yay! + +[Back to top of page](#pagetop). + +</div> + +<div id="configuring_grub" class="section"> + +Configuring Grub +---------------- + +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. + +On your OpenBSD root partition, create the **/grub** directory and add +the file **libreboot\_grub.cfg** to it. Inside the +**libreboot\_grub.cfg** add these lines: + +**default=0 timeout=3 menuentry \"OpenBSD\" {\ + kopenbsd -r sd0a (ahci0,openbsd1)/bsd\ +}\ +** + +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. + +[Back to top of page](#pagetop). + +</div> + +<div id="troubleshooting" class="section"> + +Troubleshooting +=============== + +Most of these issues occur when using libreboot with coreboot\'s \'text +mode\' instead of the coreboot framebuffer. This mode is useful for +booting payloads like memtest86+ which expect text-mode, but for OpenBSD +it can be problematic when they are trying to switch to a framebuffer +because it doesn\'t exist. + +In most cases, you should use the vesafb ROM images. Example filename: +libreboot\_ukdvorak\_vesafb.rom. + +won\'t boot\...something about file not found +--------------------------------------------- + +Your device names (i.e. usb0, usb1, sd0, sd1, wd0, ahci0, hd0, etc) and +numbers may differ. Use TAB completion. + +[Back to top of page](#pagetop). + +</div> + +<div class="section"> + +Copyright © 2016 Scott Bonds <scott@ggr.com>\ +Copyright © 2016 Leah Rowe <info@minifree.org>\ +Permission is granted to copy, distribute and/or modify this document +under the terms of the Creative Commons Attribution-ShareAlike 4.0 +International license or any later version published by Creative +Commons; A copy of the license can be found at +[../cc-by-sa-4.0.txt](../cc-by-sa-4.0.txt) + +Updated versions of the license (when available) can be found at +<https://creativecommons.org/licenses/by-sa/4.0/legalcode> + +UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE EXTENT +POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS AND +AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND +CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, IMPLIED, STATUTORY, +OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, WARRANTIES OF TITLE, +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, +ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OR ABSENCE +OF ERRORS, WHETHER OR NOT KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF +WARRANTIES ARE NOT ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT +APPLY TO YOU. + +TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU +ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) OR +OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, CONSEQUENTIAL, +PUNITIVE, EXEMPLARY, OR OTHER LOSSES, COSTS, EXPENSES, OR DAMAGES +ARISING OUT OF THIS PUBLIC LICENSE OR USE OF THE LICENSED MATERIAL, EVEN +IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSSES, +COSTS, EXPENSES, OR DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT +ALLOWED IN FULL OR IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + +The disclaimer of warranties and limitation of liability provided above +shall be interpreted in a manner that, to the extent possible, most +closely approximates an absolute disclaimer and waiver of all liability. + +</div> |