[Top][All Lists]

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

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

From: Laurent Vivier
Subject: [Bug 1895053] Re: Cannot nspawn raspbian 10 [FAILED] Failed to start Journal Service.
Date: Fri, 11 Sep 2020 09:20:39 -0000

We can try to see what is failing by enabling qemu strace.
To do that, I don't know a better solution than using a wrapper.

Once /mnt is mounted, copy qemu-arm-static inside with a new name:

  sudo cp /usr/bin/qemu-arm-static /mnt/usr/bin/qemu-arm-org

Then create the wrapper:

cat > qemu-wrapper.c <<EOF
#include <stdio.h>
#include <unistd.h>
#include <string.h>

static const char *baseargv[] = {

int main(int argc, char **argv, char **envp) {
        char *newargv[argc + sizeof(baseargv) / sizeof(char *) + 1];
        int current = 0;

        newargv[current] = argv[0];

        memcpy(&newargv[current], baseargv, sizeof(baseargv));
        current += sizeof(baseargv) / sizeof(char *);

        memcpy(&newargv[current], &argv[1], sizeof(*argv) * (argc - 1));
        current += argc - 1;

        newargv[current] = NULL;

        return execve("/usr/bin/qemu-arm-org", newargv, envp);
  cc --static -o qemu-wrapper qemu-wrapper.c

  sudo cp  qemu-wrapper /mnt/usr/bin/qemu-arm-static

And then:

  systemd-nspawn  --boot --directory=/mnt

You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.

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

Status in QEMU:

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

  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 -- 

  see attachment

  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)
  +PCRE2 default-hierarchy=hybrid

To manage notifications about this bug go to:

reply via email to

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