Version: 1.0.115

Hi everyone,

I’m appalled that this feature request is still open…

I’ve got a need to do this without patching debootstrap, and have had
success (although I did not time it, but someone else can ;-) with this
sequence of commands (assuming dpkg-deb is available ― which my script
checks earlier):

safe_PATH=/bin:/sbin:/usr/bin:/usr/sbin
# […]
case $TERM in
(Eterm|Eterm-color|ansi|cons25|cons25-debian|cygwin|dumb|hurd|linux|mach|mach-bold|mach-color|mach-gnu|mach-gnu-color|pcansi|rxvt|rxvt-basic|rxvt-m|rxvt-unicode|rxvt-unicode-256color|screen|screen-256color|screen-256color-bce|screen-bce|screen-s|screen-w|screen.xterm-256color|sun|vt100|vt102|vt220|vt52|wsvt25|wsvt25m|xterm|xterm-256color|xterm-color|xterm-debian|xterm-mono|xterm-r5|xterm-r6|xterm-vt220|xterm-xfree86)
        # list from ncurses-base (6.1+20181013-2+deb10u1)
        ;;
(screen.*|screen-*)
        # aliases possibly from ncurses-term
        TERM=screen ;;
(rxvt.*|rxvt-*)
        # let’s hope…
        TERM=rxvt ;;
(xterm.*|xterm-*)
        # …this works…
        TERM=xterm ;;
(linux.*)
        # …probably
        TERM=linux ;;
(*)
        die "Your terminal type '$TERM' is not supported by ncurses-base." \
            'Maybe run this script in GNU screen?' ;;
esac
# […]
eatmydata debootstrap --arch=arm64 --include=eatmydata --no-merged-usr \
    --force-check-gpg --verbose --foreign buster "$mpt" \
    http://deb.debian.org/debian sid
    # script specified here as it’s normally what buster symlinks to,
    # to achieve compatibility with more host distros
# we need this early
(
        set -e
        cd "$mpt"
        for archive in var/cache/apt/archives/*eatmydata*.deb; do
                dpkg-deb --fsys-tarfile "$archive" >a
                tar -xkf a
        done
        rm -f a
) || die 'failure extracting eatmydata early'
# the user can delete this later, from the booted system (or apt will)
cp /usr/bin/qemu-aarch64-static "$mpt/usr/bin/" || die 'cp failed'
echo >&2 'I: second stage bootstrap (under emulation), slooow…'
mount -t tmpfs swap "$mpt/dev/shm" || die 'mount /dev/shm failed'
mount -t proc  proc "$mpt/proc" || die 'mount /proc failed'
mount -t tmpfs swap "$mpt/tmp" || die 'mount /tmp failed'
chroot "$mpt" /usr/bin/env -i LC_ALL=C.UTF-8 HOME=/root PATH="$safe_PATH" \
    TERM="$TERM" /usr/bin/eatmydata /debootstrap/debootstrap --second-stage || \
    die 'debootstrap (second stage) failed'


Of course, “success” here means it does not error out… ☻ (also, as it’s
run under emulation it’s very slooow anyway…)

bye,
//mirabilos
-- 
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-235
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg

**********

Mit der tarent Academy bieten wir auch Trainings und Schulungen in den
Bereichen Softwareentwicklung, Agiles Arbeiten und Zukunftstechnologien an.

Besuchen Sie uns auf www.tarent.de/academy. Wir freuen uns auf Ihren Kontakt.

**********

Reply via email to