1.\" Copyright (c) 2017 Matthew Dillon, All rights reserved. 2.\" 3.\" Redistribution and use in source and binary forms, with or without 4.\" modification, are permitted provided that the following conditions 5.\" are met: 6.\" 1. Redistributions of source code must retain the above copyright 7.\" notice, this list of conditions and the following disclaimer. 8.\" 2. Redistributions in binary form must reproduce the above copyright 9.\" notice, this list of conditions and the following disclaimer in the 10.\" documentation and/or other materials provided with the distribution. 11.\" 12.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 13.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 14.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 15.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 16.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 17.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 18.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 19.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 20.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 21.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 22.\" SUCH DAMAGE. 23.\" 24.Dd March 22, 2017 25.Dt EFISETUP 8 26.Os 27.Sh NAME 28.Nm efisetup 29.Nd Create a complete UEFI install on a fresh drive 30.Sh SYNOPSIS 31.Nm 32.Op Fl s Ar swapsize{m,g} 33.Op Fl S Ar serialno 34.Ar drive 35.Sh DESCRIPTION 36This program will create a fresh UEFI install of DragonFly on a drive. 37The drive will be completely reformatted and any prior contents will be 38lost! 39.Bl -tag -width 20m 40.It Fl s Ar swapsize{m,g} 41Specify the size of the swap partition, default is "8g". 42.It Fl S Ar serialno 43Specify the serial number of the device as it would appear 44under 45.Pa /dev/serno/* . 46In most cases this is simply the reported serial number, however note that the 47.Xr nvme 4 48driver will tack on a namespace id to the reported serial number, 49typically "-1". 50Only specify the serial number, do not specify a path prefix. 51If you use this option the script will install path references in fstab 52and so forth using the 53.Pa serno/ 54path. 55If you do not use this option, the drive name will be used instead. 56We recommend using this option. 57.It Ar drive 58Specify the drive, for example "nvme0". 59You may omit the 60.Pa /dev/ 61prefix if you wish. 62The raw drive should be specified, do not specify a 63.Pa serno/ 64path here. 65.El 66.Sh USAGE 67.Nm 68expects you to have completed a buildworld and buildkernel 69sequence before running the program, see 70.Xr build 7 71for more information on how to build a fresh system. 72.Pp 73.Nm 74will create a fresh GPT slice table with two slices, 75install the required EFI boot files on slice 0, and 76install a DragonFly 64-bit disklabel on slice 1. 77The program will then proceed to create partitions 'a', 'b', and 'c' 78in the disklabel, mount them, and install the world and kernel. 79.Pp 80After the world and kernel are installed, 81.Nm 82will make adjustments to the target 83.Pa /boot/loader.conf , 84.Pa /etc/fstab , 85and 86.Pa /etc/rc.conf 87with the appropriate disk paths, then unmount. 88.Pp 89After completion of the operation you should be able to boot from the 90drive and then finish up your adjustments to 91.Pa /etc/rc.conf 92to get the network up and so forth. 93This script does only a very basic installation. 94For a more substantial initial installation you should boot from a 95.Dx 96install image and select an EFI installation. 97.Sh SEE ALSO 98.Xr uefi 8 99.Sh HISTORY 100The 101.Nm 102utility appeared in 103.Dx 4.8 . 104