x86_64 chroot on Manjaro Arm + Install x86_64 *.deb + Install Wine & Windows apps

Dear All,

I would like to be able to install "sketchup" and "Draftsight" in Manjaro Arm, both are working in x86_64 Architecture. The first one have to use wine, while the other just a *.deb package.

In the first case (wine), I do not want to use pure QEMU. As the emulation will slow the performance. What I want is a mix of CHROOT and WINE x86_64. That's exactly what Eltech Exagear did with their apps.

In the second case (*.deb), I just want to chroot and install my x86_64 deb package inside it. So that I can use an x86_x64 apps inside Manjaro Arm.

After much reading, I have to install a Debian chroot to emulate the X86 architecture.

I try to follow this Tutorial:

However, I got error after running:
yay -S qemu-user-static schroot debootstrap

Here is the screen capture of the problem I meant:

Could someone please help me?

Here is my inxi -Fzxi

[rna@rna ~]$ inxi -Fzxi
System:
  Host: rna Kernel: 5.7.0-0.3-MANJARO-ARM aarch64 bits: 64 compiler: gcc 
  v: 9.2.0 Desktop: Xfce 4.14.2 Distro: Manjaro ARM 
Machine:
  Type: ARM Device System: Shenzhen Amediatech Technology Co., Ltd X96 Max 
  details: N/A 
CPU:
  Topology: Quad Core model: ARMv8 v8l variant: cortex-a53 bits: 64 
  type: MCP arch: v8l 
  features: Use -f option to see features bogomips: 0 
  Speed: 500 MHz min/max: 100/1800 MHz Core speeds (MHz): 1: 667 2: 667 
  3: 667 4: 667 
Graphics:
  Device-1: meson-g12a-mali driver: panfrost v: kernel bus ID: N/A 
  Device-2: meson-g12a-dw-hdmi driver: meson_dw_hdmi v: N/A bus ID: N/A 
  Display: x11 server: X.Org 1.20.8 driver: modesetting 
  resolution: 1920x1080~60Hz 
  OpenGL: renderer: llvmpipe (LLVM 10.0.0 128 bits) v: 3.3 Mesa 20.1.0 
  direct render: Yes 
Audio:
  Device-1: meson-g12a-dw-hdmi driver: meson_dw_hdmi bus ID: N/A 
  Device-2: axg-sound-card driver: axg_sound_card bus ID: N/A 
  Sound Server: ALSA v: k5.7.0-0.3-MANJARO-ARM 
Network:
  Device-1: meson-axg-dwmac driver: meson8b_dwmac v: N/A port: N/A 
  bus ID: N/A 
  IF: eth0 state: down mac: <filter> 
  Device-2: pwm-clock driver: pwm_clock v: N/A port: N/A bus ID: N/A 
  Device-3: Samsung GT-I9070 (network tethering USB debugging enabled) 
  type: USB driver: rndis_host bus ID: 1-2:5 
  IF: usb0 state: unknown speed: N/A duplex: N/A mac: <filter> 
  IP v4: <filter> type: dynamic noprefixroute scope: global 
  IP v6: <filter> type: noprefixroute scope: link 
  IF-ID-1: ip6tnl0 state: down mac: <filter> 
  WAN IP: <filter> 
Drives:
  Local Storage: total: 87.97 GiB used: 12.77 GiB (14.5%) 
  ID-1: /dev/mmcblk1 model: SC32G size: 29.72 GiB 
  ID-2: /dev/mmcblk2 model: 064G30 size: 58.24 GiB 
Partition:
  ID-1: / size: 28.96 GiB used: 12.72 GiB (43.9%) fs: ext4 
  dev: /dev/mmcblk1p2 
  ID-2: /boot size: 213.4 MiB used: 59.2 MiB (27.8%) fs: vfat 
  dev: /dev/mmcblk1p1 
Sensors:
  Message: No sensors data was found. Is sensors configured? 
Info:
  Processes: 204 Uptime: 30m Memory: 3.54 GiB used: 1.28 GiB (36.2%) 
  Init: systemd Compilers: gcc: N/A Shell: bash v: 5.0.17 inxi: 3.0.37 

Many Thanks,
rna

I don't think this is even remotely possible.

  1. Wine do not support arm architecture
  2. Read number one again - then think Manjaro is not Debian
  3. In case you reach this point - do you really want to complicate your life?
  4. Read up on using QEMU.

Please post such errors as text and not as a screenshot. Specially not a screenshot with a lot of nothing and a little bit of text.

Please read up on the AUR

https://wiki.manjaro.org/index.php?title=AUR#Installing_from_the_AUR_by_hand

https://wiki.archlinux.org/index.php/Arch_User_Repository#Prerequisites

After that install the mentioned package to be able to compile packages.

[rna@rna ~]$ yay -S qemu-user-static schroot debootstrap
[sudo] password for rna: 
warning: schroot-1.6.10-24 is up to date -- reinstalling
warning: debootstrap-1.0.123-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (2) debootstrap-1.0.123-1  schroot-1.6.10-24

Total Installed Size:  17.41 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] yyyyyy
Error installing repo packages
[rna@rna ~]$ yay -S qemu-user-static schroot debootstrap
warning: schroot-1.6.10-24 is up to date -- reinstalling
warning: debootstrap-1.0.123-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (2) debootstrap-1.0.123-1  schroot-1.6.10-24

