1. it wouldn't hurt to have both. maybe even to package mkosi[1]. 2. systemd-nspawn) is patched a bit to add one additional init script (you can check what nixos-container script does), but i think it should (by default) work as in upstream. if nothing i can confirm your error that running debian/ubuntu via debootstrap and systemd-nspawn fails with error you provided. i think best would be to open an issue (if it doesn't exist already) for this and lets get this working.
[1] https://github.com/systemd/mkosi On Sun, Oct 23, 2016 at 5:20 AM, Stefan Huchler <stefan.huch...@mail.de> wrote: > Hi, > > I made a ubuntu version of the debootstrap installer, which adds support > to ubuntu releases. > > I could upload that "debootstrap-ubuntu" version to github and open a PR > for it. > > But I wonder if that makes sense, cause the debootstrap version of > ubuntu comes with the scripts for debian and ubuntu. > > So why not just use that version of debootstrap instead of the one from > debian directly? > > diff pkgs/tools/misc/debootstrap-ubuntu/default.nix > pkgs/tools/misc/debootstrap/default.nix > 28,29c28,29 > < name = "debootstrap-ubuntu-${version}"; > < version = "1.0.81ubuntu3"; > --- >> name = "debootstrap-${version}"; >> version = "1.0.80"; > 34,35c34,35 > < url = > "http://archive.ubuntulinux.org/ubuntu/pool/main/d/debootstrap/debootstrap_${version}.tar.gz"; > < sha256 = > "41b05a43fcb066543213d92e5f3d4e7e59ecfa09079e5c05eff311f813a24aa3"; > --- >> url = >> "mirror://debian/pool/main/d/debootstrap/debootstrap_${version}.tar.gz"; >> sha256 = "06gigscd2327wsvc7n7w2m8xmaixvp4kyqhayn00qrgd9i9w34x6"; > 79c79 > < cat >> $out/bin/debootstrap-ubuntu << EOF > --- >> cat >> $out/bin/debootstrap << EOF > 87c87 > < chmod +x $out/bin/debootstrap-ubuntu > --- >> chmod +x $out/bin/debootstrap > 90c90 > < mv debootstrap.8 $out/man/man8/debootstrap-ubuntu.8 > --- >> mv debootstrap.8 $out/man/man8 > 98,99c98,99 > > thats basicly what I did, it installs / runs and works just had to > disable pgp check: > > debootstrap-ubuntu --no-check-gpg xenial ubuntu > I: Retrieving InRelease > I: Retrieving Packages > .... > I: Base system installed successfully. > > > this is neat especialy because the machinectl pull-tar functionality > doesnt work too, so this is a good method to get systemd-nspawn > compatible build. > > Well or is it? > > $ sudo systemd-nspawn -b -D ubuntu/ > Spawning container ubuntu on /home/black/virt/ubuntu. > Press ^] three times within 1s to kill container. > /etc/localtime does not point into /usr/share/zoneinfo/, not updating > container timezone. > Cannot be run in a chroot() environment. > Freezing execution. > > Well is nspawn buggy in nixos? that should work as far as I know. > > So sorry now thats 2 topics: > 1. would it make sense to use the ubuntu-debootstrap version (with the > scripts from ubuntu) or should I make a PR for the ubuntu-version? > 2. is systemd-nspawn working? > > _______________________________________________ > nix-dev mailing list > nix-dev@lists.science.uu.nl > http://lists.science.uu.nl/mailman/listinfo/nix-dev -- Rok Garbas https://garbas.si _______________________________________________ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev