ubuntu template

787 views
Skip to first unread message

damien...@gmail.com

unread,
Feb 9, 2017, 5:37:36 AM2/9/17
to qubes-users
Hi,

I am new into qubes (few months) and find it great. But I need a distro with newer packages (debian jessie was fine until I ran in issues with encfs compatibility).

So I wanted to build an ubuntu template but I did not found clear instructions.

using https://github.com/QubesOS/qubes-builder and the setup script, I do not get ubuntu to choose in the menu.

On this forum, there is few posts about it but using privaze repo.

I really need help on this :-)

Best regards,

Damien

Unman

unread,
Feb 9, 2017, 6:41:42 AM2/9/17
to damien...@gmail.com, qubes-users
Hi Damien,

The Ubuntu builds are referenced in setup as Trusty and Xenial.

I've just put in a series of Pull Requests that should allow
straightforward builds of both.
Wait a little while for them to be merged.

It should then be a matter of:
git clone https://github.com/QubesOS/qubes-builder
cd qubes-builder
./setup
make qubes-vm
make template

Copy generated Template to dom0 and install - there's a handy script
provided to do this for you.

I'll let you know when the PRs are merged. Focus at the moment is on
the GSOC applications.

unman

JW

unread,
Feb 9, 2017, 8:11:38 PM2/9/17
to qubes-users, damien...@gmail.com, un...@thirdeyesecurity.org
Thank you very much! I've been fighting with Ubuntu install as well.

trule...@gmail.com

unread,
Feb 10, 2017, 4:46:03 AM2/10/17
to qubes-users, damien...@gmail.com, un...@thirdeyesecurity.org
четверг, 9 февраля 2017 г., 14:41:42 UTC+3 пользователь Unman написал:
Unman can you make a template rpm Ubuntu and put it on

https://ftp.qubes-os.org/repo/yum/r3.2/templates-community/rpm/ ?:)

Trying qubes-builder with trusty, xenial, xenial-desktop and no success. Everytime troubles with MAKE.

qvm clone fedora-23 ubuntu
grow to 25 GB, allow network
yum install git createrepo rpm-build rpm-sign make python-sh rpmdevtools rpm-sign dialog
git clone https://github.com/QubesOS/qubes-builder
cd qubes-builder
./setup

Choosing fedora23 and mgmt-salt, then Ubuntu Xenial.

make get-sources
make install-deps

And finally make qubes-vm can't build template

"Building packages not supported by any configured plugins"

It means that need to use debian-8 template for builder?

john.david.r.smith

unread,
Feb 10, 2017, 4:49:56 AM2/10/17
to trule...@gmail.com, qubes-users, damien...@gmail.com, un...@thirdeyesecurity.org
> Unman can you make a template rpm Ubuntu and put it on
>
> https://ftp.qubes-os.org/repo/yum/r3.2/templates-community/rpm/ ?:)
>
i also would prefer this option, but it seems it is not possible due to legal issues.
see: https://www.qubes-os.org/doc/templates/ubuntu/

maybe we could convince canonical to allow this case, but somehow i doubt they will allow it.

damien...@gmail.com

unread,
Feb 10, 2017, 1:04:55 PM2/10/17
to qubes-users, damien...@gmail.com, un...@thirdeyesecurity.org
Le jeudi 9 février 2017 12:41:42 UTC+1, Unman a écrit :
Hi, thank you !

Is there a way I may support you? maybe I can test it?


Best regards,

Damien

Nick Darren

unread,
Feb 10, 2017, 5:23:37 PM2/10/17
to trule...@gmail.com, qubes...@googlegroups.com
Hi,

You need debian-builder instead of fedora in the first step of `setup`, because ubuntu is based on debian. This is mandatory to build any debian-based operating system.

To skip unnecessary setup to use only for making ubuntu template, first  edit the ‘qubes-os-r3.2.conf’ (if you use r3.2 in this case) which is found in /home/user/qubes-builder/example-configs. Use the text editor of your choice.

Go to the first line containing ‘DISTS_VM ?= fc23’  Remove ‘fc23’ or whatever is listed there leaving only ‘DISTS_VM ?=’. Then save the file and close the text editor.

