crouton: Can't run prepare.sh during setup, and can't access file when run separately

chronos@localhost ~ $ sudo edit-chroot -all
name: artful
encrypted: no
Entering /mnt/stateful_partition/crouton/chroots/artful...
ln: failed to access '/var/run/crouton/mnt/stateful_partition/crouton/chroots/artful/etc/resolv.conf': Permission denied
Unmounting /mnt/stateful_partition/crouton/chroots/artful...

Please describe your issue:

I can’t start any chroot on any version. It seems to be complaining about permission denied, which makes no sense as I am root. When setting up the chroot, it can’t run prepare.sh. This also happened on a chroot which worked consistantly for several weeks. As

If known, describe the steps to reproduce the issue:

chronos@localhost ~/Downloads $ sudo sh crouton -t cli-extra
...
Installing crash_report_wrapper into the host...
chroot: failed to run command '/prepare.sh': Permission denied
Failed to complete chroot setup.
Unmounting /mnt/stateful_partition/crouton/chroots/xenial...
chronos@localhost ~/Downloads $ sudo enter-chroot
Entering /mnt/stateful_partition/crouton/chroots/xenial...
A chroot setup script still exists inside the chroot.
The chroot may not be fully set up.
Would you like to finish the setup? [Y/n/d] y
Preparing chroot environment...
ln: failed to access '/var/run/crouton/mnt/stateful_partition/crouton/chroots/xenial/etc/resolv.conf': Permission denied
The chroot setup script may be broken. Your chroot is not fully configured.
Removing the chroot setup script. You may want to update your chroot again.
/mnt/stateful_partition/crouton/chroots/xenial doesn't appear to be a valid chroot.
Unmounting /mnt/stateful_partition/crouton/chroots/xenial...

/mnt/stateful_partition/crouton/chroots/xenial/etc/resolv.conf also seems to be a broken symlink:

lrwxrwxrwx. 1 root root 27 Mar 24 12:57 /mnt/stateful_partition/crouton/chroots/xenial/etc/resolv.conf -> /var/host/shill/resolv.conf

(the filenames highlighted in red)

Thanks for any help 👍

EDIT: My CrOS version is Version 67.0.3376.0 (Official Build) canary (32-bit)

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 62 (6 by maintainers)

Commits related to this issue

Most upvoted comments

It works like a charm now! Thank you @dnschneid

  1. Download latest version of Crouton at https://goo.gl/fd3zc
  2. Open Shell
  3. sudo sh ~/Downloads/crouton -u -n name where name is the name of your chroot
  4. sudo enter-chroot name
  5. Enjoy!

Thanks everyone! Was quite worried when I saw this error today, as my chromebook is my main development machine (been running a Toshiba 2, the older model, for two years with crouton and a cli install of ubuntu). To reiterate what was stated above in this thread, my steps to fix were the following.

Note, this did NOT delete or reinstall my chroot! So no worries there folks about losing your data.

  • If you have the crouton executable in your Downloads folder still, open up a terminal, enter shell mode by typing shell and then run the following:

sudo sh ~/Downloads/crouton -u -n <your chroot 's name>

The -u flag updates crouton and your chroot, and the -n flag is the chroot you’d like to update. Crouton will download the latest version of the crouton script by itself, so no worries there.

  • If you do not have the crouton script on your system anymore for whatever reason, follow the link posted above https://goo.gl/fd3zc to get the script and then run the above command. This will update your chroot and things should be smooth sailing after that!

Thanks again everybody, I love this project and am very pleased the community is so supportive!

@rheinandco,

I answered your G+ post but I’ll do it here too and offer a few more suggestions.

  1. Reboot
  2. Run: sudo sh ~/Downloads/crouton -n xenial -u
  3. Try: sudo startxfce4

If that doesn’t work let us know here so we can help you further.

Hope this helps, -DennisLfromGA

Oooookay. Try again. I think I scraped all the failsauce off of the previous commit.

Updating my Elementary from shell did it for me, as suggested by @DennisLfromGA in https://github.com/dnschneid/crouton/issues/3695 👍

chronos@localhost / $ sudo sh ~/Downloads/crouton -n elementary -u

Seems to be working

thanks Jim

-=-

On Wed, Mar 28, 2018 at 12:54 AM, David Schneider notifications@github.com wrote:

@zareki https://github.com/zareki: sure, dev channel will always break several weeks before stable.

@cjzlol https://github.com/cjzlol: awesome, thanks for confirming.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dnschneid/crouton/issues/3695#issuecomment-376712966, or mute the thread https://github.com/notifications/unsubscribe-auth/AVk0vzWjGFCWbkFxfL-ORXki9atuA2egks5titEvgaJpZM4S50IJ .

it work after pushing a fix,thanks!!!

Just as a sanity check, could you please run: md5sum /usr/local/bin/mount-chroot

The output should be: d30c4c90b4057a3e6190c1b6c5a6ccdc /usr/local/bin/mount-chroot if you have the latest crouton.

as requested

chronos@localhost / $ sudo edit-chroot -all name: xenial encrypted: no Entering /mnt/stateful_partition/crouton/chroots/xenial... chroot: failed to run command '/usr/local/bin/croutonversion': Permission denied Unmounting /mnt/stateful_partition/crouton/chroots/xenial...

OK, pushed a fix. Please try out the latest crouton and see if things work on 67.