Total Installed Size:  17.41 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] y
(2/2) checking keys in keyring                     [######################] 100%
(2/2) checking package integrity                   [######################] 100%
(2/2) loading package files                        [######################] 100%
(2/2) checking for file conflicts                  [######################] 100%
(2/2) checking available disk space                [######################] 100%
:: Processing package changes...
(1/2) reinstalling schroot                         [######################] 100%
(2/2) reinstalling debootstrap                     [######################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
:: There are 2 providers available for qemu-user-static:
:: Repository AUR
    1) qemu-user-static 2) qemu-user-static-bin 

Enter a number (default=1): 1
:: Checking for conflicts...
:: Checking for inner conflicts...
[Aur: 1]  qemu-user-static-5.0.0-1
[Aur Make: 2]  glib2-static-2.64.3-1  pcre-static-8.44-4

==> Remove make dependencies after install? [y/N] y
  3 glib2-static                             (Build Files Exist)
  2 pcre-static                              (Build Files Exist)
  1 qemu-user-static                         (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> n
:: PKGBUILD up to date, Skipping (1/3): qemu-user-static
:: PKGBUILD up to date, Skipping (2/3): glib2-static
:: PKGBUILD up to date, Skipping (3/3): pcre-static
  3 glib2-static                             (Build Files Exist)
  2 pcre-static                              (Build Files Exist)
  1 qemu-user-static                         (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> n
:: Parsing SRCINFO (1/3): glib2-static
:: Parsing SRCINFO (2/3): pcre-static
:: Parsing SRCINFO (3/3): qemu-user-static

==> The following packages are not compatible with your architecture:  glib2-static  pcre-static  qemu-user-static
==> Try to build them anyway? [Y/n] y
==> Making package: glib2-static 2.64.3-1 (Sat 27 Jun 2020 11:50:21 PM WIB)
==> Retrieving sources...
  -> Found glib-2.64.3.tar.xz
  -> Found MR1405.patch
  -> Found MR1414.patch
==> Validating source files with sha256sums...
    glib-2.64.3.tar.xz ... Passed
    MR1405.patch ... Passed
    MR1414.patch ... Passed
==> Making package: pcre-static 8.44-4 (Sat 27 Jun 2020 11:50:30 PM WIB)
==> Retrieving sources...
  -> Found pcre-8.44.tar.bz2
==> Validating source files with sha256sums...
    pcre-8.44.tar.bz2 ... Passed
==> Making package: qemu-user-static 5.0.0-1 (Sat 27 Jun 2020 11:50:34 PM WIB)
==> Retrieving sources...
  -> Found qemu-5.0.0.tar.xz
  -> Found qemu-5.0.0.tar.xz.sig
==> Validating source files with sha512sums...
    qemu-5.0.0.tar.xz ... Passed
    qemu-5.0.0.tar.xz.sig ... Skipped
==> Verifying source file signatures with gpg...
    qemu-5.0.0.tar.xz ... Passed
==> Making package: glib2-static 2.64.3-1 (Sat 27 Jun 2020 11:50:41 PM WIB)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found glib-2.64.3.tar.xz
  -> Found MR1405.patch
  -> Found MR1414.patch
==> Validating source files with sha256sums...
    glib-2.64.3.tar.xz ... Passed
    MR1405.patch ... Passed
    MR1414.patch ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting glib-2.64.3.tar.xz with bsdtar
==> Starting prepare()...
/home/rna/.cache/yay/glib2-static/PKGBUILD: line 24: patch: command not found
==> ERROR: A failure occurred in prepare().
    Aborting...
error: target not found: glib2-static
error: target not found: pcre-static

From the error you don't have installed the base-devel group

sudo pacman -Syyu base-devel --needed


@rna I follow Danct12 on twitter they have made some interesting thing on arm in general


OP would like to use an x86 chroot

Said that performance will be misarable I guess

1 Like

I am trying to use QEMU, but I don't want pure QEMU. I need a mix of QEMU and chroot. Something that is fast like ELTECH EXAGEAR.

I also follow this tutorial in armbian, however my kernel does not support binfmt, therefore I tried to use Manjaro Arm that support the binfmt, I used this command:

zcat /proc/config.gz | grep BINFMT_MISC

this works like a charm.

I am compiling rightnow, will let you know the result

Really? thanks for the info. Maybe I could find more about what I need.

Look at

https://twitter.com/RealDanct12

and

https://twitter.com/DanctNIX

At glance, the page looks promising. Most of them are mobile, which is what I am looking for.
Actually I want to change my older ipad 3 into a linux machine. I know I can easily use UTM which is based on QEMU in ios 11 or higher. however, my device is using ios 9, therefore I cannot manage to install UTM inside it.

Actually I plan to recompile the UTM from github for lower ios version. But I don't know how to do that?

Knowing this page maybe a key to what I am looking for.

Many Thanks

Here's my update:

[rna@rna ~]$ yay -S qemu-user-static schroot debootstrap
[sudo] password for rna: 
warning: schroot-1.6.10-24 is up to date -- reinstalling
warning: debootstrap-1.0.123-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (2) debootstrap-1.0.123-1  schroot-1.6.10-24

Total Installed Size:  17.41 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] y
(2/2) checking keys in keyring                     [######################] 100%
(2/2) checking package integrity                   [######################] 100%
(2/2) loading package files                        [######################] 100%
(2/2) checking for file conflicts                  [######################] 100%
(2/2) checking available disk space                [######################] 100%
:: Processing package changes...
(1/2) reinstalling schroot                         [######################] 100%
(2/2) reinstalling debootstrap                     [######################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
:: There are 2 providers available for qemu-user-static:
:: Repository AUR
    1) qemu-user-static 2) qemu-user-static-bin 

Enter a number (default=1): 
:: Checking for conflicts...
:: Checking for inner conflicts...
[Aur: 1]  qemu-user-static-5.0.0-1

  1 qemu-user-static                         (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> n
:: PKGBUILD up to date, Skipping (1/1): qemu-user-static
  1 qemu-user-static                         (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> n
:: Parsing SRCINFO (1/1): qemu-user-static

==> The following packages are not compatible with your architecture:  qemu-user-static
==> Try to build them anyway? [Y/n] y
==> Making package: qemu-user-static 5.0.0-1 (Sun 28 Jun 2020 07:14:48 AM WIB)
==> Retrieving sources...
  -> Found qemu-5.0.0.tar.xz
  -> Found qemu-5.0.0.tar.xz.sig
==> Validating source files with sha512sums...
    qemu-5.0.0.tar.xz ... Passed
    qemu-5.0.0.tar.xz.sig ... Skipped
==> Verifying source file signatures with gpg...
    qemu-5.0.0.tar.xz ... Passed
==> Making package: qemu-user-static 5.0.0-1 (Sun 28 Jun 2020 07:14:56 AM WIB)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found qemu-5.0.0.tar.xz
  -> Found qemu-5.0.0.tar.xz.sig
==> Validating source files with sha512sums...
    qemu-5.0.0.tar.xz ... Passed
    qemu-5.0.0.tar.xz.sig ... Skipped
==> Verifying source file signatures with gpg...
    qemu-5.0.0.tar.xz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting qemu-5.0.0.tar.xz with bsdtar
==> Starting prepare()...
==> Sources are ready.
==> Making package: qemu-user-static 5.0.0-1 (Sun 28 Jun 2020 07:16:12 AM WIB)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Sources are ready.
==> qemu-user-static-5.0.0-1 already made -- skipping build
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (1) qemu-user-static-5.0.0-1

Total Installed Size:  122.77 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                     [######################] 100%
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
(1/1) checking available disk space                [######################] 100%
:: Processing package changes...
(1/1) installing qemu-user-static                  [######################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
[rna@rna ~]$ 

Then:

[rna@rna ~]$ sudo mkdir -p /srv/chroot/debian-x86
[sudo] password for rna: 
[rna@rna ~]$ sudo debootstrap --arch i386 --foreign stretch /srv/chroot/debian-x86 http://debian.xtdv.net/debian
W: Cannot check Release signature; keyring file not available /usr/share/keyrings/debian-archive-keyring.gpg
I: Retrieving InRelease 
I: Retrieving Release 
I: Retrieving Packages 
I: Validating Packages 
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Checking component main on http://debian.xtdv.net/debian...
I: Retrieving libacl1 2.2.52-3+b1
I: Validating libacl1 2.2.52-3+b1
I: Retrieving adduser 3.115
I: Validating adduser 3.115
I: Retrieving libapparmor1 2.11.0-3+deb9u2
I: Validating libapparmor1 2.11.0-3+deb9u2
I: Retrieving apt 1.4.9
I: Validating apt 1.4.9
I: Retrieving apt-utils 1.4.9
I: Validating apt-utils 1.4.9
I: Retrieving libapt-inst2.0 1.4.9
I: Validating libapt-inst2.0 1.4.9
I: Retrieving libapt-pkg5.0 1.4.9
I: Validating libapt-pkg5.0 1.4.9
I: Retrieving libattr1 1:2.4.47-2+b2
I: Validating libattr1 1:2.4.47-2+b2
I: Retrieving libaudit-common 1:2.6.7-2
I: Validating libaudit-common 1:2.6.7-2
I: Retrieving libaudit1 1:2.6.7-2
I: Validating libaudit1 1:2.6.7-2
I: Retrieving base-files 9.9+deb9u12
I: Validating base-files 9.9+deb9u12
I: Retrieving base-passwd 3.5.43
I: Validating base-passwd 3.5.43
I: Retrieving bash 4.4-5
I: Validating bash 4.4-5
I: Retrieving libdns-export162 1:9.10.3.dfsg.P4-12.3+deb9u5
I: Validating libdns-export162 1:9.10.3.dfsg.P4-12.3+deb9u5
I: Retrieving libisc-export160 1:9.10.3.dfsg.P4-12.3+deb9u5
I: Validating libisc-export160 1:9.10.3.dfsg.P4-12.3+deb9u5
I: Retrieving bsdmainutils 9.0.12+nmu1
I: Validating bsdmainutils 9.0.12+nmu1
I: Retrieving libbz2-1.0 1.0.6-8.1
I: Validating libbz2-1.0 1.0.6-8.1
I: Retrieving libdebconfclient0 0.227
I: Validating libdebconfclient0 0.227
I: Retrieving coreutils 8.26-3
I: Validating coreutils 8.26-3
I: Retrieving cpio 2.11+dfsg-6
I: Validating cpio 2.11+dfsg-6
I: Retrieving cron 3.0pl1-128+deb9u1
I: Validating cron 3.0pl1-128+deb9u1
I: Retrieving libcryptsetup4 2:1.7.3-4
I: Validating libcryptsetup4 2:1.7.3-4
I: Retrieving dash 0.5.8-2.4
I: Validating dash 0.5.8-2.4
I: Retrieving libdb5.3 5.3.28-12+deb9u1
I: Validating libdb5.3 5.3.28-12+deb9u1
I: Retrieving debconf 1.5.61
I: Validating debconf 1.5.61
I: Retrieving debconf-i18n 1.5.61
I: Validating debconf-i18n 1.5.61
I: Retrieving debian-archive-keyring 2017.5+deb9u1
I: Validating debian-archive-keyring 2017.5+deb9u1
I: Retrieving debianutils 4.8.1.1
I: Validating debianutils 4.8.1.1
I: Retrieving diffutils 1:3.5-3
I: Validating diffutils 1:3.5-3
I: Retrieving dmidecode 3.0-4
I: Validating dmidecode 3.0-4
I: Retrieving dpkg 1.18.25
I: Validating dpkg 1.18.25
I: Retrieving e2fslibs 1.43.4-2+deb9u1
I: Validating e2fslibs 1.43.4-2+deb9u1
I: Retrieving e2fsprogs 1.43.4-2+deb9u1
I: Validating e2fsprogs 1.43.4-2+deb9u1
I: Retrieving libcomerr2 1.43.4-2+deb9u1
I: Validating libcomerr2 1.43.4-2+deb9u1
I: Retrieving libss2 1.43.4-2+deb9u1
I: Validating libss2 1.43.4-2+deb9u1
I: Retrieving libelf1 0.168-1
I: Validating libelf1 0.168-1
I: Retrieving findutils 4.6.0+git+20161106-2
I: Validating findutils 4.6.0+git+20161106-2
I: Retrieving gcc-6-base 6.3.0-18+deb9u1
I: Validating gcc-6-base 6.3.0-18+deb9u1
I: Retrieving libgcc1 1:6.3.0-18+deb9u1
I: Validating libgcc1 1:6.3.0-18+deb9u1
I: Retrieving libstdc++6 6.3.0-18+deb9u1
I: Validating libstdc++6 6.3.0-18+deb9u1
I: Retrieving libgdbm3 1.8.3-14
I: Validating libgdbm3 1.8.3-14
I: Retrieving libc-bin 2.24-11+deb9u4
I: Validating libc-bin 2.24-11+deb9u4
I: Retrieving libc6 2.24-11+deb9u4
I: Validating libc6 2.24-11+deb9u4
I: Retrieving multiarch-support 2.24-11+deb9u4
I: Validating multiarch-support 2.24-11+deb9u4
I: Retrieving libgmp10 2:6.1.2+dfsg-1
I: Validating libgmp10 2:6.1.2+dfsg-1
I: Retrieving gnupg 2.1.18-8~deb9u4
I: Validating gnupg 2.1.18-8~deb9u4
I: Retrieving gnupg-agent 2.1.18-8~deb9u4
I: Validating gnupg-agent 2.1.18-8~deb9u4
I: Retrieving gpgv 2.1.18-8~deb9u4
I: Validating gpgv 2.1.18-8~deb9u4
I: Retrieving libgnutls30 3.5.8-5+deb9u4
I: Validating libgnutls30 3.5.8-5+deb9u4
I: Retrieving grep 2.27-2
I: Validating grep 2.27-2
I: Retrieving gzip 1.6-5+b1
I: Validating gzip 1.6-5+b1
I: Retrieving hostname 3.18+b1
I: Validating hostname 3.18+b1
I: Retrieving ifupdown 0.8.19
I: Validating ifupdown 0.8.19
I: Retrieving init 1.48
I: Validating init 1.48
I: Retrieving init-system-helpers 1.48
I: Validating init-system-helpers 1.48
I: Retrieving iproute2 4.9.0-1+deb9u1
I: Validating iproute2 4.9.0-1+deb9u1
I: Retrieving iptables 1.6.0+snapshot20161117-6
I: Validating iptables 1.6.0+snapshot20161117-6
I: Retrieving libip4tc0 1.6.0+snapshot20161117-6
I: Validating libip4tc0 1.6.0+snapshot20161117-6
I: Retrieving libip6tc0 1.6.0+snapshot20161117-6
I: Validating libip6tc0 1.6.0+snapshot20161117-6
I: Retrieving libiptc0 1.6.0+snapshot20161117-6
I: Validating libiptc0 1.6.0+snapshot20161117-6
I: Retrieving libxtables12 1.6.0+snapshot20161117-6
I: Validating libxtables12 1.6.0+snapshot20161117-6
I: Retrieving iputils-ping 3:20161105-1
I: Validating iputils-ping 3:20161105-1
I: Retrieving isc-dhcp-client 4.3.5-3+deb9u1
I: Validating isc-dhcp-client 4.3.5-3+deb9u1
I: Retrieving isc-dhcp-common 4.3.5-3+deb9u1
I: Validating isc-dhcp-common 4.3.5-3+deb9u1
I: Retrieving kmod 23-2
I: Validating kmod 23-2
I: Retrieving libkmod2 23-2
I: Validating libkmod2 23-2
I: Retrieving libassuan0 2.4.3-2
I: Validating libassuan0 2.4.3-2
I: Retrieving libbsd0 0.8.3-1
I: Validating libbsd0 0.8.3-1
I: Retrieving libcap-ng0 0.7.7-3+b1
I: Validating libcap-ng0 0.7.7-3+b1
I: Retrieving libcap2 1:2.25-1
I: Validating libcap2 1:2.25-1
I: Retrieving libestr0 0.1.10-2
I: Validating libestr0 0.1.10-2
I: Retrieving libfastjson4 0.99.4-1
I: Validating libfastjson4 0.99.4-1
I: Retrieving libffi6 3.2.1-6
I: Validating libffi6 3.2.1-6
I: Retrieving libgcrypt20 1.7.6-2+deb9u3
I: Validating libgcrypt20 1.7.6-2+deb9u3
I: Retrieving libgpg-error0 1.26-2
I: Validating libgpg-error0 1.26-2
I: Retrieving libidn11 1.33-1+deb9u1
I: Validating libidn11 1.33-1+deb9u1
I: Retrieving libidn2-0 0.16-1+deb9u1
I: Validating libidn2-0 0.16-1+deb9u1
I: Retrieving libksba8 1.3.5-2
I: Validating libksba8 1.3.5-2
I: Retrieving liblocale-gettext-perl 1.07-3+b1
I: Validating liblocale-gettext-perl 1.07-3+b1
I: Retrieving liblogging-stdlog0 1.0.5-2+b2
I: Validating liblogging-stdlog0 1.0.5-2+b2
I: Retrieving liblognorm5 2.0.1-1.1+b1
I: Validating liblognorm5 2.0.1-1.1+b1
I: Retrieving libmnl0 1.0.4-2
I: Validating libmnl0 1.0.4-2
I: Retrieving libnetfilter-conntrack3 1.0.6-2
I: Validating libnetfilter-conntrack3 1.0.6-2
I: Retrieving libnfnetlink0 1.0.1-3
I: Validating libnfnetlink0 1.0.1-3
I: Retrieving libpipeline1 1.4.1-2
I: Validating libpipeline1 1.4.1-2
I: Retrieving libpsl5 0.17.0-3
I: Validating libpsl5 0.17.0-3
I: Retrieving libseccomp2 2.3.1-2.1+deb9u1
I: Validating libseccomp2 2.3.1-2.1+deb9u1
I: Retrieving libselinux1 2.6-3+b3
I: Validating libselinux1 2.6-3+b3
I: Retrieving libsemanage-common 2.6-2
I: Validating libsemanage-common 2.6-2
I: Retrieving libsemanage1 2.6-2
I: Validating libsemanage1 2.6-2
I: Retrieving libsepol1 2.6-2
I: Validating libsepol1 2.6-2
I: Retrieving libtasn1-6 4.10-1.1+deb9u1
I: Validating libtasn1-6 4.10-1.1+deb9u1
I: Retrieving libtext-charwidth-perl 0.04-7+b5
I: Validating libtext-charwidth-perl 0.04-7+b5
I: Retrieving libtext-iconv-perl 1.7-5+b4
I: Validating libtext-iconv-perl 1.7-5+b4
I: Retrieving libtext-wrapi18n-perl 0.06-7.1
I: Validating libtext-wrapi18n-perl 0.06-7.1
I: Retrieving libunistring0 0.9.6+really0.9.3-0.1
I: Validating libunistring0 0.9.6+really0.9.3-0.1
I: Retrieving logrotate 3.11.0-0.1
I: Validating logrotate 3.11.0-0.1
I: Retrieving lsb-base 9.20161125
I: Validating lsb-base 9.20161125
I: Retrieving dmsetup 2:1.02.137-2
I: Validating dmsetup 2:1.02.137-2
I: Retrieving libdevmapper1.02.1 2:1.02.137-2
I: Validating libdevmapper1.02.1 2:1.02.137-2
I: Retrieving liblz4-1 0.0~r131-2+b1
I: Validating liblz4-1 0.0~r131-2+b1
I: Retrieving mawk 1.3.3-17+b3
I: Validating mawk 1.3.3-17+b3
I: Retrieving nano 2.7.4-1
I: Validating nano 2.7.4-1
I: Retrieving libncurses5 6.0+20161126-1+deb9u2
I: Validating libncurses5 6.0+20161126-1+deb9u2
I: Retrieving libncursesw5 6.0+20161126-1+deb9u2
I: Validating libncursesw5 6.0+20161126-1+deb9u2
I: Retrieving libtinfo5 6.0+20161126-1+deb9u2
I: Validating libtinfo5 6.0+20161126-1+deb9u2
I: Retrieving ncurses-base 6.0+20161126-1+deb9u2
I: Validating ncurses-base 6.0+20161126-1+deb9u2
I: Retrieving ncurses-bin 6.0+20161126-1+deb9u2
I: Validating ncurses-bin 6.0+20161126-1+deb9u2
I: Retrieving netbase 5.4
I: Validating netbase 5.4
I: Retrieving libhogweed4 3.3-1+b2
I: Validating libhogweed4 3.3-1+b2
I: Retrieving libnettle6 3.3-1+b2
I: Validating libnettle6 3.3-1+b2
I: Retrieving libnewt0.52 0.52.19-1+b1
I: Validating libnewt0.52 0.52.19-1+b1
I: Retrieving whiptail 0.52.19-1+b1
I: Validating whiptail 0.52.19-1+b1
I: Retrieving libnpth0 1.3-1
I: Validating libnpth0 1.3-1
I: Retrieving libssl1.1 1.1.0l-1~deb9u1
I: Validating libssl1.1 1.1.0l-1~deb9u1
I: Retrieving libssl1.0.2 1.0.2u-1~deb9u1
I: Validating libssl1.0.2 1.0.2u-1~deb9u1
I: Retrieving libp11-kit0 0.23.3-2
I: Validating libp11-kit0 0.23.3-2
I: Retrieving libpam-modules 1.1.8-3.6
I: Validating libpam-modules 1.1.8-3.6
I: Retrieving libpam-modules-bin 1.1.8-3.6
I: Validating libpam-modules-bin 1.1.8-3.6
I: Retrieving libpam-runtime 1.1.8-3.6
I: Validating libpam-runtime 1.1.8-3.6
I: Retrieving libpam0g 1.1.8-3.6
I: Validating libpam0g 1.1.8-3.6
I: Retrieving libpcre3 2:8.39-3
I: Validating libpcre3 2:8.39-3
I: Retrieving perl-base 5.24.1-3+deb9u6
I: Validating perl-base 5.24.1-3+deb9u6
I: Retrieving pinentry-curses 1.0.0-2
I: Validating pinentry-curses 1.0.0-2
I: Retrieving libpopt0 1.16-10+b2
I: Validating libpopt0 1.16-10+b2
I: Retrieving libprocps6 2:3.3.12-3+deb9u1
I: Validating libprocps6 2:3.3.12-3+deb9u1
I: Retrieving procps 2:3.3.12-3+deb9u1
I: Validating procps 2:3.3.12-3+deb9u1
I: Retrieving libreadline7 7.0-3
I: Validating libreadline7 7.0-3
I: Retrieving readline-common 7.0-3
I: Validating readline-common 7.0-3
I: Retrieving rsyslog 8.24.0-1
I: Validating rsyslog 8.24.0-1
I: Retrieving sed 4.4-1
I: Validating sed 4.4-1
I: Retrieving sensible-utils 0.0.9+deb9u1
I: Validating sensible-utils 0.0.9+deb9u1
I: Retrieving login 1:4.4-4.1
I: Validating login 1:4.4-4.1
I: Retrieving passwd 1:4.4-4.1
I: Validating passwd 1:4.4-4.1
I: Retrieving libslang2 2.3.1-5
I: Validating libslang2 2.3.1-5
I: Retrieving libsqlite3-0 3.16.2-5+deb9u1
I: Validating libsqlite3-0 3.16.2-5+deb9u1
I: Retrieving libsystemd0 232-25+deb9u12
I: Validating libsystemd0 232-25+deb9u12
I: Retrieving libudev1 232-25+deb9u12
I: Validating libudev1 232-25+deb9u12
I: Retrieving systemd 232-25+deb9u12
I: Validating systemd 232-25+deb9u12
I: Retrieving systemd-sysv 232-25+deb9u12
I: Validating systemd-sysv 232-25+deb9u12
I: Retrieving udev 232-25+deb9u12
I: Validating udev 232-25+deb9u12
I: Retrieving sysvinit-utils 2.88dsf-59.9
I: Validating sysvinit-utils 2.88dsf-59.9
I: Retrieving tar 1.29b-1.1
I: Validating tar 1.29b-1.1
I: Retrieving tasksel 3.39
I: Validating tasksel 3.39
I: Retrieving tasksel-data 3.39
I: Validating tasksel-data 3.39
I: Retrieving tzdata 2019c-0+deb9u1
I: Validating tzdata 2019c-0+deb9u1
I: Retrieving libustr-1.0-1 1.0.4-6
I: Validating libustr-1.0-1 1.0.4-6
I: Retrieving bsdutils 1:2.29.2-1+deb9u1
I: Validating bsdutils 1:2.29.2-1+deb9u1
I: Retrieving libblkid1 2.29.2-1+deb9u1
I: Validating libblkid1 2.29.2-1+deb9u1
I: Retrieving libfdisk1 2.29.2-1+deb9u1
I: Validating libfdisk1 2.29.2-1+deb9u1
I: Retrieving libmount1 2.29.2-1+deb9u1
I: Validating libmount1 2.29.2-1+deb9u1
I: Retrieving libsmartcols1 2.29.2-1+deb9u1
I: Validating libsmartcols1 2.29.2-1+deb9u1
I: Retrieving libuuid1 2.29.2-1+deb9u1
I: Validating libuuid1 2.29.2-1+deb9u1
I: Retrieving mount 2.29.2-1+deb9u1
I: Validating mount 2.29.2-1+deb9u1
I: Retrieving util-linux 2.29.2-1+deb9u1
I: Validating util-linux 2.29.2-1+deb9u1
I: Retrieving vim-common 2:8.0.0197-4+deb9u3
I: Validating vim-common 2:8.0.0197-4+deb9u3
I: Retrieving vim-tiny 2:8.0.0197-4+deb9u3
I: Validating vim-tiny 2:8.0.0197-4+deb9u3
I: Retrieving xxd 2:8.0.0197-4+deb9u3
I: Validating xxd 2:8.0.0197-4+deb9u3
I: Retrieving wget 1.18-5+deb9u3
I: Validating wget 1.18-5+deb9u3
I: Retrieving libxapian30 1.4.3-2+deb9u3
I: Validating libxapian30 1.4.3-2+deb9u3
I: Retrieving liblzma5 5.2.2-1.2+b1
I: Validating liblzma5 5.2.2-1.2+b1
I: Retrieving zlib1g 1:1.2.8.dfsg-5
I: Validating zlib1g 1:1.2.8.dfsg-5
I: Chosen extractor for .deb packages: dpkg-deb
I: Extracting libacl1...
I: Extracting libattr1...
I: Extracting libaudit-common...
I: Extracting libaudit1...
I: Extracting base-files...
I: Extracting base-passwd...
I: Extracting bash...
I: Extracting libbz2-1.0...
I: Extracting libdebconfclient0...
I: Extracting coreutils...
I: Extracting dash...
I: Extracting libdb5.3...
I: Extracting debconf...
I: Extracting debianutils...
I: Extracting diffutils...
I: Extracting dpkg...
I: Extracting e2fslibs...
I: Extracting e2fsprogs...
I: Extracting libcomerr2...
I: Extracting libss2...
I: Extracting findutils...
I: Extracting gcc-6-base...
I: Extracting libgcc1...
I: Extracting libc-bin...
I: Extracting libc6...
I: Extracting multiarch-support...
I: Extracting grep...
I: Extracting gzip...
I: Extracting hostname...
I: Extracting init-system-helpers...
I: Extracting libcap-ng0...
I: Extracting libgcrypt20...
I: Extracting libgpg-error0...
I: Extracting libselinux1...
I: Extracting libsemanage-common...
I: Extracting libsemanage1...
I: Extracting libsepol1...
I: Extracting lsb-base...
I: Extracting liblz4-1...
I: Extracting mawk...
I: Extracting libncursesw5...
I: Extracting libtinfo5...
I: Extracting ncurses-base...
I: Extracting ncurses-bin...
I: Extracting libpam-modules...
I: Extracting libpam-modules-bin...
I: Extracting libpam-runtime...
I: Extracting libpam0g...
I: Extracting libpcre3...
I: Extracting perl-base...
I: Extracting sed...
I: Extracting sensible-utils...
I: Extracting login...
I: Extracting passwd...
I: Extracting libsystemd0...
I: Extracting libudev1...
I: Extracting sysvinit-utils...
I: Extracting tar...
I: Extracting tzdata...
I: Extracting libustr-1.0-1...
I: Extracting bsdutils...
I: Extracting libblkid1...
I: Extracting libfdisk1...
I: Extracting libmount1...
I: Extracting libsmartcols1...
I: Extracting libuuid1...
I: Extracting mount...
I: Extracting util-linux...
I: Extracting liblzma5...
I: Extracting zlib1g...
[rna@rna ~]$ sudo cp /usr/bin/qemu-i386-static /srv/chroot/debian-x86/usr/bin
[rna@rna ~]$ sudo chroot "/srv/chroot/debian-x86" /debootstrap/debootstrap --second-stage
chroot: failed to run command ‘/debootstrap/debootstrap’: Exec format error
[rna@rna ~]$

Now I am stuck in the debootstrap second stage

Thanks for your help

This means you tried to run a binary that is not build for your processor. Like running a x86 binary on a ARM processor.

How did you set up binfmt? This is not mentioned in the blog post you linked. But it is the most important thing to do. Otherwise it can't work.

Please post

/usr/lib/systemd/systemd-binfmt --cat-config

and

systemctl status systemd-binfmt

Here is the result:

[rna@rna ~]$ /usr/lib/systemd/systemd-binfmt --cat-config
# /usr/lib/binfmt.d/mono.conf
:CLR:M::MZ::/usr/bin/mono:
[rna@rna ~]$ systemctl status systemd-binfmt
● systemd-binfmt.service - Set Up Additional Binary Formats
     Loaded: loaded (/usr/lib/systemd/system/systemd-binfmt.service; static; ve>
     Active: active (exited) since Fri 2020-06-12 02:30:07 WIB; 2 weeks 2 days >
       Docs: man:systemd-binfmt.service(8)
             man:binfmt.d(5)
             https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.html
             https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
    Process: 419 ExecStart=/usr/lib/systemd/systemd-binfmt (code=exited, status>
   Main PID: 419 (code=exited, status=0/SUCCESS)

Warning: journal has been rotated since unit was started, output may be incompl>
lines 1-11/11 (END)

It looks like you don't have a config for qemu. You need to create one.

You can use this script to create one.

You should place the config files in /etc/binfmt.d/ . After that restart the service or reboot.

1 Like

I have run this script, but I don't know where to find the config file that you mentioned?

[rna@rna ~]$ sudo sh '/home/rna/Downloads/qemu-binfmt-conf.sh' 
Setting /usr/local/bin/qemu-i386 as binfmt interpreter for i386
Setting /usr/local/bin/qemu-i386 as binfmt interpreter for i486
Setting /usr/local/bin/qemu-alpha as binfmt interpreter for alpha
Setting /usr/local/bin/qemu-armeb as binfmt interpreter for armeb
Setting /usr/local/bin/qemu-sparc as binfmt interpreter for sparc
Setting /usr/local/bin/qemu-sparc32plus as binfmt interpreter for sparc32plus
Setting /usr/local/bin/qemu-sparc64 as binfmt interpreter for sparc64
Setting /usr/local/bin/qemu-ppc as binfmt interpreter for ppc
Setting /usr/local/bin/qemu-ppc64 as binfmt interpreter for ppc64
Setting /usr/local/bin/qemu-ppc64le as binfmt interpreter for ppc64le
Setting /usr/local/bin/qemu-m68k as binfmt interpreter for m68k
Setting /usr/local/bin/qemu-mips as binfmt interpreter for mips
Setting /usr/local/bin/qemu-mipsel as binfmt interpreter for mipsel
Setting /usr/local/bin/qemu-mipsn32 as binfmt interpreter for mipsn32
Setting /usr/local/bin/qemu-mipsn32el as binfmt interpreter for mipsn32el
Setting /usr/local/bin/qemu-mips64 as binfmt interpreter for mips64
Setting /usr/local/bin/qemu-mips64el as binfmt interpreter for mips64el
Setting /usr/local/bin/qemu-sh4 as binfmt interpreter for sh4
Setting /usr/local/bin/qemu-sh4eb as binfmt interpreter for sh4eb
Setting /usr/local/bin/qemu-s390x as binfmt interpreter for s390x
Setting /usr/local/bin/qemu-aarch64_be as binfmt interpreter for aarch64_be
Setting /usr/local/bin/qemu-hppa as binfmt interpreter for hppa
Setting /usr/local/bin/qemu-riscv32 as binfmt interpreter for riscv32
Setting /usr/local/bin/qemu-riscv64 as binfmt interpreter for riscv64
Setting /usr/local/bin/qemu-xtensa as binfmt interpreter for xtensa
Setting /usr/local/bin/qemu-xtensaeb as binfmt interpreter for xtensaeb
Setting /usr/local/bin/qemu-microblaze as binfmt interpreter for microblaze
Setting /usr/local/bin/qemu-microblazeel as binfmt interpreter for microblazeel
Setting /usr/local/bin/qemu-or1k as binfmt interpreter for or1k
Setting /usr/local/bin/qemu-x86_64 as binfmt interpreter for x86_64

This is strange, the script says that there's qemu in /usr/local/bin

but when I open the file manager (show hidden files is ON), couldn't find anything there.

here's the screenshot

This is the default path. Check the help text, then start the script with all the parameter you need.

qemu-binfmt-conf.sh --help
[rna@rna ~]$ cd Downloads
[rna@rna Downloads]$ qemu-binfmt-conf.sh --help
bash: qemu-binfmt-conf.sh: command not found

You need to start the script on your system like you did in your post above or for example with

bash  ~/Downloads/qemu-binfmt-conf.sh --help

The important thing is the --help

[rna@rna ~]$ bash  ~/Downloads/qemu-binfmt-conf.sh --help
Usage: qemu-binfmt-conf.sh [--qemu-path PATH][--debian][--systemd CPU]
                           [--help][--credential yes|no][--exportdir PATH]
                           [--persistent yes|no][--qemu-suffix SUFFIX]

       Configure binfmt_misc to use qemu interpreter

       --help:        display this usage
       --qemu-path:   set path to qemu interpreter (/usr/local/bin)
       --qemu-suffix: add a suffix to the default interpreter name
       --debian:      don't write into /proc,
                      instead generate update-binfmts templates
       --systemd:     don't write into /proc,
                      instead generate file for systemd-binfmt.service
                      for the given CPU. If CPU is "ALL", generate a
                      file for all known cpus
       --exportdir:   define where to write configuration files
                      (default: /etc/binfmt.d or /usr/share/binfmts)
       --credential:  if yes, credential and security tokens are
                      calculated according to the binary to interpret
       --persistent:  if yes, the interpreter is loaded when binfmt is
                      configured and remains in memory. All future uses
                      are cloned from the open file.

    To import templates with update-binfmts, use :

        sudo update-binfmts --importdir /usr/share/binfmts --import qemu-CPU

    To remove interpreter, use :

        sudo update-binfmts --package qemu-CPU --remove qemu-CPU /usr/local/bin

    With systemd, binfmt files are loaded by systemd-binfmt.service

    The environment variable HOST_ARCH allows to override 'uname' to generate
    configuration files for a different architecture than the current one.

    where CPU is one of:

        i386 i486 alpha arm armeb sparc sparc32plus sparc64 ppc ppc64 ppc64le m68k mips mipsel mipsn32 mipsn32el mips64 mips64el sh4 sh4eb s390x aarch64 aarch64_be hppa riscv32 riscv64 xtensa xtensaeb microblaze microblazeel or1k x86_64

[rna@rna ~]$

You need to read the help text and choose the options you need and want.

Hint, the --qemu-path and --systemd parameter looks promising. But read the help text, so you know how to use it.

1 Like

In my case, where do you think I have to put my path? whereas /usr/local/bin is empty.

What about CPU in --systemd? should I choose the i386 which is my target or aarch64 which is my host?

Forum kindly sponsored by