···11-<section xmlns="http://docbook.org/ns/docbook"
22- xmlns:xlink="http://www.w3.org/1999/xlink"
33- xmlns:xi="http://www.w3.org/2001/XInclude"
44- version="5.0"
55- xml:id="sec-uefi-installation">
66-77-<title>UEFI Installation</title>
88-99-<para>NixOS can also be installed on UEFI systems. The procedure
1010-is by and large the same as a BIOS installation, with the following
1111-changes:
1212-1313-<itemizedlist>
1414- <listitem>
1515- <para>You should boot the live CD in UEFI mode (consult your
1616- specific hardware's documentation for instructions). You may find
1717- the <link
1818- xlink:href="http://www.rodsbooks.com/refind">rEFInd
1919- boot manager</link> useful.</para>
2020- </listitem>
2121- <listitem>
2222- <para>Instead of <command>fdisk</command>, you should use
2323- <command>gdisk</command> to partition your disks. You will need to
2424- have a separate partition for <filename>/boot</filename> with
2525- partition code EF00, and it should be formatted as a
2626- <literal>vfat</literal> filesystem.</para>
2727- </listitem>
2828- <listitem>
2929- <para>Instead of <option>boot.loader.grub.device</option>,
3030- you must set <option>boot.loader.systemd-boot.enable</option> to
3131- <literal>true</literal>. <command>nixos-generate-config</command>
3232- should do this automatically for new configurations when booted in
3333- UEFI mode.</para>
3434- </listitem>
3535- <listitem>
3636- <para>After having mounted your installation partition to
3737- <code>/mnt</code>, you must mount the <code>boot</code> partition
3838- to <code>/mnt/boot</code>.</para>
3939- </listitem>
4040- <listitem>
4141- <para>You may want to look at the options starting with
4242- <option>boot.loader.efi</option> and <option>boot.loader.systemd-boot</option>
4343- as well.</para>
4444- </listitem>
4545-</itemizedlist>
4646-</para>
4747-4848-</section>
+114-8
nixos/doc/manual/installation/installing.xml
···6677<title>Installing NixOS</title>
8899+<para>NixOS can be installed on BIOS or UEFI systems. The procedure
1010+for a UEFI installation is by and large the same as a BIOS installation. The differences are mentioned in the steps that follow.</para>
1111+912<orderedlist>
10131111- <listitem><para>Boot from the CD.</para></listitem>
1414+ <listitem><para>Boot from the CD.</para>
1515+ <variablelist>
1616+ <varlistentry><term>UEFI systems</term>
1717+ <listitem><para>You should boot the live CD in UEFI mode
1818+ (consult your specific hardware's documentation for instructions).
1919+ You may find the <link xlink:href="http://www.rodsbooks.com/refind">rEFInd boot
2020+ manager</link> useful.</para></listitem></varlistentry></variablelist></listitem>
12211322 <listitem><para>The CD contains a basic NixOS installation. (It
1423 also contains Memtest86+, useful if you want to test new hardware).
···5059 <itemizedlist>
51605261 <listitem><para>For partitioning:
5353- <command>fdisk</command>.</para></listitem>
6262+ <command>fdisk</command>.
6363+<screen>
6464+# fdisk /dev/sda # <lineannotation>(or whatever device you want to install on)</lineannotation>
6565+-- for UEFI systems only
6666+> n # <lineannotation>(create a new partition for /boot)</lineannotation>
6767+> 3 # <lineannotation>(make it a partition number 3)</lineannotation>
6868+> # <lineannotation>(press enter to accept the default)</lineannotation>
6969+> +512M # <lineannotation>(the size of the UEFI boot partition)</lineannotation>
7070+> t # <lineannotation>(change the partition type ...)</lineannotation>
7171+> 3 # <lineannotation>(... of the boot partition ...)</lineannotation>
7272+> 1 # <lineannotation>(... to 'UEFI System')</lineannotation>
7373+-- for BIOS or UEFI systems
7474+> n # <lineannotation>(create a new partition for /swap)</lineannotation>
7575+> 2 # <lineannotation>(make it a partition number 2)</lineannotation>
7676+> # <lineannotation>(press enter to accept the default)</lineannotation>
7777+> +8G # <lineannotation>(the size of the swap partition, set to whatever you like)</lineannotation>
7878+> n # <lineannotation>(create a new partition for /)</lineannotation>
7979+> 1 # <lineannotation>(make it a partition number 1)</lineannotation>
8080+> # <lineannotation>(press enter to accept the default)</lineannotation>
8181+> # <lineannotation>(press enter to accept the default and use the rest of the remaining space)</lineannotation>
8282+> a # <lineannotation>(make the partition bootable)</lineannotation>
8383+> x # <lineannotation>(enter expert mode)</lineannotation>
8484+> f # <lineannotation>(fix up the partition ordering)</lineannotation>
8585+> r # <lineannotation>(exit expert mode)</lineannotation>
8686+> w # <lineannotation>(write the partition table to disk and exit)</lineannotation></screen></para></listitem>
54875588 <listitem><para>For initialising Ext4 partitions:
5689 <command>mkfs.ext4</command>. It is recommended that you assign a
···67100 <listitem><para>For creating swap partitions:
68101 <command>mkswap</command>. Again it’s recommended to assign a
69102 label to the swap partition: <option>-L
7070- <replaceable>label</replaceable></option>.</para></listitem>
103103+ <replaceable>label</replaceable></option>. For example:
104104+105105+<screen>
106106+# mkswap -L swap /dev/sda2</screen>
107107+108108+ </para></listitem>
109109+110110+ <listitem>
111111+ <variablelist>
112112+ <varlistentry><term>UEFI systems</term>
113113+ <listitem><para>For creating boot partitions:
114114+ <command>mkfs.fat</command>. Again it’s recommended to assign a
115115+ label to the boot partition: <option>-L
116116+ <replaceable>label</replaceable></option>. For example:
117117+118118+<screen>
119119+# mkfs.fat -F 32 -L boot /dev/sda3</screen>
120120+121121+ </para></listitem></varlistentry></variablelist></listitem>
7112272123 <listitem><para>For creating LVM volumes, the LVM commands, e.g.,
73124···9514696147 </para></listitem>
97148149149+ <listitem>
150150+ <variablelist>
151151+ <varlistentry><term>UEFI systems</term>
152152+ <listitem><para>Mount the boot file system on <filename>/mnt/boot</filename>, e.g.
153153+154154+<screen>
155155+# mount /dev/disk/by-label/boot /mnt/boot
156156+</screen>
157157+158158+ </para></listitem></varlistentry></variablelist></listitem>
159159+98160 <listitem><para>If your machine has a limited amount of memory, you
99161 may want to activate swap devices now (<command>swapon
100162 <replaceable>device</replaceable></command>). The installer (or
101163 rather, the build actions that it may spawn) may need quite a bit of
102102- RAM, depending on your configuration.</para></listitem>
164164+ RAM, depending on your configuration.
165165+166166+<screen>
167167+# swapon /dev/sda2</screen>
168168+169169+ </para></listitem>
103170104171 <listitem>
105172···135202 install Emacs by running <literal>nix-env -i
136203 emacs</literal>.</para>
137204138138- <para>You <emphasis>must</emphasis> set the option
205205+ <variablelist>
206206+207207+ <varlistentry><term>BIOS systems</term>
208208+ <listitem><para>You <emphasis>must</emphasis> set the option
139209 <option>boot.loader.grub.device</option> to specify on which disk
140210 the GRUB boot loader is to be installed. Without it, NixOS cannot
141141- boot.</para>
211211+ boot.</para></listitem></varlistentry>
212212+213213+ <varlistentry><term>UEFI systems</term>
214214+ <listitem><para>You <emphasis>must</emphasis> set the option
215215+ <option>boot.loader.systemd-boot.enable</option> to <literal>true</literal>.
216216+ <command>nixos-generate-config</command> should do this automatically for new
217217+ configurations when booted in
218218+ UEFI mode.</para>
219219+ <para>You may want to look at the options starting with
220220+ <option>boot.loader.efi</option> and <option>boot.loader.systemd-boot</option>
221221+ as well.</para></listitem></varlistentry>
222222+223223+ </variablelist>
142224143225 <para>If there are other operating systems running on the machine before
144226 installing NixOS, the
···247329<example xml:id='ex-install-sequence'><title>Commands for Installing NixOS on <filename>/dev/sda</filename></title>
248330<screen>
249331# fdisk /dev/sda # <lineannotation>(or whatever device you want to install on)</lineannotation>
332332+-- for UEFI systems only
333333+> n # <lineannotation>(create a new partition for /boot)</lineannotation>
334334+> 3 # <lineannotation>(make it a partition number 3)</lineannotation>
335335+> # <lineannotation>(press enter to accept the default)</lineannotation>
336336+> +512M # <lineannotation>(the size of the UEFI boot partition)</lineannotation>
337337+> t # <lineannotation>(change the partition type ...)</lineannotation>
338338+> 3 # <lineannotation>(... of the boot partition ...)</lineannotation>
339339+> 1 # <lineannotation>(... to 'UEFI System')</lineannotation>
340340+-- for BIOS or UEFI systems
341341+> n # <lineannotation>(create a new partition for /swap)</lineannotation>
342342+> 2 # <lineannotation>(make it a partition number 2)</lineannotation>
343343+> # <lineannotation>(press enter to accept the default)</lineannotation>
344344+> +8G # <lineannotation>(the size of the swap partition)</lineannotation>
345345+> n # <lineannotation>(create a new partition for /)</lineannotation>
346346+> 1 # <lineannotation>(make it a partition number 1)</lineannotation>
347347+> # <lineannotation>(press enter to accept the default)</lineannotation>
348348+> # <lineannotation>(press enter to accept the default and use the rest of the remaining space)</lineannotation>
349349+> a # <lineannotation>(make the partition bootable)</lineannotation>
350350+> x # <lineannotation>(enter expert mode)</lineannotation>
351351+> f # <lineannotation>(fix up the partition ordering)</lineannotation>
352352+> r # <lineannotation>(exit expert mode)</lineannotation>
353353+> w # <lineannotation>(write the partition table to disk and exit)</lineannotation>
250354# mkfs.ext4 -L nixos /dev/sda1
251355# mkswap -L swap /dev/sda2
252356# swapon /dev/sda2
357357+# mkfs.fat -F 32 -L boot /dev/sda3 # <lineannotation>(for UEFI systems only)</lineannotation>
253358# mount /dev/disk/by-label/nixos /mnt
359359+# mount /dev/disk/by-label/boot /mnt/boot # <lineannotation>(for UEFI systems only)</lineannotation>
254360# nixos-generate-config --root /mnt
255361# nano /mnt/etc/nixos/configuration.nix
256362# nixos-install
···267373 ./hardware-configuration.nix
268374 ];
269375270270- boot.loader.grub.device = "/dev/sda";
376376+ boot.loader.grub.device = "/dev/sda"; # <lineannotation>(for BIOS systems only)</lineannotation>
377377+ boot.loader.systemd-boot.enable = true; # <lineannotation>(for UEFI systems only)</lineannotation>
271378272379 # Note: setting fileSystems is generally not
273380 # necessary, since nixos-generate-config figures them out
···279386}</screen>
280387</example>
281388282282-<xi:include href="installing-uefi.xml" />
283389<xi:include href="installing-usb.xml" />
284390<xi:include href="installing-pxe.xml" />
285391<xi:include href="installing-virtualbox-guest.xml" />
+1-1
nixos/doc/manual/release-notes/rl-1404.xml
···1313<itemizedlist>
14141515 <listitem><para>Installation on UEFI systems is now supported. See
1616- <xref linkend="sec-uefi-installation"/> for
1616+ <xref linkend="sec-installation"/> for
1717 details.</para></listitem>
18181919 <listitem><para>Systemd has been updated to version 212, which has