View previous topic :: View next topic |
Author |
Message |
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1523
|
Posted: Tue Jun 07, 2016 7:22 am Post subject: unable to systemd-nspawn into containers |
|
|
g50-80 backups # systemd-nspawn .
Spawning container backups on /media/hdd/backups.
Press ^] three times within 1s to kill container.
execv() failed: Permission denied
Container backups failed with error code 1.
g50-80 backups # ls
backup.sh bin dev home lib32 lost+found media opt root sbin sys usr
backup.tar.gz boot etc lib lib64 make.conf mnt proc run srv tmp var
g50-80 backups #
chrooting works though:
g50-80 backups # chroot .
g50-80 / #
I can execute files:
g50-80 backups # bin/bash
g50-80 backups #
g50-80 backups # bin/ls
backup.sh bin dev home lib32 lost+found media opt root sbin sys usr
backup.tar.gz boot etc lib lib64 make.conf mnt proc run srv tmp var
g50-80 backups # pwd
/media/hdd/backups
there is a symbolic link involved for one of the parent directories if that makes any difference:
lrwxrwxrwx 1 root root 22 Jun 3 13:05 /media/hdd -> /media/root/media/hdd/ |
|
Back to top |
|
|
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1523
|
Posted: Thu Jun 09, 2016 7:47 pm Post subject: |
|
|
I'm getting a different message this time:
g50-80 backups # systemd-nspawn
Spawning container backups on /media/hdd/backups.
Press ^] three times within 1s to kill container.
Failed to fork inner child: Invalid argument |
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Fri Jun 10, 2016 2:45 am Post subject: |
|
|
When I do systemd-nspawn and chroot I do it from the root home directory and I specify a user. Try
Code: | cd
systemd-nspawn -D /media/hdd/backups -u root |
or whatever user you want to login. _________________ Paul |
|
Back to top |
|
|
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1523
|
Posted: Fri Jun 10, 2016 6:57 am Post subject: |
|
|
unfortunately that did not work
g50-80 ~ # systemd-nspawn -D /media/hdd/backups -u root
Spawning container backups on /media/root/media/hdd/backups.
Press ^] three times within 1s to kill container.
Failed to fork inner child: Invalid argument |
|
Back to top |
|
|
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1523
|
Posted: Mon Jun 13, 2016 5:44 pm Post subject: |
|
|
bump |
|
Back to top |
|
|
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1523
|
Posted: Thu Jun 23, 2016 8:05 am Post subject: |
|
|
here's an strace of the spawning:
http://pastebin.com/3EbWNkz3
I see some problems(might not be related to this issue):
239: open("/sys/fs/kdbus/0-system/bus", O_RDWR|O_NOCTTY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
247: getsockopt(12, SOL_SOCKET, SO_PEERSEC, 0x5559e12be260, 0x7ffc25a049e4) = -1 ENOPROTOOPT (Protocol not available)
256: recvmsg(12, 0x7ffc25a038b0, MSG_DONTWAIT|MSG_NOSIGNAL|MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable) |
|
Back to top |
|
|
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1523
|
Posted: Thu Aug 11, 2016 10:24 am Post subject: |
|
|
now it's
Spawning container root on /media/root.
Press ^] three times within 1s to kill container.
Host and machine ids are equal (3cb75e38bee26b705d6c85cf574ddab1): refusing to link journals
execv() failed: Permission denied
Container root failed with error code 1.
partition is mounted with exec |
|
Back to top |
|
|
dan2003 Apprentice
Joined: 11 May 2003 Posts: 258 Location: somewhere near london, UK
|
Posted: Fri Nov 10, 2017 9:45 am Post subject: |
|
|
Maybe not of any help to the OP anymore but in case anybody else has this issue and finds themselves here the following resolved it for me.
Quote: | You need support for namespaces and multiple devpts instances in your kernel:
CONFIG_UTS_NS=y
CONFIG_IPC_NS=y
CONFIG_USER_NS=y
CONFIG_PID_NS=y
CONFIG_NET_NS=y
CONFIG_DEVPTS_MULTIPLE_INSTANCES=y |
Thanks to https://rich0gentoo.wordpress.com/2014/07/14/quick-systemd-nspawn-guide/ _________________ Too easy! |
|
Back to top |
|
|
|