xref: /dragonfly/usr.sbin/efisetup/efisetup.8 (revision ffe53622)
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
37.Dx
38on a drive.
39The drive will be completely reformatted and any prior contents will be
40lost!
41.Bl -tag -width 20m
42.It Fl s Ar swapsize{m,g}
43Specify the size of the swap partition, default is "8g".
44.It Fl S Ar serialno
45Specify the serial number of the device as it would appear
46under
47.Pa /dev/serno/* .
48In most cases this is simply the reported serial number, however note that the
49.Xr nvme 4
50driver will tack on a namespace id to the reported serial number,
51typically "-1".
52Only specify the serial number, do not specify a path prefix.
53If you use this option the script will install path references in fstab
54and so forth using the
55.Pa serno/
56path.
57If you do not use this option, the drive name will be used instead.
58We recommend using this option.
59.It Ar drive
60Specify the drive, for example "nvme0".
61You may omit the
62.Pa /dev/
63prefix if you wish.
64The raw drive should be specified, do not specify a
65.Pa serno/
66path here.
67.El
68.Sh USAGE
69.Nm
70expects you to have completed a buildworld and buildkernel
71sequence before running the program, see
72.Xr build 7
73for more information on how to build a fresh system.
74.Pp
75.Nm
76will create a fresh GPT slice table with two slices,
77install the required EFI boot files on slice 0, and
78install a
79.Dx
8064-bit disklabel on slice 1.
81The program will then proceed to create partitions 'a', 'b', and 'c'
82in the disklabel, mount them, and install the world and kernel.
83.Pp
84After the world and kernel are installed,
85.Nm
86will make adjustments to the target
87.Pa /boot/loader.conf ,
88.Pa /etc/fstab ,
89and
90.Pa /etc/rc.conf
91with the appropriate disk paths, then unmount.
92.Pp
93After completion of the operation you should be able to boot from the
94drive and then finish up your adjustments to
95.Pa /etc/rc.conf
96to get the network up and so forth.
97This script does only a very basic installation.
98For a more substantial initial installation you should boot from a
99.Dx
100install image and select an EFI installation.
101.Sh SEE ALSO
102.Xr uefi 8
103.Sh HISTORY
104The
105.Nm
106utility appeared in
107.Dx 4.8 .
108