Run the 'setup' script located in ‘/home/user/qubes-builder/’ Make sure you are in directory ‘qubes-builder’.

$ cd /home/user/qubes-builder/
$ ./setup

Deselect 'builder-fedora'
Select 'builder-debian'

On 'Template Distribution Selection':
Select xenial+desktop

Proceed others as per instructions.


To check build-logs in progress later you can use `tail -f` command in between the *.log locations.
signature.asc

Unman

unread,
Feb 10, 2017, 6:11:13 PM2/10/17
to trule...@gmail.com, qubes-users, damien...@gmail.com
If you read my email I specifically say that there are PRs to fix these
issues, and I will let you know when they are merged.
They aren't merged yet.

As for a pre-built template, as John points out, and as explained on
the relevant page in the docs, we can't do this because of Canonical's
policies.
This may change but for the moment, building your own template is the
only solution.

Unman

unread,
Feb 10, 2017, 6:15:19 PM2/10/17
to damien...@gmail.com, qubes-users
As soon as the PRs are merged I'll post to the list, and you can try it
then. (Or you could merge them yourself of course, and try the build.)
Testing and feedback would be much appreciated.

I've been using Xenial for a while and it seems fine.

trule...@gmail.com

unread,
Feb 11, 2017, 4:38:15 PM2/11/17
to qubes-users, damien...@gmail.com
Thankx to all for the answers. It what i can do (some logs)


[user@test qubes-builder]$ sudo make vmm-xen-vm
Currently installed dependencies:
git-2.5.5-1.fc23.x86_64
rpmdevtools-8.9-1.fc23.noarch
rpm-build-4.13.0-0.rc1.13.fc23.x86_64
createrepo-0.10.3-3.fc21.noarch
debootstrap-1.0.87-1.fc23.noarch
dpkg-dev-1.17.27-1.fc23.noarch
python-sh-1.11-1.fc23.noarch
dialog-1.3-4.20160424.fc23.x86_64
dpkg-dev-1.17.27-1.fc23.noarch
debootstrap-1.0.87-1.fc23.noarch
DEBUG
Repo Variables
───────────────────────────────────────────────────────────────────────────────
SRC_DIR: qubes-src
CHROOT_DIR: /home/user/qubes-builder/chroot-xenial
CHROOT_REPO_DIR: chroot-qubuntu
CHROOT_DEBIAN_DIR: /home/user/qubes-builder/chroot-xenial//debian-vm/debian
BUILDER_REPO_DIR: /home/user/qubes-builder/qubes-packages-mirror-repo/xenial
───────────────────────────────────────────────────────────────────────────────
Chroot Variables
───────────────────────────────────────────────────────────────────────────────
DIST_BUILD_DIR: /home/user
DIST_SRC:
DIST_SRC_DEBIAN_DIR: /debian-vm/debian
───────────────────────────────────────────────────────────────────────────────
Build Variables
───────────────────────────────────────────────────────────────────────────────
DEBIAN_PARSER: /home/user/qubes-builder/qubes-src/builder-debian//scripts/debian-parser
DEBIAN_PLUGIN_DIR: /home/user/qubes-builder/qubes-src/builder-debian/
OUTPUT_DIR: pkgs/xenial
PACKAGE_LIST: debian-vm/debian
DISTRIBUTION: qubuntu
DIST: xenial
DEBIANVERSION: xenial
UPDATE_REPO:
REPO_SUFFIX:
DISTRIBUTION_CAP: Qubuntu
REPO_PROXY:
APT_GET_OPTIONS:
CHROOT_ENV: BACKEND_VMM=xen

# Make sure repo directory exists
-> Preparing xenial build environment
-> Installing qubuntu build chroot...
I: Retrieving InRelease
I: Checking Release signature
I: Valid Release signature (key id 790BC7277767219C42C86F933B4FE6ACC0B21F32)
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Checking component main on http://archive.ubuntu.com/ubuntu...
I: Validating adduser 3.113+nmu3ubuntu4
I: Validating apt 1.2.10ubuntu1
I: Validating apt-utils 1.2.10ubuntu1
I: Validating base-files 9.4ubuntu4
I: Validating base-passwd 3.5.39
I: Validating bash 4.3-14ubuntu1
I: Validating bsdutils 1:2.27.1-6ubuntu3
I: Validating busybox-initramfs 1:1.22.0-15ubuntu1
I: Validating bzip2 1.0.6-8
I: Validating console-setup 1.108ubuntu15
I: Validating console-setup-linux 1.108ubuntu15
I: Validating coreutils 8.25-2ubuntu2
I: Validating cpio 2.11+dfsg-5ubuntu1
I: Validating cron 3.0pl1-128ubuntu2
I: Validating dash 0.5.8-2.1ubuntu2
I: Validating debconf 1.5.58ubuntu1
I: Validating debconf-i18n 1.5.58ubuntu1
I: Validating debianutils 4.7
I: Validating dh-python 2.20151103ubuntu1
I: Validating diffutils 1:3.3-3
I: Validating distro-info-data 0.28
I: Validating dpkg 1.18.4ubuntu1
I: Validating e2fslibs 1.42.13-1ubuntu1
I: Validating e2fsprogs 1.42.13-1ubuntu1
I: Validating eject 2.1.5+deb1+cvs20081104-13.1
I: Validating file 1:5.25-2ubuntu1
I: Validating findutils 4.6.0+git+20160126-2
I: Validating gcc-5-base 5.3.1-14ubuntu2
I: Validating gcc-6-base 6.0.1-0ubuntu1
I: Validating gnupg 1.4.20-1ubuntu3
I: Validating gpgv 1.4.20-1ubuntu3
I: Validating grep 2.24-1
I: Validating gzip 1.6-4ubuntu1
I: Validating hostname 3.16ubuntu2
I: Validating ifupdown 0.8.10ubuntu1
I: Validating init 1.29ubuntu1
I: Validating init-system-helpers 1.29ubuntu1
I: Validating initramfs-tools 0.122ubuntu8
I: Validating initramfs-tools-bin 0.122ubuntu8
I: Validating initramfs-tools-core 0.122ubuntu8
I: Validating initscripts 2.88dsf-59.3ubuntu2
I: Validating insserv 1.14.0-5ubuntu3
I: Validating iproute2 4.3.0-1ubuntu3
I: Validating iputils-ping 3:20121221-5ubuntu2
I: Validating isc-dhcp-client 4.3.3-5ubuntu12
I: Validating isc-dhcp-common 4.3.3-5ubuntu12
I: Validating kbd 1.15.5-1ubuntu4
I: Validating keyboard-configuration 1.108ubuntu15
I: Validating klibc-utils 2.0.4-8ubuntu1
I: Validating kmod 22-1ubuntu4
I: Validating less 481-2.1
I: Validating libacl1 2.2.52-3
I: Validating libapparmor1 2.10.95-0ubuntu2
I: Validating libapt-inst2.0 1.2.10ubuntu1
I: Validating libapt-pkg5.0 1.2.10ubuntu1
I: Validating libatm1 1:2.5.1-1.5
I: Validating libattr1 1:2.4.47-2
I: Validating libaudit-common 1:2.4.5-1ubuntu2
I: Validating libaudit1 1:2.4.5-1ubuntu2
I: Validating libblkid1 2.27.1-6ubuntu3
I: Validating libbsd0 0.8.2-1
I: Validating libbz2-1.0 1.0.6-8
I: Validating libc-bin 2.23-0ubuntu3
I: Validating libc6 2.23-0ubuntu3
I: Validating libcap2 1:2.24-12
I: Validating libcap2-bin 1:2.24-12
I: Validating libcomerr2 1.42.13-1ubuntu1
I: Validating libcryptsetup4 2:1.6.6-5ubuntu2
I: Validating libdb5.3 5.3.28-11
I: Validating libdebconfclient0 0.198ubuntu1
I: Validating libdevmapper1.02.1 2:1.02.110-1ubuntu10
I: Validating libdns-export162 1:9.10.3.dfsg.P4-8
I: Validating libestr0 0.1.10-1
I: Validating libexpat1 2.1.0-7
I: Validating libfdisk1 2.27.1-6ubuntu3
I: Validating libffi6 3.2.1-4
I: Validating libfribidi0 0.19.7-1
I: Validating libgcc1 1:6.0.1-0ubuntu1
I: Validating libgcrypt20 1.6.5-2
I: Validating libgmp10 2:6.1.0+dfsg-2
I: Validating libgnutls-openssl27 3.4.10-4ubuntu1
I: Validating libgnutls30 3.4.10-4ubuntu1
I: Validating libgpg-error0 1.21-2ubuntu1
I: Validating libhogweed4 3.2-1
I: Validating libidn11 1.32-3ubuntu1
I: Validating libisc-export160 1:9.10.3.dfsg.P4-8
I: Validating libjson-c2 0.11-4ubuntu2
I: Validating libklibc 2.0.4-8ubuntu1
I: Validating libkmod2 22-1ubuntu4
I: Validating liblocale-gettext-perl 1.07-1build1
I: Validating liblz4-1 0.0~r131-2ubuntu2
I: Validating liblzma5 5.1.1alpha+20120614-2ubuntu2
I: Validating libmagic1 1:5.25-2ubuntu1
I: Validating libmnl0 1.0.3-5
I: Validating libmount1 2.27.1-6ubuntu3
I: Validating libmpdec2 2.4.2-1
I: Validating libncurses5 6.0+20160213-1ubuntu1
I: Validating libncursesw5 6.0+20160213-1ubuntu1
I: Validating libnettle6 3.2-1
I: Validating libnewt0.52 0.52.18-1ubuntu2
I: Validating libnih1 1.0.3-4.3ubuntu1
I: Validating libp11-kit0 0.23.2-3
I: Validating libpam-modules 1.1.8-3.2ubuntu2
I: Validating libpam-modules-bin 1.1.8-3.2ubuntu2
I: Validating libpam-runtime 1.1.8-3.2ubuntu2
I: Validating libpam0g 1.1.8-3.2ubuntu2
I: Validating libpcre3 2:8.38-3.1
I: Validating libpng12-0 1.2.54-1ubuntu1
I: Validating libpopt0 1.16-10
I: Validating libprocps4 2:3.3.10-4ubuntu2
I: Validating libpython3-stdlib 3.5.1-3
I: Validating libpython3.5-minimal 3.5.1-10
I: Validating libpython3.5-stdlib 3.5.1-10
I: Validating libreadline6 6.3-8ubuntu2
I: Validating libseccomp2 2.2.3-3ubuntu3
I: Validating libselinux1 2.4-3build2
I: Validating libsemanage-common 2.3-1build3
I: Validating libsemanage1 2.3-1build3
I: Validating libsepol1 2.4-2
I: Validating libslang2 2.3.0-2ubuntu1
I: Validating libsmartcols1 2.27.1-6ubuntu3
I: Validating libsqlite3-0 3.11.0-1ubuntu1
I: Validating libss2 1.42.13-1ubuntu1
I: Validating libssl1.0.0 1.0.2g-1ubuntu4
I: Validating libstdc++6 5.3.1-14ubuntu2
I: Validating libsystemd0 229-4ubuntu4
I: Validating libtasn1-6 4.7-3
I: Validating libtext-charwidth-perl 0.04-7build5
I: Validating libtext-iconv-perl 1.7-5build4
I: Validating libtext-wrapi18n-perl 0.06-7.1
I: Validating libtinfo5 6.0+20160213-1ubuntu1
I: Validating libudev1 229-4ubuntu4
I: Validating libusb-0.1-4 2:0.1.12-28
I: Validating libustr-1.0-1 1.0.4-5
I: Validating libuuid1 2.27.1-6ubuntu3
I: Validating libxtables11 1.6.0-2ubuntu3
I: Validating linux-base 4.0ubuntu1
I: Validating locales 2.23-0ubuntu3
I: Validating login 1:4.2-3.1ubuntu5
I: Validating logrotate 3.8.7-2ubuntu2
I: Validating lsb-base 9.20160110
I: Validating lsb-release 9.20160110
I: Validating makedev 2.3.1-93ubuntu1
I: Validating mawk 1.3.3-17ubuntu2
I: Validating mime-support 3.59ubuntu1
I: Validating mount 2.27.1-6ubuntu3
I: Validating multiarch-support 2.23-0ubuntu3
I: Validating ncurses-base 6.0+20160213-1ubuntu1
I: Validating ncurses-bin 6.0+20160213-1ubuntu1
I: Validating ncurses-term 6.0+20160213-1ubuntu1
I: Validating net-tools 1.60-26ubuntu1
I: Validating netbase 5.3
I: Validating netcat-openbsd 1.105-7ubuntu1
I: Validating passwd 1:4.2-3.1ubuntu5
I: Validating perl-base 5.22.1-9
I: Validating procps 2:3.3.10-4ubuntu2
I: Validating python3 3.5.1-3
I: Validating python3-minimal 3.5.1-3
I: Validating python3.5 3.5.1-10
I: Validating python3.5-minimal 3.5.1-10
I: Validating readline-common 6.3-8ubuntu2
I: Validating resolvconf 1.78ubuntu2
I: Validating rsyslog 8.16.0-1ubuntu3
I: Validating sed 4.2.2-7
I: Validating sensible-utils 0.0.9
I: Validating sudo 1.8.16-0ubuntu1
I: Validating systemd 229-4ubuntu4
I: Validating systemd-sysv 229-4ubuntu4
I: Validating sysv-rc 2.88dsf-59.3ubuntu2
I: Validating sysvinit-utils 2.88dsf-59.3ubuntu2
I: Validating tar 1.28-2.1
I: Validating tzdata 2016d-0ubuntu0.16.04
I: Validating ubuntu-keyring 2012.05.19
I: Validating ubuntu-minimal 1.361
I: Validating ucf 3.0036
I: Validating udev 229-4ubuntu4
I: Validating ureadahead 0.100.0-19
I: Validating util-linux 2.27.1-6ubuntu3
I: Validating vim-common 2:7.4.1689-3ubuntu1
I: Validating vim-tiny 2:7.4.1689-3ubuntu1
I: Validating whiptail 0.52.18-1ubuntu2
I: Validating xkb-data 2.16-1ubuntu1
I: Validating zlib1g 1:1.2.8.dfsg-2ubuntu4
I: Chosen extractor for .deb packages: dpkg-deb
I: Extracting adduser...
I: Extracting base-files...
I: Extracting base-passwd...
I: Extracting bash...
I: Extracting bsdutils...
I: Extracting coreutils...
I: Extracting dash...
I: Extracting debconf...
I: Extracting debianutils...
I: Extracting diffutils...
I: Extracting dpkg...
I: Extracting e2fslibs...
I: Extracting e2fsprogs...
I: Extracting findutils...
I: Extracting gcc-6-base...
I: Extracting grep...
I: Extracting gzip...
I: Extracting hostname...
I: Extracting init...
I: Extracting init-system-helpers...
I: Extracting initscripts...
I: Extracting insserv...
I: Extracting libacl1...
I: Extracting libapparmor1...
I: Extracting libattr1...
I: Extracting libaudit-common...
I: Extracting libaudit1...
I: Extracting libblkid1...
I: Extracting libbz2-1.0...
I: Extracting libc-bin...
I: Extracting libc6...
I: Extracting libcap2...
I: Extracting libcap2-bin...
I: Extracting libcomerr2...
I: Extracting libcryptsetup4...
I: Extracting libdb5.3...
I: Extracting libdebconfclient0...
I: Extracting libdevmapper1.02.1...
I: Extracting libfdisk1...
I: Extracting libgcc1...
I: Extracting libgcrypt20...
I: Extracting libgpg-error0...
I: Extracting libkmod2...
I: Extracting liblzma5...
I: Extracting libmount1...
I: Extracting libncurses5...
I: Extracting libncursesw5...
I: Extracting libpam-modules...
I: Extracting libpam-modules-bin...
I: Extracting libpam-runtime...
I: Extracting libpam0g...
I: Extracting libpcre3...
I: Extracting libprocps4...
I: Extracting libseccomp2...
I: Extracting libselinux1...
I: Extracting libsemanage-common...
I: Extracting libsemanage1...
I: Extracting libsepol1...
I: Extracting libsmartcols1...
I: Extracting libss2...
I: Extracting libsystemd0...
I: Extracting libtinfo5...
I: Extracting libudev1...
I: Extracting libustr-1.0-1...
I: Extracting libuuid1...
I: Extracting locales...
I: Extracting login...
I: Extracting lsb-base...
I: Extracting makedev...
I: Extracting mawk...
I: Extracting mount...
I: Extracting multiarch-support...
I: Extracting ncurses-base...
I: Extracting ncurses-bin...
I: Extracting passwd...
I: Extracting perl-base...
I: Extracting procps...
I: Extracting sed...
I: Extracting sensible-utils...
I: Extracting systemd...
I: Extracting systemd-sysv...
I: Extracting sysv-rc...
I: Extracting sysvinit-utils...
I: Extracting tar...
I: Extracting tzdata...
I: Extracting util-linux...
I: Extracting zlib1g...
Error in debootstrap
/home/user/qubes-builder/qubes-src/builder-debian/Makefile.qubuntu:155: recipe for target '/home/user/qubes-builder/chroot-xenial/home/user/.prepared_base' failed
make[1]: *** [/home/user/qubes-builder/chroot-xenial/home/user/.prepared_base] Error 1
Makefile:209: recipe for target 'vmm-xen-vm' failed
make: *** [vmm-xen-vm] Error 1

