New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bento box does not boot and mount correctly in Debian 8 #1381

Closed
heartsucker opened this Issue Aug 18, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@heartsucker
Contributor

heartsucker commented Aug 18, 2016

This was not a problem before with the old Ubuntu box.

My system:

heartsucker@pythagoras:~/code/freedom-of-press/securedrop (config-tool)$ VBoxManage --version
4.3.36_Debianr105129
heartsucker@pythagoras:~/code/freedom-of-press/securedrop (config-tool)$ uname -a
Linux pythagoras 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2+deb8u3 (2016-07-02) x86_64 GNU/Linux

Command output:

heartsucker@pythagoras:~/code/freedom-of-press/securedrop (config-tool)$ vag up
Bringing machine 'development' up with 'virtualbox' provider...
==> development: Box 'bento/ubuntu-14.04' could not be found. Attempting to find and install...
    development: Box Provider: virtualbox
    development: Box Version: >= 0
==> development: Loading metadata for box 'bento/ubuntu-14.04'
    development: URL: https://atlas.hashicorp.com/bento/ubuntu-14.04
==> development: Adding box 'bento/ubuntu-14.04' (v2.2.9) for provider: virtualbox
    development: Downloading: https://atlas.hashicorp.com/bento/boxes/ubuntu-14.04/versions/2.2.9/providers/virtualbox.box
==> development: Successfully added box 'bento/ubuntu-14.04' (v2.2.9) for 'virtualbox'!
==> development: Importing base box 'bento/ubuntu-14.04'...
==> development: Matching MAC address for NAT networking...
==> development: Checking if box 'bento/ubuntu-14.04' is up to date...
==> development: Setting the name of the VM: development
==> development: Clearing any previously set network interfaces...
==> development: Preparing network interfaces based on configuration...
    development: Adapter 1: nat
==> development: Forwarding ports...
    development: 8080 (guest) => 8080 (host) (adapter 1)
    development: 8081 (guest) => 8081 (host) (adapter 1)
    development: 22 (guest) => 2222 (host) (adapter 1)
==> development: Running 'pre-boot' VM customizations...
==> development: Booting VM...
==> development: Waiting for machine to boot. This may take a few minutes...
    development: SSH address: 127.0.0.1:2222
    development: SSH username: vagrant
    development: SSH auth method: private key
