PC Engines

From VyOS Wiki
Jump to: navigation, search
Warning sign.png This page is migrated to Readthedocs .
Information found on this page is migrated to readthedocs and information found here could be outdated or misleading. https://vyos.readthedocs.io/en/latest/appendix/vyos-on-baremetal.html#pc-engines-apu4


APU2C4

For more detail about hardware spec, check here.

Installation for Version 1.1.7

Before being able to install on apu2, you need to modify the official iso image because VyOS by default use 9600 baud rate for serial console, but apu2 bios is fixed to 115200. Without modification, you can not see booting messages. The following is steps on how to modify iso image.

  • Download & mount iso image to a folder
$ mount -o loop vyos-1.1.7-amd64.iso /tmp/iso
  • Copy all contents to another folder for modification
$ cp -a /tmp/iso/* /tmp/iso2
  • Modify isolinux/isolinux.cfg to the following
serial 0 115200                                                                                              
console 0
timeout 50
display boot.txt
prompt 1
...
label live
       linux /live/vmlinuz
       append console=ttyS0,115200n8 console=tty0 quiet initrd=/live/initrd.img boot=live nopersistent noautologin nonetworking nouser hostname=vyos

label live-console
       linux /live/vmlinuz
       append quiet initrd=/live/initrd.img boot=live nopersistent noautologin nonetworking nouser hostname=vyos

label live-serial
       linux /live/vmlinuz
       append console=ttyS0,115200n8 quiet initrd=/live/initrd.img boot=live nopersistent noautologin nonetworking nouser hostname=vyos

label live-debug
       linux /live/vmlinuz
       append console=ttyS0,115200n8 console=tty0 debug verbose initrd=/live/initrd.img boot=live nopersistent noautologin nonetworking nouser hostname=vyos

Note the console needs to be set to 0 since apu2 bios seems to forward console messages to serial console, which will mess up the screen.

  • Mount the root filesystem to another folder
$ sudo mount -o loop /tmp/iso/live/filesystem.squashfs /tmp/root
  • Copy all files & folders under /tmp/root to another folder for modification
$ sudo cp -a /tmp/root/* /tmp/root2
  • Modify /tmp/root2/opt/vyatta/sbin/vyatta-grub-setup and /tmp/root2/opt/vyatta/etc/config.boot.default, replace all matchings of string 9600 with 115200.
  • Regenerate filesystem image
$ sudo mksquashfs /tmp/root2 /tmp/iso2/live/filesystem.squashfs -noappend
  • Regenerate iso image
$ cd /tmp
$ sudo mkisofs -o vyos-out.iso -b isolinux/isolinux.bin -c isolinux/boot.cat \
  -no-emul-boot -boot-load-size 4 -boot-info-table -iso-level 3 -J \
  /tmp/iso2
$ sudo isohybrid vyos-out.iso

Now you can use modified iso image to boot apu2 board.

Because I found VyOS can not detect my Transcend USB stick, I use SD card to boot the machine. There is also report that VyOS can't detect USB stick on APU, so it's recommended to use SD card instead of USB stick to create boot disk.

  • Dump iso image to SD card
$ sudo dd if=vyos-out.iso of=/dev/mmcblk0 bs=1M

Installation for Version 1.2.x

  • Download & mount iso image to a folder
$ mount -o loop vyos-1.2.0-amd64.iso /tmp/iso
  • Copy all contents to another folder for modification
$ cp -a /tmp/iso/* /tmp/iso2
  • Modify isolinux/isolinux.cfg to the following
serial 0 115200
console 0
timeout 50
prompt 1
include live.cfg
default live-amd64-vyos
  • Modify isolinux/live.cfg to the following
label live-amd64-vyos
	linux /live/vmlinuz
	initrd /live/initrd.img
	append console=ttyS0,115200n8 boot=live components hostname=vyos username=live nopersistence noautologin nonetworking union=overlay

label live-amd64-vyos-failsafe
	linux /live/vmlinuz
	initrd /live/initrd.img
	append console=ttyS0,115200n8 boot=live components memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal
  • Mount the root filesystem to another folder
$ sudo mount -o loop /tmp/iso/live/filesystem.squashfs /tmp/root
  • Copy all files & folders under /tmp/root to another folder for modification
$ sudo cp -a /tmp/root/* /tmp/root2
  • Modify following files and replace all matchings of string 9600 with 115200:
    • /tmp/root2/opt/vyatta/sbin/vyatta-grub-setup
    • /tmp/root2/opt/vyatta/etc/config.boot.default
    • /tmp/root2/opt/vyatta/etc/grub/default-union-grub-entry
    • /tmp/root2/opt/vyatta/etc/config-migrate/migrate/system/3-to-4

Then follow steps in Installation for 1.1.7 for generating new iso image.

Note starting from 1.2.0, VyOS is able to detect USB stick on APU2. To create USB boot disk, run following command:

$ sudo dd if=vyos-out.iso of=/dev/sdX bs=1M

APU1D4

Follow the steps above for 1.1.7 on APU2. To make the disk compatible with the APU1D4, I had to change isolinux to syslinux like so. Insert this step before "Regenerate the ISO image"

$ sudo cp -arv isolinux/ syslinux
$ cd syslinux/
$ sudo mv isolinux.bin syslinux.bin
$ sudo mv isolinux.cfg syslinux.cfg

I was able to boot of a USB stick written in DD mode from Rufus. Once the bootloader worked, I had to type "live" to launch vyos because the config above didn't have a default.


ALIX 3C