Unman

unread,
Feb 11, 2017, 5:50:39 PM2/11/17
to trule...@gmail.com, qubes-users
Sometimes I despair.

Let me say it again:
"If you read my email I specifically say that there are PRs to fix these
issues, and I will let you know when they are merged.
They aren't merged yet."

And again:
"If you read my email I specifically say that there are PRs to fix these
issues, and I will let you know when they are merged.
They aren't merged yet."


Unless you have merged my PRs yourself, in which case it would be
helpful if you were to say so, you are simply wasting your time and
ours.
If you HAVE merged them, please provide some more detail on what you
have done, make sure that you have enabled debug and verbose and provide
some HELPFUL information. Pasting reams of succesful commands is
pointless.

Unman

unread,
Mar 3, 2017, 10:07:07 AM3/3/17
to damien...@gmail.com, qubes-users
PRs are merged, to master if nor 3.2

This means that both Xenial and Trusty should build straight.

Set up a build environment as per docs.

git clone https://github.com/QubesOS/qubes-builder
cd qubes-builder
./setup (select builder-debian and trsut/xenial variants, deselect
fed23)
edit builder.conf, changing RELEASE:=3.2 to RELEASE:=master
make switch-branch (to get latest and greatest versions of components)
make qubes-vm
make template

cheers

