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:
https://github.com/QubesOS/qubes-builder-debian/blob/master/template_debian/vars.sh#L11

Needs to be added here:
https://github.com/QubesOS/qubes-builder-debian/blob/master/template_qubuntu/vars.sh
as well.

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!

On Tue, Jun 27, 2017 at 1:00 PM, Ken J <kennethjohns...@gmail.com> wrote:

> 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
>
>
>
> On Tue, Jun 27, 2017 at 8:29 AM, <kennethjohns...@gmail.com> wrote:
>
>> On Friday, March 3, 2017 at 7:07:07 AM UTC-8, Unman wrote:
>> > On Fri, Feb 10, 2017 at 11:15:18PM +0000, Unman wrote:
>> > > On Fri, Feb 10, 2017 at 10:04:54AM -0800, damien.wa...@gmail.com
>> wrote:
>> > > > Le jeudi 9 février 2017 12:41:42 UTC+1, Unman a écrit :
>> > > > > On Thu, Feb 09, 2017 at 02:37:36AM -0800, wrote:
>> > > > > > 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
>> > > > > >
>> > > > >
>> > > > > 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
>> > > >
>> > > > Hi, thank you !
>> > > >
>> > > > Is there a way I may support you? maybe I can test it?
>> > > >
>> > > >
>> > > > Best regards,
>> > > >
>> > > > Damien
>> > > >
>> > >
>> > > 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.
>> >
>> > 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
>>
>> 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/s
>> ystemd/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.
>>
>> --
>> 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/to
>> pic/qubes-users/A-glF2OdkXg/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> qubes-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to qubes-users@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/qubes-users/51fb134f-5177-485b-a7d9-d98e4497ac87%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Regards,
> Ken B. Johnson
>



-- 
Regards,
Ken B. Johnson

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/CABscG3bBC43Qx6oAk26veeJieGb_RRF56Ux_kbS%3Dc%2B4x3zo9TA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to