Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


up_board_arch_linux_systemd

This is an old revision of the document!


~~TOC~~

Up Board - Arch linux / EFI / SystemD

Intel x5-Z8350 QuadCore 1.44Ghz (1.92GHz) 64 bit 2W CPU.
http://www.up-board.org

Boot & network configuration

  • Download the latest Arch Linux ISO and copy it to a USB-drive.
  • Connect the Up board to the network, a monitor and keyboard.
  • Boot the Up Board, press F7 and select the USB-drive.
  • Check if you received an IP-address over DHCP, else request one with dhclient.
  • Install SSH to continue the installation over the network:
    pacman -Sy
    pacman -S openssh gpart
    passwd root
    systemctl start sshd
    
    # Connect to the Up board over SSH.
    ssh root@<IP-address>

Partition & filesystems

  • Determine the internal disk name with lsblk. In this case it is mmcblk0.
  • Wipe signatures from drive:
    wipefs /dev/mmcblk0 -a
  • Create partitions for EFI, root filesystem and swap.
    gdisk /dev/mmcblk0
    GPT fdisk (gdisk) version 1.0.1
    
    Partition table scan:
      MBR: not present
      BSD: not present
      APM: not present
      GPT: not present
    
    Creating new GPT entries.
    
    Command (? for help): 
    o	create a new empty GUID partition table (GPT)
    n, 512M, type EF00 (EFI)
    n, 2G, type 8200 (swap) 
    n, rest of disk, type 8300 (linux)
  • Create the filesystems:
    mkfs.fat -F32 /dev/mmcblk0p1
    mkswap /dev/mmcblk0p2
    mkfs.ext4 /dev/mmcblkp3
  • Mount the filesystems:
    swapon /dev/mmcblk0p2
    
    mount /dev/mmcblk0p3 /mnt       # Root filesystem
    mkdir /mnt/boot
    mount /dev/mmcblk0p1 /mnt/boot  # EFI filesystem

Install Arch Linux

  • Install Arch Linux on the filesystems:
    pacstrap /mnt base
  • Generate the fstab:
    genfstab -U /mnt >> /mnt/etc/fstab
  • Enter the chroot:
    arch-chroot /mnt
  • Configure the time zone
    ln -sf /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime
  • Set system time to hardware clock:
    hwclock --systohc
  • Configure the locale:
    vi /etc/locale.gen
    locale-gen
    
    vi /etc/locale.conf
    LANG=en_US.UTF-8
  • Set the hostname, archup in this example:
    vi /etc/hostname
    
    vi /etc/hosts
    127.0.1.1       archup.localdomain      archup
  • Set the root password and create additional accounts:
    passwd root
    useradd ...
  • Install packages on new filesystem:
    pacman -S intel-ucode openssh gpart
  • Verify that efivars are available, ie booted in EFI-mode:
    ls /sys/firmware/efi/efivars
  • Install EFI boot files:
    bootctl install
  • Configure loader defaults:
    vi /boot/loader/loader.conf
    
    timeout 3
    default archlinux
  • Add an Arch Linux entry:
    vi /boot/loader/entries/archlinux.conf
    
    title          archlinux
    linux          /vmlinuz-linux
    initrd         /intel-ucode.img
    initrd         /initramfs-linux.img
    options        root=PARTUUID="fcf051c4-9d53-48b1-96eb-3efbc23388ed" rw
  • Exit the chroot and unmount the new filesystems:
    exit
    
    cd
    umount -R /mnt
  • Boot from internal disk, remove USB-disk:
    reboot

Post install configuration

  • Configure SystemD networking:
    systemctl enable systemd-networkd
    systemctl start systemd-networkd
    
    systemctl enable systemd-resolved
    systemctl start systemd-resolved
    
    vi /etc/systemd/network/50-wired.network
    [Match]
    Name=enp1s0
    
    [Network]
    DHCP=ipv4
    
    # If you want an additional IP-address in case DHCP is not available.
    #[Address]
    #Label=enp1s0:0
    #Address=10.10.10.1/30
    
    
    rm /etc/resolv.conf
    ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
  • Start and enable SSHd:
    systemctl enable sshd
    systemctl start sshd
  • Configure firewall scripts, for example ufw.
up_board_arch_linux_systemd.1497429947.txt.gz · Last modified: 2017/06/14 08:45 by admin