Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


pc_engines_apu2_arch_linux

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
pc_engines_apu2_arch_linux [2019/12/30 18:17] adminpc_engines_apu2_arch_linux [2019/12/30 18:20] admin
Line 27: Line 27:
  
 ====Install Arch Linux==== ====Install Arch Linux====
-The next steps will install Arch Linux on an unencrypted root filesystem. +  * [[https://wiki.archlinux.org/index.php/installation_guide]]
- +
-===Partitions and filesystems=== +
- +
-  * Partition the SSD:<code> +
-+
-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 +
-</code> +
-  * You might reboot if you cannot use the new partitions yet:<code> +
-# partprobe /dev/sda                                                                                  :( +
-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:<code> +
- +
- +
-# cryptsetup -y -v luksFormat /dev/sdX2 +
-# cryptsetup open /dev/sdX2 cryptroot +
-# mkfs.ext4 /dev/mapper/cryptroot +
-# mount /dev/mapper/cryptroot /mnt +
- +
-# mkfs.ext4 /dev/sdX1 +
-# mkdir /mnt/boot +
-# mount /dev/sdX1 /mnt/boot +
-</code> +
- +
-===Install Arch Linux=== +
-  * Copy Arch Linux to the new filesystems:<code># pacstrap /mnt base</code> +
-  * Generate a fstab:<code># genfstab -L /mnt >> /mnt/etc/fstab</code> +
-  * Chroot into the new system:<code># arch-chroot /mnt</code> +
-  * Set root password:<code># passwd root</code> +
-  * Setup system clock:<code> +
-# ln -s /usr/share/zoneinfo/Europe/Stockholm /etc/localtime +
-# hwclock --systohc --utc</code> +
-  * Set the hostname:<code># echo MYHOSTNAME > /etc/hostname</code> +
-  * Update locale:<code># vi /etc/locale.gen +
-# locale-gen</code> +
-  * Add encryption hook:<code># vi /etc/mkinitcpio.conf  +
-HOOKS="base udev autodetect modconf keyboard keymap block encrypt filesystems keyboard fsck" +
-</code> +
-  * Generate new initramfs:<code># mkinitcpio -p linux</code> +
-  * Install bootloader:<code># pacman -S grub +
-# grub-install /dev/sda +
-# grub-mkconfig -o /boot/grub/grub.cfg +
-</code> +
-  * Modify kernel options for decrypting the root filesystem:<code> +
-# vi /etc/default/grub +
-GRUB_CMDLINE_LINUX="cryptdevice=UUID=<device-UUID>:cryptroot" +
- +
-</code> +
-  * Configure serial port:<code> +
-# vi /etc/default/grub   # add options below +
-GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200n8" +
-</code> +
-  Configure grub and serial:<code> +
-# vi /etc/default/grub   # add options below +
- +
-## Serial console +
-GRUB_TERMINAL=serial +
-GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1" +
-</code> +
-  * Make new grub config:<code># grub-mkconfig -o /boot/grub/grub.cfg</code> +
-  * Reboot and connect with 115200 baud. +
- +
-====Post install==== +
-  * Configure network:<code> +
-# cp /etc/netctl/examples/ethernet-static /etc/netctl +
- +
-# vi /etc/netctl/ethernet-static +
- +
-# netctl list +
-# netctl start ethernet-static +
-# netctl enable ethernet-static +
-</code> +
-  * Add users +
-  * Enable SSH:<code> +
-# pacman -S openssh +
-# systemctl enable sshd +
-# systemctl start sshd +
-</code> +
-  * Configure simple firewall:<code> +
-# pacman -S ufw +
-# ufw default deny +
-# ufw allow SSH +
-# ufw enable +
-</code> +
-  * Configure timekeeping: <code> +
-vi /etc/systemd/timesyncd.conf +
-# timedatectl set-ntp true +
-</code> +
  
 {{tag>[hardware apu arch linux]}} {{tag>[hardware apu arch linux]}}
pc_engines_apu2_arch_linux.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1