85 lines
2.1 KiB
ReStructuredText
85 lines
2.1 KiB
ReStructuredText
.. highlight:: sh
|
|
|
|
Preparation
|
|
======================
|
|
|
|
.. contents:: Table of Contents
|
|
:local:
|
|
|
|
#. Disable Secure Boot. ZFS modules can not be loaded if Secure Boot is enabled.
|
|
#. Download latest extended variant of `Alpine Linux live image
|
|
<https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/x86_64/>`__ and boot from it.
|
|
#. Login as root user. There is no password.
|
|
#. Configure Internet::
|
|
|
|
setup-interfaces -r
|
|
# example:
|
|
network interface: wlan0
|
|
WiFi name: <ssid>
|
|
ip address: dhcp
|
|
<enter done to finish network config>
|
|
manual netconfig: n
|
|
|
|
#. Configure SSH server::
|
|
|
|
setup-sshd
|
|
# example:
|
|
ssh server: openssh
|
|
allow root: "prohibit-password" or "yes"
|
|
ssh key: "none" or "<public key>"
|
|
|
|
Configurations set here will be copied verbatim to the installed system.
|
|
|
|
#. Set root password or ``/root/.ssh/authorized_keys``.
|
|
|
|
#. Connect from another computer::
|
|
|
|
ssh root@192.168.1.19
|
|
|
|
#. Configure NTP client for time synchronization::
|
|
|
|
setup-ntp chrony
|
|
|
|
#. Pick a mirror from `Alpine Mirrors <https://mirrors.alpinelinux.org/>`__
|
|
and add it to package manager configuration::
|
|
|
|
tee -a /etc/apk/repositories <<EOF
|
|
https://dl-5.alpinelinux.org/alpine/latest-stable/community/
|
|
https://dl-5.alpinelinux.org/alpine/latest-stable/main/
|
|
EOF
|
|
|
|
#. Throughout this guide, we use predictable disk names generated by udev::
|
|
|
|
apk update
|
|
apk add eudev
|
|
setup-udev
|
|
|
|
It can be removed after reboot with ``setup-devd mdev && apk del eudev``.
|
|
|
|
#. Target disk
|
|
|
|
List available disks with::
|
|
|
|
ls /dev/disk/by-id/*
|
|
|
|
If using virtio as disk bus, use ``/dev/disk/by-path/*``.
|
|
|
|
Declare disk array::
|
|
|
|
DISK='/dev/disk/by-id/ata-FOO /dev/disk/by-id/nvme-BAR'
|
|
|
|
For single disk installation, use::
|
|
|
|
DISK='/dev/disk/by-id/disk1'
|
|
|
|
#. Install ZFS support and partition tool::
|
|
|
|
apk add zfs zfs-lts sgdisk e2fsprogs
|
|
modprobe zfs
|
|
|
|
Many errors about firmware will appear. They are safe to ignore.
|
|
|
|
#. Install bootloader for both legacy boot and UEFI::
|
|
|
|
apk add grub-bios grub-efi
|