==> development: Machine booted and ready!
[development] GuestAdditions versions on your host (4.3.36) and guest (5.0.26) do not match.
stdin: is not a tty
Reading package lists...
Building dependency tree...
Reading state information...
dkms is already the newest version.
The following NEW packages will be installed:
  linux-headers-3.13.0-92 linux-headers-3.13.0-92-generic
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 9,569 kB of archives.
After this operation, 76.9 MB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-headers-3.13.0-92 all 3.13.0-92.139 [8,870 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-headers-3.13.0-92-generic amd64 3.13.0-92.139 [699 kB]
dpkg-preconfigure: unable to re-open stdin: No such file or directory
Fetched 9,569 kB in 13s (700 kB/s)
Selecting previously unselected package linux-headers-3.13.0-92.
(Reading database ... 32949 files and directories currently installed.)
Preparing to unpack .../linux-headers-3.13.0-92_3.13.0-92.139_all.deb ...
Unpacking linux-headers-3.13.0-92 (3.13.0-92.139) ...
Selecting previously unselected package linux-headers-3.13.0-92-generic.
Preparing to unpack .../linux-headers-3.13.0-92-generic_3.13.0-92.139_amd64.deb ...
Unpacking linux-headers-3.13.0-92-generic (3.13.0-92.139) ...
Setting up linux-headers-3.13.0-92 (3.13.0-92.139) ...
Setting up linux-headers-3.13.0-92-generic (3.13.0-92.139) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 3.13.0-92-generic /boot/vmlinuz-3.13.0-92-generic
Downloading VirtualBox Guest Additions ISO from http://download.virtualbox.org/virtualbox/4.3.36/VBoxGuestAdditions_4.3.36.iso
Copy iso file /home/heartsucker/.vagrant.d/tmp/VBoxGuestAdditions_4.3.36.iso into the box /tmp/VBoxGuestAdditions.iso
stdin: is not a tty
mount: block device /tmp/VBoxGuestAdditions.iso is write-protected, mounting read-only
Installing Virtualbox Guest Additions 4.3.36 - guest version is 5.0.26
stdin: is not a tty
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.3.36 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 5.0.26 of VirtualBox Guest Additions...
Stopping VirtualBox Additions ...fail!
(Cannot unload module vboxguest)
Removing existing VirtualBox DKMS kernel modules ...done.
Removing existing VirtualBox non-DKMS kernel modules ...done.
update-initramfs: Generating /boot/initrd.img-/3.13.0-92-generic
Stopping VirtualBox Guest Addition service  ...done.
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox DKMS kernel modules ...done.
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules ...done.
Doing non-kernel setup of the Guest Additions ...done.
You should restart your guest to make sure the new modules are actually used

Installing the Window System drivers
Could not find the X.Org or XFree86 Window System, skipping.
An error occurred during installation of VirtualBox Guest Additions 4.3.36. Some functionality may not work as intended.
In most cases it is OK that the "Window System drivers" installation failed.
stdin: is not a tty
Cleaning up downloaded VirtualBox Guest Additions ISO...
vagrant_vbguest.machine_loop_guard
==> development: Checking for guest additions in VM...
==> development: Setting hostname...
==> development: Mounting shared folders...
    development: /vagrant => /home/heartsucker/code/freedom-of-press/securedrop
Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:

mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` vagrant /vagrant
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` vagrant /vagrant

The error output from the last command was:

stdin: is not a tty
/sbin/mount.vboxsf: mounting failed with the error: No such device

Destroying the box and retrying produces the same error every time.

This is related to this issue, so this isn't SecureDrop's fault, but it is a somewhat annoying break in functionality for me (and others?).

@conorsch

This comment has been minimized.

Contributor

conorsch commented Aug 22, 2016

Definitely caused by the mismatch of VirtualBox versions between host and guest. You mention you're running Debian 8 on your workstation—given the version of VirtualBox, looks like you're running Jessie. I've been running Stretch over here:

  [sd] develop+ ± VBoxManage --version
5.0.24_Debianr108355
[conor@Tyr:~/freedomofpress/securedrop]
  [sd] develop+ ± apt-cache policy virtualbox
virtualbox:
  Installed: 5.0.24-dfsg-2
  Candidate: 5.0.24-dfsg-2
  Version table:
 *** 5.0.24-dfsg-2 500
        500 http://ftp.us.debian.org/debian stretch/contrib amd64 Packages
        100 /var/lib/dpkg/status
[conor@Tyr:~/freedomofpress/securedrop]
  [sd] develop+ ± uname -a
Linux Tyr 4.4.11-grsec #3 SMP Fri Jun 24 10:18:01 PDT 2016 x86_64 GNU/Linux

The 5.x series of VirtualBox handles the vagrant shared folder fine:

  [sd] develop+* ± vagrant destroy -f development && vagrant up development
==> development: VM not created. Moving on...
Bringing machine 'development' up with 'virtualbox' provider...
==> development: Importing base box 'bento/ubuntu-14.04'...
==> development: Matching MAC address for NAT networking...
==> development: Checking if box 'bento/ubuntu-14.04' is up to date...
==> development: Setting the name of the VM: development
==> development: Fixed port collision for 22 => 2222. Now on port 2202.
==> development: Clearing any previously set network interfaces...
==> development: Preparing network interfaces based on configuration...
    development: Adapter 1: nat
==> development: Forwarding ports...
    development: 8080 (guest) => 8080 (host) (adapter 1)
    development: 8081 (guest) => 8081 (host) (adapter 1)
    development: 22 (guest) => 2202 (host) (adapter 1)
==> development: Running 'pre-boot' VM customizations...
==> development: Booting VM...
==> development: Waiting for machine to boot. This may take a few minutes...
    development: SSH address: 127.0.0.1:2202
    development: SSH username: vagrant
    development: SSH auth method: private key
==> development: Machine booted and ready!
==> development: Checking for guest additions in VM...
==> development: Setting hostname...
==> development: Mounting shared folders...
    development: /vagrant => /home/conor/freedomofpress/securedrop
==> development: Running provisioner: ansible...
    development: Running ansible-playbook...
PYTHONUNBUFFERED=1 ANSIBLE_FORCE_COLOR=true ANSIBLE_HOST_KEY_CHECKING=false ANSIBLE_SSH_ARGS='-o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ControlMaster=auto -o ControlPersist=60s' ansible-playbook --connection=ssh --timeout=30 --limit="development" --inventory-file=/home/conor/freedomofpress/securedrop/.vagrant/provisioners/ansible/inventory -v install_files/ansible-base/securedrop-development.yml

PLAY [Configure SecureDrop Development machine.] ******************************

GATHERING FACTS ***************************************************************
ok: [development]

TASK: [development | Update apt package lists.] *******************************

The develop docs for developers mention support platforms of Ubuntu 14.04 and Debian Stretch, but we should probably distill those recommendations into concrete versions of critical software such as VirtualBox.

Is bumping to Stretch (or Sid) a possibility for you, @heartsucker?

@heartsucker

This comment has been minimized.

Contributor

heartsucker commented Aug 22, 2016

@conorsch I can try upgrading to Stretch later this week. I only have the one laptop, and I need to make sure I don't break it for work. :D

@heartsucker

This comment has been minimized.

Contributor

heartsucker commented Aug 23, 2016

I'm going to call this closed because there's this work around.

vagrant ssh -c 'sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions'
vagrant reload

And since you don't officially support my OS, I can't really complain. When I test out Stretch, I'll post back here in case someone else has this issue.

@conorsch

This comment has been minimized.

Contributor

conorsch commented Aug 23, 2016

Nice! Of course, you'll need to do that every time you rebuild the development VM, but it's certainly less onerous than a distribution upgrade on your workstation. Thanks for sharing.

Already referenced this issue from #1208, to make sure the supported platforms are explicitly stated in the dev docs. Adding mention of that workaround for folks running Jessie may be worthwhile, as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment