Skip to content
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

InRelease issues with debootstrap #2966

Closed
FranticAtheist opened this issue Dec 23, 2016 · 8 comments
Closed

InRelease issues with debootstrap #2966

FranticAtheist opened this issue Dec 23, 2016 · 8 comments
Labels

Comments

@FranticAtheist
Copy link

sudo: edit-chroot: command not found

Hi, I am a total noob so I most likely did something wrong or forgot something.

I have a chromebook acer 15. in the past I successfully installed a chroot and it worked fine.
I needed to delete the previous chroot.
now when I try to install a chroot with cruoton It has problems downloading ubuntu.

when I enter the command sudo sh ~/Downloads/crouton -t xfce in the shell I get this output:

Downloading latest crouton installer... ######################################################################## 100.0% Installing precise-amd64 chroot to /usr/local/chroots/precise Downloading latest debootstrap... Download from Debian gitweb failed. Trying latest release... 2016-12-23 02:06:51 URL:http://debian.grena.ge/debian/pool/main/d/debootstrap/ [6171/6171] -> "-" [1] Downloading debootstrap version 1.0.87... 2016-12-23 02:06:52 URL:http://debian.grena.ge/debian/pool/main/d/debootstrap/debootstrap_1.0.87.tar.gz [65875/65875] -> "-" [1] Patching debootstrap... Downloading bootstrap files... W: Cannot check Release signature; keyring file not available /usr/share/keyrings/ubuntu-archive-keyring.gpg I: Retrieving InRelease W: Retrying failed download of http://archive.ubuntu.com/ubuntu/dists/precise/InRelease I: Retrieving InRelease W: Retrying failed download of http://archive.ubuntu.com/ubuntu/dists/precise/InRelease I: Retrieving InRelease

I have downloaded the chouton several times with no change. also I took my pc out of develeper mode and back into develeper mode with no change.

thanks in advance to anyone how can help

@DennisLfromGA
Copy link
Collaborator

@FranticAtheist,

Just a suggestion, why not try a newer release like trusty or xenial?

Hope this helps,
-DennisL

@FranticAtheist
Copy link
Author

Get the same problem, that it can't down the distro.
What I don't understand is why is it looking for it in http://archive.ubuntu.com/ubuntu/dists/trusty/InRelease
Since it seems there is no such directory.

@octopusnz
Copy link

octopusnz commented Dec 25, 2016

@FranticAtheist Interesting one! I did some searching and found that there may be a problem with the InRelease files for these older Ubuntu releases.

I found this attempt to log the bug: https://bugs.launchpad.net/ubuntu/+bug/1623613
The author mentions both trusty and precise as exhibiting the issue.
It looks like they want issues logged following the process here:
https://wiki.ubuntu.com/Bugs/FindRightPackage#Ubuntu_mirror_issues

A suggestion:

If you haven't already can you try specifying xenial as the release?
it looks like that is behaving better via mirror sites in particular.

Using something like:

sudo sh ~/Downloads/crouton -r xenial -t xfce

I know you might not want a xenial chroot but at least that would confirm it's specific to the trusty and precise releases.

Also it looks like #2915 is the same or at least a similar issue.

@FranticAtheist
Copy link
Author

@octopusnz Thanks for the comment I tried xenial and it worked.
will see if there are any problems with xenial since it is not supported.

@octopusnz
Copy link

I emailed the good people at the Ubuntu mirrors team - who have politely reminded me that InRelease files were only added from xenial onwards so won't exist for precise/trusty.

See: https://bugs.launchpad.net/launchpad/+bug/1430011

And lots of useful information on the implementation here: http://www.chiark.greenend.org.uk/~cjwatson/blog/no-more-hash-sum-mismatch-errors.html

So - the question I have is, what is causing it to look for the InRelease file over and over and then stopping.
Might be:

a) debootstrap
b) crouton patches applied to debootstrap
c) something else (apt?)

I found this exciting piece of code in crouton/installer/ubuntu/bootstrap

# Patch debootstrap so that it retries downloading packages
echo 'Patching debootstrap...' 1>&2
if awk '
    t == 3 && /warning RETRY/ { print "sleep 1"; t=4 }
    t == 2 && /-z \"\$checksum\"/ { sub(/\$checksum/, "$checksum$failed"); t=3 }
    t == 1 { if (/if \[/) { sub(/if \[/, "elif ["); t=2 } else { exit 1 } }
    /if ! just_get \"\$from\" \"\$dest2\"; then continue 2; fi/ {
        sub(/if !/, "failed=; if !")
        sub(/continue 2; fi/, "failed=y")
        t=1
    }
    1
    END { if (t != 4) exit 1 }
        ' "$tmp/functions" > "$tmp/functions.new"; then
    mv -f "$tmp/functions.new" "$tmp/functions"
else
    rm -f "$tmp/functions.new"
    echo "Unable to patch debootstrap, moving on..." 1>&2
fi

Maybe it's getting fixated on the InRelease file - trying a few times and then giving up altogether.

I also found this bug here: https://bugs.launchpad.net/ubuntu/+source/debootstrap/+bug/1599459

Basically the yarn is, specifying the --debian-installer flag causes debootstrap to fail to fall back to also checking for a Release file. Not sure if that is applicable for crouton but perhaps some wisdom that might help.

@dnschneid
Copy link
Owner

Is this still an issue, or has this been fixed with updated debootstrap?

@dnschneid dnschneid changed the title can't install chroot on chromebook InRelease issues with debootstrap Mar 16, 2017
@octopusnz
Copy link

I think it may still be an issue but the majority of people that were posting about it here just migrated to xenial which has InRelease files, so all good.
I feel it may still hit people who try trusty.

The only possible reference to a bug I found in debootstrap itself was related to using the --debian-installer flag - do you know if any of the scripts in crouton invoke debootstrap using that?

I don't think that has been investigated by the debootstrap folks as yet so newer versions probably haven't resolved the issue.

@dnschneid
Copy link
Owner

Nope, we don't use that flag...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants