Vyos-build build with preloaded configuration

Hi Guys!

I want to build VyOS with a preloaded config. Do you guys know where I can put the default configuration? Is it possible?


Hello @fegauthier,

There are 2 ways to reach your goal:

  1. Modify configuration file before building ISO
    Edit this file vyos-build/config.boot.default at current · vyos/vyos-build · GitHub and build ISO

  2. Modify configuration in an existing ISO

  • Mount ISO
mkdir /tmp/iso
mount -o loop vyos-...-amd64.iso /tmp/iso
  • Copy all contents to another folder for modification
cp -a /tmp/iso/* /tmp/iso2
  • Mount the root filesystem to another folder
mkdir /tmp/root
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 configuration file
  • Regenerate filesystem image
mksquashfs /tmp/root2 /tmp/iso2/live/filesystem.squashfs -noappend
  • Regenerate iso image
genisoimage -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 \
isohybrid vyos-out.iso

Thanks! I will give it a try!

Is there a way to generate encrypted-password or simple salted hash will do?