crouton: /prepare.sh cannot create as Directory is nonexistent

Please paste the output of the following command here: sudo edit-chroot -all

name: kali-rolling encrypted: no Entering /mnt/stateful_partition/crouton/chroots/kali-rolling… crouton: version 1-20181001133934~master:38012fdf release: kali-rolling architecture: amd64 targets: core,audio,xfce host: version 11151.11.0 (Official Build) dev-channel eve kernel: Linux localhost 4.4.159-15334-g388c74685442 #1 SMP PREEMPT Wed Oct 24 02:07:35 PDT 2018 x86_64 GNU/Linux freon: yes Unmounting /mnt/stateful_partition/crouton/chroots/kali-rolling…

Please describe your issue:

I get the following error:

Compiling CRAS (native)… Installing CRAS… /prepare.sh: 1166: /prepare.sh: cannot create /usr/share/alsa/alsa.conf.d/10-cras.conf: Directory nonexistent Failed to complete chroot setup. Unmounting /mnt/stateful_partition/crouton/chroots/kali-rolling…

If known, describe the steps to reproduce the issue:

I just ran:

sudo sh -e ~/Downloads/crouton -r kali-rolling -u -t core,audio,xfc


I have tried other targets, even just core, and this keeps coming up. Can you assist? Thank you!

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 4
  • Comments: 16 (1 by maintainers)

Commits related to this issue

Most upvoted comments

I even made the directory, but I think it’s in the chroot, not the chromeOS. Not sure where to go from here…

Could you try making it in /mnt/stateful_partition/crouton/chroots/kali-rolling/usr/share/alsa/ ?

This seems to have worked for me for debian buster: sudo mkdir /mnt/stateful_partition/crouton/chroots/buster/usr/share/alsa/alsa.conf.d

@dnschneid said:

That suggests two things:

  1. Your workaround makes the installer finish, but I suspect audio won’t work.
  2. On systems with no /usr/share/alsa/alsa.conf.d, we should be writing the cras config to /etc/alsa/conf.d

Can confirm that this works on “buster” in the sense that audio works for the user (as opposed to only for root).

@SamuelClyde that did it! I can’t thank you enough. I am running kali-rolling in a KDE. Thanks again!

Me too.

$ sudo edit-chroot -all
name: kali
encrypted: no
Entering /mnt/stateful_partition/crouton/chroots/kali...
crouton: version 1-20181001133934~master:38012fdf
release: kali-rolling
architecture: amd64
targets: xiwi,cli-extra,keyboard,xfce,extension
host: version 11021.56.0 (Official Build) stable-channel peppy 
kernel: Linux localhost 3.8.11 #1 SMP Mon Oct 22 23:38:25 PDT 2018 x86_64 GNU/Linux
freon: yes
Unmounting /mnt/stateful_partition/crouton/chroots/kali...

I did

sudo sh ~/Downloads/crouton -t xiwi,cli-extra,keyboard,xfce,extension -n kali -r kali-rolling

and got

...
Installing CRAS...
/prepare.sh: 1166: /prepare.sh: cannot create /usr/share/alsa/alsa.conf.d/10-cras.conf: Directory nonexistent
Failed to complete chroot setup.

Installed kali linux finally!

After power wash and re-entering developer mode, was able to sudo mkdir /mnt/stateful_partition/crouton/chroots/kali-rolling/usr/share/alsa/alsa.conf.d
Then entered: sudo sh -e ~/Downloads/crouton -r kali-rolling -t xfce

That is odd. How did you test sound? I usually just do aplay /usr/share/sounds/alsa/Front_Left.wav.