unman

Damien Waber

unread,
Mar 3, 2017, 11:22:24 AM3/3/17
to Unman, qubes-users
Thank you so much! 

kenneth...@gmail.com

unread,
Jun 27, 2017, 11:29:24 AM6/27/17
to qubes-users, damien...@gmail.com, un...@thirdeyesecurity.org
Is this still usable today? I switched the branch to master and I went from having a failure in debootstrap at the make template stage to a failure at the make qubes-vm stage.

To be clear the debootstrap.log was showing an entry "chroot: failed to run command 'mount': No such file or directory" where I could see mount was in the /bin dir when I mounted and checked.

This issue in make qubes-vm appears to happen because core-agent-linux cannot find files.
...
make[1]: Entering directory `/home/user/qubes-src/core-agent-linux'
dh_install --fail-missing
cp: cannot stat 'debian/tmp/lib/systemd/system/avahi-daemon.service.d/30_qubes.conf': No such file or directory
dh_install: cp -a debian/tmp/lib/systemd/system/avahi-daemon.service.d/30_qubes.conf debian/qubes-core-agent//lib/systemd/system/avahi-daemon.service.d/ returned exit code 1
make[1]: *** [override_dh_install] Error 2
make[1]: Leaving directory `/home/user/qubes-src/core-agent-linux'
...

