You are not logged in.

#1 2016-06-03 06:56:05

audiomuze
Member
Registered: 2014-03-31
Posts: 74

Installing Arch-ARM in a chroot and launching it using systemd-nspawn

I'm trying to get Arch armv7h installed in a bootable container to run some software that doesn't come in a wintel flavour.  Having difficulty though getting systemd-nspawn to work.

Tried adapting the guidance here: https://wiki.archlinux.org/index.php/Sy … _container:
The custom pacman.conf referred to below references armv7h

mkdir /armv7h
pacstrap -C ~/pacman.conf -i -G -M -d /armv7h/ base

Installation was successful, no error messages.

then:

systemd-nspawn -b -D /armv7h -n

returns:

Spawning container armv7h on /armv7h.
Press ^] three times within 1s to kill container.

Container armv7h terminated by signal SYS.

Any ideas what's going on?


Linux user #338966

Offline

#2 2016-06-05 15:31:29

atomicbeef
Member
Registered: 2015-09-30
Posts: 98

Re: Installing Arch-ARM in a chroot and launching it using systemd-nspawn

Hi audiomuze,

Assuming the host is another architecture other than armv7h, you'll need some sort of emulator to run the amrv7h code. You could probably adopt this guide for your needs.

Offline

#3 2016-06-08 06:31:34

audiomuze
Member
Registered: 2014-03-31
Posts: 74

Re: Installing Arch-ARM in a chroot and launching it using systemd-nspawn

thx atomicbeef for taking the trouble to respond.  This is a strange forum, the utter silence often leaves me wondering whether participants have no idea or are just elitist..."let the newbies suffer as we did" kinda mentality.  Anyhow, the platform is aarch64.  I can chroot into armv7h and run the software successfully, it's just systemd-nspawn doesn't work as advertised following the Wiki guidance and I'd like to get it working so that the session can spawn on startup of the ODROID-C2.  I'll take a look at that link, albeit I think I've already perused it and based on what I've read thus far it shouldn't be necessary to use an emulator to do what I'm after.

Last edited by audiomuze (2016-06-08 06:50:20)


Linux user #338966

Offline

#4 2016-06-08 07:21:51

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,170

Re: Installing Arch-ARM in a chroot and launching it using systemd-nspawn

Oops, mis-read it. You're really asking on the wrong forum if you're running an odroid.

Last edited by ngoonee (2016-06-08 07:22:29)


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#5 2016-06-08 07:25:30

runical
Member
From: The Netherlands
Registered: 2012-03-03
Posts: 896

Re: Installing Arch-ARM in a chroot and launching it using systemd-nspawn

The utter silence might also be because you are asking about Arch ARM, not Arch itself (although I honestly have no clue why there is an Other Architecture sub forum. Maybe for kerosine powered cheese graters?). You'll probably have more luck on the Arch Linux ARM forums since they have more knowledge of the ARM systems (see https://archlinuxarm.org/forum/)

You should be correct about not needing an emulator, but you might need something like the multilib on normal Arch systems. Also, does your container have a machine ID? Systemd 230 requires that as far as I know. Take a look at the man page for systemd-machine-id-setup to see how you can set one up.

Offline

#6 2016-07-22 07:37:24

alive4ever
Member
Registered: 2016-07-10
Posts: 65

Re: Installing Arch-ARM in a chroot and launching it using systemd-nspawn

Since the host architecture is different than the container architecture, 'setarch' should be used. You may use the following command to list the supported architecture.

setarch --list

Or use qemu architecture translation, such as qemu-arm or qemu-armeb.

Last edited by alive4ever (2016-07-22 07:39:57)

Offline

#7 2016-09-26 00:26:48

yuyichao
Member
Registered: 2011-04-04
Posts: 19

Re: Installing Arch-ARM in a chroot and launching it using systemd-nspawn

I'm not sure if the OP have solved his issue already but I've hit similar issues and I've found https://bugs.launchpad.net/ubuntu/+sour … ug/1522026 when googling for the issue. It doesn't help me solving the problem directly but I decided to give lxc a try. I modified the lxc-archlinux template to use armv7h as arch (instead of using the uname result) and it creates a container that I can login to.

In the lxc container, i use network.type = none since that doesn't require any additional setup and I replaced the init file with `exec linux32 /usr/lib/systemd/systemd --system` so that it sees a correct uname. lxc-console is somehow now happy about my input but ssh works and running things in the container seems to work so far.

Offline

Board footer

Powered by FluxBB