using dab to create a Ubuntu 18.04 appliance

dipe

Active Member
Mar 21, 2013
39
0
26
I wanted to start testing Ubuntu 18.04 Alpha and tried patching /usr/share/perl5/PVE/DAB.pm by adding configs for suite bionic where I found xenial

grep xenial /usr/share/perl5/PVE/DAB.pm
} elsif ($suite eq 'xenial') {
$suite eq 'xenial' || $suite eq 'wily' || $suite eq 'vivid' ||
if ($suite eq 'vivid' || $suite eq 'wily' || $suite eq 'xenial' ||
} elsif ($suite eq 'xenial' || $suite eq 'wily' || $suite eq 'vivid' ||
if ($suite eq 'yakkety' || $suite eq 'xenial' || $suite eq 'wily' || $suite eq 'bionic') {

it starts quite promising until lxc-attach bombs out with an error 127 (see below)

any hint or help would be appreciated

Thanks
dipe


root@proxa1:~/proxmox-templates/ubuntu-18.04# dab bootstrap
initialize VE 55b6fb1f-b556-4e33-a4b2-c168b8ed98d6
create basic environment
initialize ld cache
installing packages
install: base-files
install: base-passwd
install: dpkg
install: libc6
install: perl-base
install: mawk
install: debconf
unpack: sysvinit-utils
unpack: sensible-utils
unpack: sed
unpack: procps
unpack: libsemanage-common
unpack: libsemanage1
unpack: passwd
unpack: ncurses-bin
unpack: ncurses-base
unpack: util-linux
unpack: mount
unpack: mawk
unpack: lsb-base
unpack: login
unpack: libudev1
unpack: libsepol1
unpack: libprocps6
unpack: libpam-runtime
unpack: libpam-modules-bin
unpack: libpam0g
unpack: libpam-modules
unpack: libncurses5
unpack: libdb5.3
unpack: libc-bin
unpack: libcap-ng0
unpack: libaudit1
unpack: libaudit-common
unpack: hostname
unpack: gzip
unpack: grep
unpack: findutils
unpack: libsmartcols1
unpack: libncursesw5
unpack: libmount1
unpack: libfdisk1
unpack: fdisk
unpack: libss2
unpack: libcomerr2
unpack: libuuid1
unpack: libblkid1
unpack: e2fsprogs
unpack: e2fslibs
unpack: diffutils
unpack: debconf
unpack: coreutils
unpack: liblz4-1
unpack: libgpg-error0
unpack: libgcrypt20
unpack: libsystemd0
unpack: bsdutils
unpack: libtinfo5
unpack: debianutils
unpack: dash
unpack: bash
unpack: libdebconfclient0
unpack: base-passwd
unpack: libattr1
unpack: libacl1
unpack: tar
unpack: zlib1g
unpack: libpcre3
unpack: libselinux1
unpack: liblzma5
unpack: libbz2-1.0
unpack: dpkg
unpack: gcc-7-base
unpack: libgcc1
unpack: libc6
unpack: perl-base
unpack: init-system-helpers
unpack: base-files
configure required packages
unpack: xz-utils
unpack: xdg-user-dirs
unpack: whiptail
unpack: xxd
unpack: vim-common
unpack: vim-tiny
unpack: ubuntu-minimal
unpack: ubuntu-advantage-tools
unpack: tzdata
unpack: sudo
unpack: shared-mime-info
unpack: rsyslog
unpack: pinentry-curses
unpack: python3-yaml
unpack: nplan
unpack: netcat-openbsd
unpack: lsb-release
unpack: locales
unpack: libyaml-0-2
unpack: libxtables12
unpack: libxml2
unpack: libsasl2-modules
unpack: libpam-systemd
unpack: libpam-cap
unpack: libslang2
unpack: libnewt0.52
unpack: libjson-c3
unpack: libglib2.0-data
unpack: libfribidi0
unpack: libestr0
unpack: libcap2-bin
unpack: libbsd0
unpack: libatm1
unpack: isc-dhcp-common
unpack: iputils-ping
unpack: linux-base
unpack: udev
unpack: kmod
unpack: libklibc
unpack: klibc-utils
unpack: initramfs-tools-bin
unpack: initramfs-tools-core
unpack: initramfs-tools
unpack: libkmod2
unpack: libip4tc0
unpack: libcryptsetup4
unpack: libcap2
unpack: systemd
unpack: systemd-sysv
unpack: init
unpack: gnupg-l10n
unpack: gnupg-agent
unpack: gnupg
unpack: libmagic-mgc
unpack: libmagic1
unpack: file
unpack: eject
unpack: libdevmapper1.02.1
unpack: dmsetup
unpack: distro-info-data
unpack: libnpth0
unpack: libldap-common
unpack: libwind0-heimdal
unpack: libhx509-5-heimdal
unpack: libkrb5-26-heimdal
unpack: libheimntlm0-heimdal
unpack: libheimbase1-heimdal
unpack: libhcrypto4-heimdal
unpack: libroken18-heimdal
unpack: libasn1-8-heimdal
unpack: libgssapi3-heimdal
unpack: libldap-2.4-2
unpack: libksba8
unpack: libassuan0
unpack: dirmngr
unpack: libpython3-stdlib
unpack: python3.6-2to3
unpack: python3-distutils
unpack: libsqlite3-0
unpack: readline-common
unpack: libreadline7
unpack: libmpdec2
unpack: mime-support
unpack: libpython3.6-stdlib
unpack: python3.6
unpack: libpython3.6-minimal
unpack: python3.6-minimal
unpack: python3-minimal
unpack: python3
unpack: dh-python
unpack: libtext-charwidth-perl
unpack: libtext-wrapi18n-perl
unpack: libtext-iconv-perl
unpack: debconf-i18n
unpack: libexpat1
unpack: libdbus-1-3
unpack: libapparmor1
unpack: dbus
unpack: cron
unpack: xkb-data
unpack: liblocale-gettext-perl
unpack: keyboard-configuration
unpack: kbd
unpack: console-setup-linux
unpack: console-setup
unpack: ca-certificates
unpack: bzip2
unpack: busybox-initramfs
unpack: libapt-inst2.0
unpack: apt-utils
unpack: libseccomp2
unpack: libtasn1-6
unpack: libp11-kit0
unpack: libidn11
unpack: libnettle6
unpack: libhogweed4
unpack: libgmp10
unpack: libgnutls30
unpack: libapt-pkg5.0
unpack: ubuntu-keyring
unpack: gpgv
unpack: apt
unpack: cpio
unpack: openssl
unpack: ssl-cert
unpack: netbase
unpack: libsasl2-modules-db
unpack: libsasl2-2
unpack: libstdc++6
unpack: libgraphite2-3
unpack: libffi6
unpack: libglib2.0-0
unpack: libpng16-16
unpack: libfreetype6
unpack: libharfbuzz0b
unpack: libicu-le-hb0
unpack: libicu60
unpack: postfix
unpack: libmnl0
unpack: libelf1
unpack: iproute2
unpack: libisc-export160
unpack: libdns-export162
unpack: isc-dhcp-client
unpack: multiarch-support
unpack: libpopt0
unpack: logrotate
unpack: libwrap0
unpack: ucf
unpack: openssh-sftp-server
unpack: openssh-server
unpack: libssl1.0.0
unpack: libkeyutils1
unpack: libkrb5-3
unpack: libkrb5support0
unpack: libk5crypto3
unpack: libgssapi-krb5-2
unpack: libedit2
unpack: adduser
unpack: openssh-client
unpack: ssh
unpack: less
command 'lxc-attach -n 55b6fb1f-b556-4e33-a4b2-c168b8ed98d6 --rcfile /root/proxmox-templates/ubuntu-18.04/config --clear-env -- defenv ifconfig lo up' failed with exit code 127
command 'lxc-attach -n 55b6fb1f-b556-4e33-a4b2-c168b8ed98d6 --rcfile /root/proxmox-templates/ubuntu-18.04/config --clear-env -- defenv ifconfig lo up' failed with exit code 127
 
after I install lxc 2.0.9 from source it bombs out right away ... rolling back.

unpack: liblz4-1
command 'lxc-attach -n 55b6fb1f-b556-4e33-a4b2-c168b8ed98d6 --rcfile /root/proxmox-templates/ubuntu-18.04/config --clear-env -- defenv dpkg --force-depends --unpack /liblz4-1_0.0~r131-2ubuntu2_amd64.deb' failed with exit code 139
command 'lxc-attach -n 55b6fb1f-b556-4e33-a4b2-c168b8ed98d6 --rcfile /root/proxmox-templates/ubuntu-18.04/config --clear-env -- defenv dpkg --force-depends --unpack /liblz4-1_0.0~r131-2ubuntu2_amd64.deb' failed with exit code 139
Makefile:5: recipe for target 'all' failed
make: *** [all] Error 139
 
well, it turns out that the 'ifconfig' binary is curiously missing from the current 18.04, used these steps to fix:


- create new tree rootfs-cp and put old ifconfig into rootfs-cp/sbin
- patch /uar/bin/dab so rootfs-cp tree is copied to rootfs before bootstrap
+ use File::NCopy;
$dab->ve_init();
+ my $source_dir = 'rootfs-cp';
+ my $target_dir = 'rootfs';
+ my $cp = File::NCopy->new(recursive => 1);
+ $cp->copy("$source_dir/*", $target_dir)
or die "Could not perform rcopy of $source_dir to $target_dir: $!";
$dab->bootstrap ($opts);
- install file copy perl module: apt install libfile-ncopy-perl

after that it builds me a nice container ..
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!