To install over a serial port connect with `115200n8` (e.g.
`picocom -b 115200 /dev/ttyUSB0`). When the bootloader lists boot
entries, select the serial console boot entry.
### Networking in the installer {#sec-installation-manual-networking}
[]{#sec-installation-booting-networking} <!-- legacy anchor -->
The boot process should have brought up networking (check `ip
a`). Networking is necessary for the installer, since it will
download lots of stuff (such as source tarballs or Nixpkgs channel
binaries). It's best if you have a DHCP server on your network.
Otherwise configure networking manually using `ip`.
You can configure the network, Wi-Fi included, through NetworkManager.
Using the `nmtui` program, you can do so even in a non-graphical session.
If you prefer to configure the network manually, disable NetworkManager with
`systemctl stop NetworkManager`.
If you would like to continue the installation from a different machine
you can use activated SSH daemon. You need to copy your ssh key to
either `/home/nixos/.ssh/authorized_keys` or
`/root/.ssh/authorized_keys` (Tip: For installers with a modifiable
filesystem such as the sd-card installer image a key can be manually
placed by mounting the image on a different machine). Alternatively you
must set a password for either `root` or `nixos` with `passwd` to be
able to login.
### Partitioning and formatting {#sec-installation-manual-partitioning}
[]{#sec-installation-partitioning} <!-- legacy anchor -->
The NixOS installer doesn't do any partitioning or formatting, so you
need to do that yourself.
The NixOS installer ships with multiple partitioning tools. The examples
below use `parted`, but also provides `fdisk`, `gdisk`, `cfdisk`, and
`cgdisk`.
Use the command 'lsblk' to find the name of your 'disk' device.
The recommended partition scheme differs depending if the computer uses
*Legacy Boot* or *UEFI*.
#### UEFI (GPT) {#sec-installation-manual-partitioning-UEFI}
[]{#sec-installation-partitioning-UEFI} <!-- legacy anchor -->
Here's an example partition scheme for UEFI, using `/dev/sda` as the
device.
::: {.note}
You can safely ignore `parted`'s informational message about needing to
update /etc/fstab.
:::
1. Create a *GPT* partition table.
```ShellSession
# parted /dev/sda -- mklabel gpt
```
2. Add the *root* partition. This will fill the disk except for the end
part, where the swap will live, and the space left in front (512MiB)
which will be used by the boot partition.
```ShellSession
# parted /dev/sda -- mkpart root ext4 512MB -8GB
```
3. Next, add a *swap* partition. The size required will vary according
to needs, here a 8GB one is created.
```ShellSession
# parted /dev/sda -- mkpart swap linux-swap -8GB 100%
```
::: {.note}
The swap partition size rules are no different than for other Linux
distributions.
:::
4. Finally, the *boot* partition. NixOS by default uses the ESP (EFI
system partition) as its */boot* partition. It uses the initially
reserved 512MiB at the start of the disk.
```ShellSession
# parted /dev/sda -- mkpart ESP fat32 1MB 512MB
# parted /dev/sda -- set 3 esp on
```
::: {.note}
In case you decided to not create a swap partition, replace `3` by `2`. To be sure of the id number of ESP, run `parted --list`.
:::
Once complete, you can follow with
[](#sec-installation-manual-partitioning-formatting).
#### Legacy Boot (MBR) {#sec-installation-manual-partitioning-MBR}
[]{#sec-installation-partitioning-MBR} <!-- legacy anchor -->
Here's an example partition scheme for Legacy Boot, using `/dev/sda` as
the device.
::: {.note}
You can safely ignore `parted`'s informational message about needing to
update /etc/fstab.
:::
1. Create a *MBR* partition table.
```ShellSession
# parted /dev/sda -- mklabel msdos
```
2. Add the *root* partition. This will fill the the disk except for the
end part, where the swap will live.
```ShellSession