Diff for /wikisrc/Installation_on_UEFI_systems.mdwn between versions 1.1 and 1.3

version 1.1, 2018/06/12 11:06:18 version 1.3, 2019/07/26 07:30:42
Line 1 Line 1
 ## Installing NetBSD 8.0 on a x86 system with UEFI  ## Installing NetBSD 8.0 on a x86 system with UEFI
   
 Modern x86 machines have UEFI instead of BIOS firmware. Unfortunately, as of the upcoming NetBSD 8.0 release the installer does not fully support this setup. We hope to address this shortcoming quickly after the NetBSD 8.0 release and provide full automatic installations for this kind of systems (and also mixed operating system setups) in NetBSD 8.1.  Modern x86 machines have UEFI instead of BIOS firmware. Unfortunately, as of the NetBSD 8.0 release the installer did not fully support this setup.
   
 This tutorial shows how to semi-manually do it. For simplicity we assume that you have booted the UEFI install image from a USB stick and want to install NetBSD onto the whole disk in the machine.  For NetBSD-current and NetBSD 9 the installer has been enhanced, it should automatically do the right thing for your machine, no matter if it has BIOS or UEFI firmware, or how big the disks are.
   
   This tutorial (__only for NetBSD 8.x!__) shows how to semi-manually do it. For simplicity we assume that you have booted the UEFI install image from a USB stick and want to install NetBSD onto the whole disk in the machine.
   
 ### Getting out of the Installer  ### Getting out of the Installer
   
Line 33  Let us look at another example, this tim Line 35  Let us look at another example, this tim
         # sysctl hw.disknames          # sysctl hw.disknames
         hw.disknames = wd0 dk0 dk1 dk2 dk3 sd0 dk4 dk5          hw.disknames = wd0 dk0 dk1 dk2 dk3 sd0 dk4 dk5
   
 Here the internal SSD is showing up as wd0, and has Windows pre installed (dk0 .. dk3). The install image USB stick again shows up as sd0 with two wedges dk4 and dk5.  Here the internal SSD is showing up as wd0, and has Windows pre-installed (dk0 .. dk3). The install image USB stick again shows up as sd0 with two wedges dk4 and dk5.
   
 Just to be sure let us check which device the installer booted from:  Just to be sure let us check which device the installer booted from:
   
Line 68  You can check more details about individ Line 70  You can check more details about individ
         wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA moded 6 (Ultra/133)          wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA moded 6 (Ultra/133)
         wd0(ahcisata1:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133) (using DMA)          wd0(ahcisata1:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133) (using DMA)
   
 **NOTE** for this tutorial screenshots have been created using VirtualBox. The following example uses a strange tiny 30 GB (virtual) hard disk. Also on VirtualBox it is quite tricky (or impossible?) to actually boot from a USB device - instead the USB install image was converted to a virtual disk image and the machine booted from that. This makes the install image show up as *wd1*.  **NOTE** for this tutorial screenshots have been created using VirtualBox. The following example uses a strange tiny 30 GB (virtual) hard disk. Also on VirtualBox it is quite tricky (or impossible?) to actually boot from a USB device - instead the USB install image was converted to a virtual disk image, and the machine booted from that. This makes the install image show up as *wd1*.
   
 Here are the target disk details:  Here are the target disk details:
   
Line 78  Here are the target disk details: Line 80  Here are the target disk details:
   
 So now that we have identified the disk and got the details, we need to plan our disk layout.  So now that we have identified the disk and got the details, we need to plan our disk layout.
   
 We will need two partitions, one for UEFI to boot from, and the NetBSD root disk partition. Depending on planed use for the machine, we also will want a swap partition. This should not be smaller than the machines RAM size, so in case of a kernel panic a crash dump can be saved and recovered on next reboot. For this example let us calculate with 8 GB RAM and no special needs for more swap.  We will need two partitions, one for UEFI to boot from, and the NetBSD root disk partition. Depending on planned use for the machine, we also will want a swap partition. This should not be smaller than the machine's RAM size, so in case of a kernel panic a crash dump can be saved and recovered on next reboot. For this example let us calculate with 8 GB RAM and no special needs for more swap.
   
 So we have a 30 GB disk, we subtract 8 GB of swap and a bit of space for the UEFI boot partition. That leaves us with (rounded down) 21 GB of space for the main NetBSD partition.  So we have a 30 GB disk, we subtract 8 GB of swap and a bit of space for the UEFI boot partition. That leaves us with (rounded down) 21 GB of space for the main NetBSD partition.
   
Line 97  Next we create a new partition table and Line 99  Next we create a new partition table and
         # gpt add -a 2m -l NetBSD -t ffs -s 21g wd0          # gpt add -a 2m -l NetBSD -t ffs -s 21g wd0
         # gpt add -a 2m -l swap -t swap wd0          # gpt add -a 2m -l swap -t swap wd0
   
 Then we check the result  Then we check the result:
   
         # gpt show wd0          # gpt show wd0
   

Removed from v.1.1  
changed lines
  Added in v.1.3


CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb