Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


apu_ubuntu

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
apu_ubuntu [2018/06/01 21:48] – [Post installation steps] adminapu_ubuntu [2021/10/09 15:14] (current) – external edit 127.0.0.1
Line 1: Line 1:
-=====PCEngines APU2 - Ubuntu 18.04 LTS server =====+=====PC Engines APU2 - Ubuntu 18.04 LTS server ===== 
 +Install Ubuntu 18.04 LTS on a PC Engines APU2 board. 
 + 
 +If you're using an **APU1** board, try the section [[#prepare_a_usb_drive_optional|Prepare a USB drive (optional)]] to create a prepared USB-drive first. Then boot from USB (press F12, during boot) and select ''Command-line install'' and proceed with the installation.
  
-====Prepare a USB drive==== 
-  * [[https://www.ubuntu.com/download/alternative-downloads|Download the latest Ubuntu server net install mini.iso for amd64 architecture.]] 
-  * Extract downloaded ISO and copy the files to a temporary location:<code> 
-sudo mkdir /mnt/iso 
-sudo mount -o loop ~/Downloads/mini.iso /mnt/iso 
-cd /mnt 
-tar -cvf - iso | (cd /var/tmp/ && tar -xf - ) 
-cd /var/tmp/iso</code> 
-  * Modify ''/var/tmp/iso/isolinux.cfg''<code>serial 0 115200 
-console 0 
-path 
-include menu.cfg 
-default vesamenu.c32 
-prompt 0 
-timeout 0</code> 
-  * Modify ''Command-line install'': ''/var/tmp/iso/txt.cfg''<code> 
-append file=/cdrom/preseed/ubuntu-server.seed vga=off initrd=/install/initrd.gz console=ttyS0,115200n8 ---</code> 
-  * Create a new ISO file (this was done from Fedora):<code>xorriso -as mkisofs -R -J -V "Ubuntu-Server 18.04 LTS amd64" \ 
--o ~/file.iso -b isolinux.bin -c boot.cat -no-emul-boot \ 
--boot-load-size 4 -boot-info-table \ 
--isohybrid-mbr /usr/share/syslinux/isohdpfx.bin .</code> 
-  * Write the new image to the USB drive:<code>sudo dd if=~/file.iso of=/dev/sdX bs=4k conv=fsync status=progress</code> 
 ====Install Ubuntu 18.04==== ====Install Ubuntu 18.04====
-  * Connect the USB drive to the APU board and boot from USB (F10 / F12).\\ +  * dd Ubuntu server netinstall (mini.iso) to USB drive [[https://www.ubuntu.com/download/alternative-downloads]], be sure to select the amd64 arch. 
-  * Select ''Command-Line install''.+  * Connect the USB drive to the APU2 board and boot from USB, press F10 at boot
 +  * Select ''Install'', then TAB. 
 +  * Change kernel options to ''linux initrd=initrd.gz console=ttyS0,115200''
   * When asked to unmount mounted partitions choose ''Yes''.   * When asked to unmount mounted partitions choose ''Yes''.
   * Install options as you like.   * Install options as you like.
Line 39: Line 22:
 GRUB_CMDLINE_LINUX="console=ttyS0,115200n8" GRUB_CMDLINE_LINUX="console=ttyS0,115200n8"
  
-sudo update grub+sudo update-grub
 </code> </code>
   * Reboot to test the update grub configuration.   * Reboot to test the update grub configuration.
- +===Networking=== 
 +  * Edit ''/etc/netplan/01-netcfg.yaml''<code> 
 +# This file describes the network interfaces available on your system 
 +# For more information, see netplan(5). 
 +network: 
 +  version: 2 
 +  renderer: networkd 
 +  ethernets: 
 +    enp1s0: 
 +      addresses: 
 +        - 10.10.10.2/24 
 +      gateway4: 10.10.10.1 
 +      nameservers: 
 +          search: [mydomain, otherdomain] 
 +          addresses: [10.10.10.1, 1.1.1.1] 
 +</code> 
 +  * Apply config:<code>netplan apply</code>
 ====Misc==== ====Misc====
 +  * Install and start openssh:<code>apt install openssh-server</code>
 +  * Enable firewall:<code>ufw allow ssh
 +ufw enable</code>
   * Multi-user target (not graphical):<code>sudo systemctl set-default multi-user.target</code>   * Multi-user target (not graphical):<code>sudo systemctl set-default multi-user.target</code>
   * Configure timezone:<code>dpkg-reconfigure tzdata</code>   * Configure timezone:<code>dpkg-reconfigure tzdata</code>
   * Configure locale:<code>dpkg-reconfigure locales</code>   * Configure locale:<code>dpkg-reconfigure locales</code>
 +
 +===Watchdog===
 +It seems the sp5100_tco module is blacklisted by default in ''/lib/modprobe.d''. We need to override that and blacklist some conflicting modules.
 +
 +  * Blacklist conflicting modules:<code>cat >> /etc/modprobe.d/blacklist-i2c-ccp.conf <<EOF
 +blacklist i2c_piix4
 +blacklist ccp
 +EOF</code>
 +  * Update the initramfs:<code>update-initramfs -u</code>
 +  * Install watchdog:<code>apt install watchdog</code>
 +  * Add module to config:<code>vi /etc/default/watchdog 
 +# Load module before starting watchdog
 +watchdog_module="sp5100_tco"
 +</code>
 +  * Edit ''/etc/watchdog.conf'':<code>
 +watchdog-device = /dev/watchdog
 +</code>
 +  * Reboot to test:<code>dmesg | grep sp5100_tco</code>
 +  * Kill watchdog, it should restart your system after some time:<code>pkill -9 watchdog
 +# if wd_keepalive is started, also kill that
 +pkill -9 wd_keepalive</code>
 +
 ===PC speaker=== ===PC speaker===
   * Install beep:<code>apt install beep</code>   * Install beep:<code>apt install beep</code>
Line 78: Line 101:
 systemctl enable beeponshut systemctl enable beeponshut
 </code> </code>
 +
 +=====Prepare a USB drive (optional)=====
 +  * Install required packages:<code>apt install xorriso isolinux</code>
 +  * [[https://www.ubuntu.com/download/alternative-downloads|Download the latest Ubuntu server net install mini.iso for amd64 architecture.]]
 +  * Extract downloaded ISO and copy the files to a temporary location:<code>
 +sudo mkdir /mnt/iso
 +sudo mount -o loop ~/Downloads/mini.iso /mnt/iso
 +cd /mnt
 +tar -cvf - iso | (cd /var/tmp/ && tar -xf - )
 +cd /var/tmp/iso</code>
 +  * Modify ''isolinux.cfg''<code>serial 0 115200
 +console 0
 +path
 +include menu.cfg
 +default vesamenu.c32
 +prompt 0
 +timeout 0</code>
 +  * Modify __cli / Command-line install__: ''txt.cfg''<code>
 +#From:
 +append tasks=standard pkgsel/language-pack-patterns= pkgsel/install-language-support=false vga=788 initrd=initrd.gz --- quiet 
 +
 +#To:
 +append tasks=standard pkgsel/language-pack-patterns= pkgsel/install-language-support=false vga=off initrd=initrd.gz console=ttyS0,115200n8 ---
 +
 +</code>
 +  * Create a new ISO file:<code>
 +#Fedora host:
 +xorriso -as mkisofs -R -J -V "Ubuntu-Server 18.04 LTS amd64" \
 +-o ~/file.iso -b isolinux.bin -c boot.cat -no-emul-boot \
 +-boot-load-size 4 -boot-info-table \
 +-isohybrid-mbr /usr/share/syslinux/isohdpfx.bin .
 +
 +#Ubuntu host:
 +xorriso -as mkisofs -R -J -V "Ubuntu-Server 18.04 LTS amd64" \
 +-o ~/file.iso -b isolinux.bin -c boot.cat -no-emul-boot \
 +-boot-load-size 4 -boot-info-table \
 +-isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin .
 +
 +
 +
 +</code>
 +  * Write the new image to the USB drive:<code>sudo dd if=~/file.iso of=/dev/sdX bs=4M</code>
  
 {{tag>[hardware apu apu1 apu2 Ubuntu linux ]}} {{tag>[hardware apu apu1 apu2 Ubuntu linux ]}}
apu_ubuntu.1527889697.txt.gz · Last modified: 2018/06/01 21:48 by admin