Skip to content

Instantly share code, notes, and snippets.

@hiroyuki-sato
Last active October 27, 2022 16:13
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hiroyuki-sato/201032fe75d2cf9f5801 to your computer and use it in GitHub Desktop.
Save hiroyuki-sato/201032fe75d2cf9f5801 to your computer and use it in GitHub Desktop.
Build VyOS image image on Debian Jessie environment.

Overview

Build VyOS image image on Debian Jessie environment.

Install Debian jessie

Install Debian jessie.

cowbuilder install

jessie# apt-get install cowbuilder

make debian squeeze environment.

jessie# sudo cowbuilder \
  --create --distribution squeeze \
  --basepath /var/cache/pbuilder/base-vyos-squeeze-amd64.cow

download setup-vyos-build-env on jesssie.

jessie# cd /tmp
jessie# wget https://github.com/vyos/build-iso/blob/helium/tools/setup-vyos-build-env 
jessie# chmod 755 setup-vyos-build-env

update squeeze image

Login squeeze with --save-after-exec option for save update image

jessie# sudo cowbuilder \
  --login \
  --save-after-exec \
  --bindmount /tmp \
  --basepath /var/cache/pbuilder/base-vyos-squeeze-amd64.cow/

And exec ./setup-vyos-build-env script Additonal package needed. (cpio and automake)

squeeze# cd /tmp
squeeze# ./setup-vyos-build-env
squeeze# apt-get install cpio automake
squeeze# exit 

Download build-iso on jesssie.

Or It is good idea to download build-iso on squeeze with --save-after-exec option

jessie# git clone https://github.com/vyos/build-iso 

make iso image

login squeeze environment

jessie# sudo cowbuilder \
  --login \
  --bindmount /tmp \
  --basepath /var/cache/pbuilder/base-vyos-squeeze-amd64.cow/

prepare build

squeeze# cd /tmp/build-iso 
squeeze# export PATH=/sbin:/usr/sbin:$PATH
squeeze# autoreconf -i
squeeze# ./configure

Replace gpg key (development branch only)

squeeze# rm -f livecd/config.vyatta/chroot_sources/vyatta.chroot.gpg
squeeze# wget -qO livecd/config.vyatta/chroot_sources/vyatta.chroot.gpg \
     http://dev.packages.vyos.net/vyos-root-gpg

And make iso

squeeze# make iso

Note

Build log sample

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment