pc_engines_apu2_arch_linux
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
pc_engines_apu2_arch_linux [2019/12/30 18:17] – admin | pc_engines_apu2_arch_linux [2019/12/30 18:36] – admin | ||
---|---|---|---|
Line 27: | Line 27: | ||
====Install Arch Linux==== | ====Install Arch Linux==== | ||
- | The next steps will install Arch Linux on an unencrypted root filesystem. | + | |
- | + | * Configure serial console, when still in chroot | |
- | ===Partitions and filesystems=== | + | |
- | + | ||
- | | + | |
- | ( | + | |
- | echo o # Create a new empty DOS partition table | + | |
- | echo n # Add a new partition | + | |
- | echo p # Primary partition | + | |
- | echo 1 # Partition number | + | |
- | echo # First sector (Accept default: 1) | + | |
- | echo +256M # Last sector (Accept default: varies) | + | |
- | echo n # Add a new partition | + | |
- | echo p # Primary partition | + | |
- | echo 2 # Partition number | + | |
- | echo # First sector (Accept default) | + | |
- | echo # Last sector (Accept default, rest of the drive) | + | |
- | echo w # Write changes | + | |
- | ) | sudo fdisk /dev/sdX | + | |
- | </ | + | |
- | * You might reboot if you cannot use the new partitions yet:< | + | |
- | # partprobe / | + | |
- | Error: Partition(s) 2 on /dev/sda have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before making further changes. | + | |
- | </code> | + | |
- | * Create the /boot and root filesystems:< | + | |
- | + | ||
- | + | ||
- | # cryptsetup -y -v luksFormat /dev/sdX2 | + | |
- | # cryptsetup open /dev/sdX2 cryptroot | + | |
- | # mkfs.ext4 /dev/ | + | |
- | # mount / | + | |
- | + | ||
- | # mkfs.ext4 /dev/sdX1 | + | |
- | # mkdir /mnt/boot | + | |
- | # mount /dev/sdX1 /mnt/boot | + | |
- | </ | + | |
- | + | ||
- | ===Install Arch Linux=== | + | |
- | * Copy Arch Linux to the new filesystems:< | + | |
- | * Generate a fstab:< | + | |
- | * Chroot into the new system:< | + | |
- | * Set root password:< | + | |
- | * Setup system clock:< | + | |
- | # ln -s / | + | |
- | # hwclock --systohc --utc</ | + | |
- | * Set the hostname:< | + | |
- | * Update locale:< | + | |
- | # locale-gen</ | + | |
- | * Add encryption hook:< | + | |
- | HOOKS=" | + | |
- | </ | + | |
- | * Generate new initramfs:< | + | |
- | * Install bootloader:< | + | |
- | # grub-install /dev/sda | + | |
- | # grub-mkconfig -o / | + | |
- | </ | + | |
- | * Modify kernel options for decrypting the root filesystem:< | + | |
- | # vi / | + | |
- | GRUB_CMDLINE_LINUX=" | + | |
- | + | ||
- | </ | + | |
- | * Configure serial port:< | + | |
# vi / | # vi / | ||
GRUB_CMDLINE_LINUX_DEFAULT=" | GRUB_CMDLINE_LINUX_DEFAULT=" | ||
Line 101: | Line 41: | ||
* Make new grub config:< | * Make new grub config:< | ||
* Reboot and connect with 115200 baud. | * Reboot and connect with 115200 baud. | ||
- | |||
- | ====Post install==== | ||
- | * Configure network:< | ||
- | # cp / | ||
- | |||
- | # vi / | ||
- | |||
- | # netctl list | ||
- | # netctl start ethernet-static | ||
- | # netctl enable ethernet-static | ||
- | </ | ||
- | * Add users | ||
- | * Enable SSH:< | ||
- | # pacman -S openssh | ||
- | # systemctl enable sshd | ||
- | # systemctl start sshd | ||
- | </ | ||
- | * Configure simple firewall:< | ||
- | # pacman -S ufw | ||
- | # ufw default deny | ||
- | # ufw allow SSH | ||
- | # ufw enable | ||
- | </ | ||
- | * Configure timekeeping: | ||
- | vi / | ||
- | # timedatectl set-ntp true | ||
- | </ | ||
{{tag> | {{tag> |
pc_engines_apu2_arch_linux.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1