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)
It works like a charm now! Thank you @dnschneid
sudo sh ~/Downloads/crouton -u -n namewherenameis the name of your chrootsudo enter-chroot nameThanks 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.
shelland 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.
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.
sudo sh ~/Downloads/crouton -n xenial -usudo startxfce4If 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 -uSeems to be working
thanks Jim
-=-
On Wed, Mar 28, 2018 at 12:54 AM, David Schneider notifications@github.com wrote:
it work after pushing a fix,thanks!!!
Just as a sanity check, could you please run:
md5sum /usr/local/bin/mount-chrootThe output should be:
d30c4c90b4057a3e6190c1b6c5a6ccdc /usr/local/bin/mount-chrootif 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.