0

Following the ZFSonLinux guide on how to install Ubuntu 16.04 with a ZFS root file system I've gotten up to the point of bootstrapping the new Ubuntu install which is where I meet resistence. Running the sequence of commands that are:

# chmod 1777 /mnt/var/tmp
# debootstrap xenial /mnt
# mount --rbind /dev  /mnt/dev
# mount --rbind /proc /mnt/proc
# mount --rbind /sys  /mnt/sys
# chroot /mnt /bin/bash --login

I'm then left with a chroot without apt:

# apt-get
bash: apt-get: command not found

Even specifying that apt should be included does not help. Though one may observe how apt is listed among one of the packages that are downloaded, but not extracted:

debootstrap --include=apt --arch=amd64 xenial /mnt http://archive.ubuntu.com/ubuntu/
...
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: Extracting adduser...
I: Extracting base-files...
...

Does anyone know how this would happen? I've never had a debootsrap not include apt before.

  • Nope, command not found. find / -iname apt only comes up with the /etc/apt I made myself and /var/cache/apt, /var/lib/apt which I've not created. – Rovanion Dec 24 '17 at 17:13
  • Download apt from the official website apt_1.2.15ubuntu0.2_amd64.deb then install it through dpkg – GAD3R Dec 24 '17 at 17:40
  • Unfortunately its not that simple. Apt in turn depends on a whole bunch of packages which aren't installed either such as libc6. – Rovanion Dec 25 '17 at 11:13
  • Remove the --include=apt from the debootstap option , it is not required because apt is available on the main repo ( it can be the cause of the problem , i don't know) – GAD3R Dec 25 '17 at 11:22
  • I've tried both with and without the include flag. Perhaps that was not clear enough from the OP. – Rovanion Dec 25 '17 at 11:31
0

My sin seems to have been bindmounting /dev, /proc and /sys into the chroot before running debootstrap. I can't be entirely sure since I also rebooted the machine at one point as I was unable to unmount the rbinds, but the debug output of debootstrap indicated that this was the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.