:: Re: [DNG] chroot sees wrong version…
Startseite
Nachricht löschen
Nachricht beantworten
Autor: Didier Kryn
Datum:  
To: dng
Betreff: Re: [DNG] chroot sees wrong version of libc
Le 27/04/2016 17:47, Haines Brown a écrit :
> A question I raised was left unanswered because the thread drifted into
> other issues. So let me repose the question in an appropriately named
> thread.
>
> I'm doing a cross install of devuan Alpha 4 onto a newly partitioned
> hard disk (/dev/sda1) in same box as my running Debian Wheezy system
> (/dev/sdb1). I partitioned, formatted and mounted the needed new disk's
> partitions; I downloaded debootstrap_1.0.75-1*.deb to a working
> directory in my current sytem; I unpacked the data tarball, Finally I
> ran the devuan debootstrap to install a base system on the target
> drive.
>
>    # debootstrap --no-check-gpg jessie /mnt/debinst   \
>              http://packages.devuan.org/merged

>
> Basically this went well, and in about 5-10 minutes I had the files for
> a basic devuan system on the target drive. However, some hiccups along
> the way:
>
>    W: Couldn't download package mount (ver 2.26.2-6+devuan arch i386)
>    ...
>    W: Couldn't download package coreutils (ver 8.23-r arch i386)
>    ...
>    W: Retrying failed download of
>       http://packages.devuan/org/merged/pool/DEBIAN/main/g/gnutls28/ \
>       libgnutls-deb0028_3.3.8-6+debv8ud_i386.deb
>    ...
>    W: Couldn't download package insserv (ver 1.14.0-5 qrch i386)
>    ...
>    I: Validating libpam-modules 1.1.8-3.1+deb8u1+b1
>    W: Retrying failed download of
>       http://packages.devuan.org/merged/pool/DEBIAN/main/p/ \
>       pam/libpam-modules_1.1.8-3.1+deb8u1+b1_i386.deb
>    ...
>    I: Retrieving startpar 0.59-3
>    W: Couldn't download package startpar (ver 0.59-3 arch i386)
>    ...
>    I: Retrieving udev 215-17+deb8u4
>    W: Couldn't download package udev (ver 215-17+deb8u4 arch i386)
>    I: Retrieving tar 1.27.1-2+b1
>    I: Validating tar 1.27.1-2+b1
>    W: Retrying failed download of
>       http://packages.devuan.org/merged/pool/DEBIAN/main/t/tar/ \
>       tar_1.27.1-2+b1_i386.deb
>    I: Retrieving tar 1.27.1-2+b1
>    ...
>    E: Couldn't download packages: mount coreutils insserv startpar udev

>
> Why were these five packages not found? They are obviously critical.
>
> When I go to https://packages.devuan.org/merged/, the pool directory is
> empty. A puzzle. But I suppose none of this is relevant to my effort
> next to chroot into the new system:
>
>    # LANG=C.UTF-8 chroot /mnt/debinst /bin/bash
>    /bin/bash: /lib/i386-linux-gnu/i686/cmov/libc.so.6: version
>             `GLIBC_2.15' not found (required by /bin/bash)
>    /bin/bash: /lib/i386-linux-gnu/i686/cmov/libc.so.6: version
>             `GLIBC_2.15' not found (required by
>          /lib/i386-linux-gnu/libncurses.so.5)
>    /bin/bash: /lib/i386-linux-gnu/i686/cmov/libc.so.6: version
>             `GLIBC_2.15' not found (required by
>          /lib/i386-linux-gnu/libtinfo.so.5)

>
> This seems to be a problem running chroot from my running machine and is
> irrelevant to the lean devuan target I just installed. If so, failure to
> download some packages is irrelevant to the chroot problem.
>
> I gather glibc is part of libc. So do these errors indicate that the
> libc version on my running machine is incompatible with its version of
> chroot? I do:
>
>    $ ldd /bin/bash
>    ...
>    libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xb7609000)

>
>    $ ldd /usr/sbin/chroot
>    ...
>    libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xb7643000)

>
> Haines Brown
>
> _


     I think you should use the --foreign option of debootstrap.


first 'debootstrap --no-check-gpg jessie /mnt/debinst'

then 'chroot /mnt/debinst debootstrap --second-stage'

Explanation: the installation of the packages must be done in the chroot, while downloading debootstrap can only be done in the old system. This is the same method which is used to debootstrap a different architecture.

     Didier