One thing I tried doing in an prior run was git checkout v3.2.18 as per https://github.com/QubesOS/qubes-core-agent-linux/releases/tag/v3.2.18 running on a hunch that the 4.0 code is messing with something which did indeed work and it continued on. v3.2.18 is the last v3 release you guys have. But shortly after it failed in another module. I followed the same steps, checked out a v3 version and it continued on. did that I think one more time and make qubes-vm finishes.

Now I run make template and.... fails in debootstrap same as initially.

Is there an Ubuntu guide out there that is relevant and works? I have been scouring the web for 3 days now trying to get a trusty and xenial template built.

Ken J

unread,
Jun 27, 2017, 4:00:34 PM6/27/17
to qubes-users, damien...@gmail.com, un...@thirdeyesecurity.org
Some other notes to add. After doing some more debugging:

#!/bin/bash
sudo mount /home/user/qubes-builder/qubes-src/linux-template-builder/prepared_images/xenial.img /mnt/


# mknod on each file and they already exist so they need to be deleted. Also possible that the
# mount failure possible below causes everything to exit without properly cleaning up.
# Files to delete
sudo rm /mnt/dev/null
sudo rm /mnt/dev/zero
sudo rm /mnt/dev/full
sudo rm /mnt/dev/random
sudo rm /mnt/dev/urandom
sudo rm /mnt/dev/tty
sudo rm -rf /mnt/dev/pts/
sudo rm -rf /mnt/dev/shm/
sudo rm /mnt/dev/ptmx

# [pid 17064] [00007fac5cb258e7] symlink("/proc/self/fd", "/home/user/qubes-builder/qubes-src/linux-template-builder/mnt/dev/fd/fd") = -1 ENOENT (No such file or directory)
#[pid 17064] [00007fac5cb241f0] write(2, "ln: ", 4) = 4
#[pid 17064] [00007fac5cb241f0] write(2, "failed to create symbolic link '"..., 104) = 104
#[pid 17064] [00007fac5cb241f0] write(2, ": No such file or directory", 27) = 27
#[pid 17064] [00007fac5cb241f0] write(2, "\n", 1) = 1
#[pid 17064] [00007fac5cb340f7] lseek(0, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
#[pid 17064] [00007fac5caa733b] close(0) = 0
#[pid 17064] [00007fac5caa733b] close(1) = 0
#[pid 17064] [00007fac5caa733b] close(2) = 0
#[pid 17064] [00007fac5caf9da8] exit_group(1) = ?
#[pid 17064] [????????????????] +++ exited with 1 +++

# Possibly proc wasn't properly mounted????

sudo umount /mnt


I edited the builder-debian/template_debian/01_install_core.sh to add an strace -f -i to the debootstrap command @ line 47:

        COMPONENTS="" $DEBOOTSTRAP_PREFIX strace -i -f debootstrap \
            --arch=amd64 \
            --include="ncurses-term,locales,tasksel,$eatmydata_maybe" \
            --components=main \
            --keyring="${SCRIPTSDIR}/../keys/${DIST}-${DISTRIBUTION}-archive-keyring.gpg" \
            "${DIST}" "${INSTALLDIR}" "file://${INSTALLDIR}/${TMPDIR}/dummy-repo" 2>/tmp/fuck.txt && \
        return 0




--
You received this message because you are subscribed to a topic in the Google Groups "qubes-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/qubes-users/A-glF2OdkXg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to qubes-users+unsubscribe@googlegroups.com.
To post to this group, send email to qubes...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/51fb134f-5177-485b-a7d9-d98e4497ac87%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Regards,
Ken B. Johnson

Ken J

unread,
Jun 27, 2017, 8:24:56 PM6/27/17
to qubes-users, un...@thirdeyesecurity.org
Sorry to keep bombarding. But I figured the issue out. /proc wasn't being mounted because debootstrap wasn't looking in /bin for it. It was looking everywhere else (for some reason). /bin is not in the PATH.



This happens because I was using Fedora24 qube to build the template. I'm assuming if I used a debian-8 vm this wouldn't have happened. 

Just wanted to update for anyone having an issue with building ubuntu templates. And also for anyone using Fedora to build a template. 

P.S while writing this I was prepping a pull request. Found that unman is too badass and fast. Already was on it!  

