qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug 1895053] Re: Cannot nspawn raspbian 10 [FAILED] Failed to start


From: Laurent Vivier
Subject: Re: [Bug 1895053] Re: Cannot nspawn raspbian 10 [FAILED] Failed to start Journal Service.
Date: Wed, 16 Sep 2020 09:42:50 -0000

Le 15/09/2020 à 00:03, Petunia a écrit :
> for file in /proc/sys/fs/binfmt_misc/* ; do echo "$file"; LANG=C cat $file; 
> done
...
> /proc/sys/fs/binfmt_misc/arm
> enabled
> interpreter /usr/bin/qemu-arm-static
> flags: OCF
> offset 0
> magic 7f454c4601010100000000000000000002002800
> mask ffffffffffffff00fffffffffffffffffeffffff

'F'[1] flags means the interpreter is loaded from your host:
your "--bind" arg is not needed and the file I asked you to copy inside
the container is not used.

So to enable the traces, the easier way to do is to rename the file
directly on the host and to reload the configuration (but warning, if
you have other containers running they will be also run with trace):

sudo mv /usr/bin/qemu-arm-static /usr/vib/qemu-arm-org
sudo cp qemu-wrapper /usr/bin/qemu-arm-static
sudo systemctl restart systemd-binfmt.service
systemd-nspawn  --boot --directory=/mnt

[1] linux/Documentation/admin-guide/binfmt-misc.rst

``F`` - fix binary
      The usual behaviour of binfmt_misc is to spawn the
      binary lazily when the misc format file is invoked.  However,
      this doesn``t work very well in the face of mount namespaces and
      changeroots, so the ``F`` mode opens the binary as soon as the
      emulation is installed and uses the opened image to spawn the
      emulator, meaning it is always available once installed,
      regardless of how the environment changes.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1895053

Title:
  Cannot nspawn raspbian 10 [FAILED] Failed to start Journal Service.

Status in QEMU:
  New

Bug description:
  Hi, I'm using nspawn and asked the question @systemd-devel. They redirected 
me to you, guessing that nspawn calls a syscall or ioctl qemu isnt aware of and 
can't implement properly?
  They were like: "Sorry, that's not my department." ^^

  Maybe you can reproduce the issue or help me investigating whats wrong
  or put the ball right back into their court? :D

  Testscript:
  wget https://downloads.raspberrypi.org/raspios_lite_armhf_latest -o r.zip
  unzip r.zip
  LOOP=$(losetup --show -Pf *raspios-buster-armhf-lite.img)
  mount ${LOOP}p2 /mnt
  mount ${LOOP}p1 /mnt/boot
  systemd-nspawn --bind /usr/bin/qemu-arm-static --boot --directory=/mnt -- 
systemd.log_level=debug

  Output:
  see attachment

  System:
  uname -a
  Linux MArch 5.8.7-arch1-1 #1 SMP PREEMPT Sat, 05 Sep 2020 12:31:32 +0000
  x86_64 GNU/Linux

  qemu-arm-static --version
  qemu-arm version 5.1.0

  systemd-nspawn --version
  systemd 246 (246.4-1-arch)
  +PAM +AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP
  +GCRYPT +GNUTLS +ACL +XZ +LZ4 +ZSTD +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN
  +PCRE2 default-hierarchy=hybrid

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1895053/+subscriptions



reply via email to

[Prev in Thread] Current Thread [Next in Thread]