123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302 |
- <!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 class="section"><p>If you're using libreboot from git, note that only CrOS devices build at the moment. We merged a newly rewritten build system recently, and we've yet to complete re-integration of older boards into Libreboot. Use Libreboot 20160907 for the time being, unless you're involved in libreboot development</p></div>
- <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>
|