Unman

unread,
Jun 27, 2017, 8:44:07 PM6/27/17
to kenneth...@gmail.com, qubes-users, damien...@gmail.com
I think you need to work on your search skills :-)
The same question was asked on this list 3 days ago.
The mount error arises because 'mount' isn't on the path - copy the
export PATH statement from template_debian/vars.sh to
template_qubuntu/vars.sh, and you should be good to go.

The build on master is crocked for the moment.
Note that the PRs are all merged to 3.2, and you can therefore build on
3.2 without any problem.
The simplest way to do this is to set RELEASE := 3.2 , and then 'make
switch-branch'.

There's really no need for a special Ubuntu guide - the standard
instructions for using qubes-builder in
www.qubes-os.org/doc/qubes-builder explain the basics.
Obviously if you just want to build a template, then 'make qubes-vm' and
'make template' suffice.
Otherwise, there's the illustrated guide to building an Arch Template in
the docs.

unman

Unman

unread,
Jun 27, 2017, 8:54:32 PM6/27/17
to kenneth...@gmail.com, qubes-users, damien...@gmail.com
And an update shows me you'd worked this out for yourself - good stuff.

Ken J

unread,
Jun 27, 2017, 9:03:53 PM6/27/17
to Unman, qubes-users, damien...@gmail.com
Hi Unman,

That miiiiight be the case more times than not (working on my search skills) :) I want to start by thanking you for your work. Amazing

I was a bit confused throughout this process because had the ./setup telling me to make install-deps, make get-sources, make qubes-vm, make template. I've got https://www.qubes-os.org/doc/qubes-builder/ telling me something different. Then there's https://www.qubes-os.org/doc/templates/ubuntu/ telling don't worry it's easy with no instruction. Then there is this thread telling me if I have an issue please bump to master and try something else. My build fails and like the poor sap that I am I have no idea if it's me, my setup, qubes, or trump. 

Maybe I'm using all of the wrong search terms, qubes + ubuntu + debootstrap + mount, no clue what the answer is all I got that looked remotely close to my search was this thread. 

Unman

unread,
Jun 27, 2017, 9:35:08 PM6/27/17
to Ken J, qubes-users, damien...@gmail.com
Hi ken,

You're quite right - the instructions are varied and somewhat
inconsistent. The qubes-builder page refers only to building qubes, and
the iso. We should add to this to make it clear that other options are
available, and say what they are.

My suggestion in this thread to use master was because my PRs hadn't been
merged to 3.2. At that time, building in master was straightforward - it
isn't now, (but it soon will be.) For the moment the 3.2 build for
components and templates works fine once that PATH is set, as you
discovered.

All in all it wasn't surprising that you were confused - I'll see about
making those docs a bit clearer. Best of all, of course, would be if
everything just worked, but we aren't quite at that stage yet.
Thanks for your patience

unman

kush...@gmail.com

unread,
Aug 29, 2017, 9:15:44 AM8/29/17
to qubes-users, kenneth...@gmail.com, damien...@gmail.com, un...@thirdeyesecurity.org
On Wednesday, June 28, 2017 at 6:14:07 AM UTC+5:30, Unman wrote:
>
> I think you need to work on your search skills :-)
> The same question was asked on this list 3 days ago.
> The mount error arises because 'mount' isn't on the path - copy the
> export PATH statement from template_debian/vars.sh to
> template_qubuntu/vars.sh, and you should be good to go.
>
> The build on master is crocked for the moment.
> Note that the PRs are all merged to 3.2, and you can therefore build on
> 3.2 without any problem.
> The simplest way to do this is to set RELEASE := 3.2 , and then 'make
> switch-branch'.
>
Can we build Trusty on a 4.0rc1 box now? Trying to figure out this
mount related error from early morning. Less than 24 hours of Qubes
experiene this side though.


Kushal

Unman

unread,
Sep 1, 2017, 11:15:18 AM9/1/17
to kush...@gmail.com, qubes-users, kenneth...@gmail.com, damien...@gmail.com
None of the Ubuntu builds work under 4 as yet.
Reply all
Reply to author
Forward
0 new messages