busybox - vagrant ash: sudo: not found -


when starting vagrant box small 15mb busybox image, first time error during phase

mounting shared folders... 

it seems vagrant trying sudo, isn't istalled. error:

the following ssh command responded non-zero exit status. vagrant assumes means command failed!  mkdir -p /vagrant  stdout command:    stderr command:  ash: sudo: not found 

it works far, can login root password vagrant, guess not perfect?

this setup: https://github.com/rubo77/ffnord-example/blob/pyddhcpd/vagrantfile

  config.ssh.username = 'root'   config.ssh.password = 'vagrant'   config.ssh.insert_key = 'true'   config.ssh.shell = 'ash'   (0..9).each |i|         config.vm.define "gc-node0#{i}" |node|         end   end 

by default vagrant share/sync directory /vagrant (guest) current project directory, 1 containing vagrantfile (host), more directories can shared using config.vm.synced_folder, don't know if default /vagrant can disabled.

if aren't using shared directories feature missing sudo isn't problem.

if filesystem writeable can create /vagrant directory once, on next up vagrant shouldn't try sudo mkdir again;

but assuming you're using virtualbox (i don't know others emulator behavior/architecture) you'll face problem, shared directories require kernel modules vboxsf , vboxguest (from virtualbox guest additions) built (against running kernel sources) , loaded (insmod), , command mount.vboxsf built , installed in /sbin, plus busybox require option mount helpers enabled because vagrant use mount -t vboxsf , not mount.vboxsf directly, when vagrant try mount shared directories , requirements aren't matched there long timeout before failing error (a minute/two or more).

notice busybox (current stable) support sudo, disabled default.

if you're building buildroot sources can tell shared feature works (i managed image busybox work vagrant expect), if you're using pre-built kernel/busybox... may problem, have find matching binaries vboxsf, vboxguest, mount.vboxsf , if mount helpers option disabled in busybox need find workaround (perhaps modifying vagrant use mount.vboxsf).


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -