You are not logged in.

#1 2015-02-14 12:54:34

89c51
Member
Registered: 2012-06-05
Posts: 741

[Solved] 32bit container on 64bit system with systemd-nspawn.

How can someone install such a thing. Is it possible??

The wiki gives an example but no mention of architectures.

Also since the container works as root will it cause trouble if i try to build software packages on it??

Last edited by 89c51 (2015-04-29 22:49:57)

Offline

#2 2015-02-14 18:38:16

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,163
Website

Re: [Solved] 32bit container on 64bit system with systemd-nspawn.

I'd have thought you would setup a 32-bit chroot environment, or am I mistaken? For the chroot case, you have: setarch i686 arch-chroot mnt /bin/bash

I'd like to say you could do something similar.

MAN PAGES TO THE RESCUE. Apparently, there is the following flag:

--personality=

Last edited by clfarron4 (2015-02-14 18:40:02)


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#3 2015-02-15 15:21:38

89c51
Member
Registered: 2012-06-05
Posts: 741

Re: [Solved] 32bit container on 64bit system with systemd-nspawn.

Yes i saw that. How the packstrap command is going to know that it must install a 32bit base in the directory. I thought the --personality=x86 is for booting.

Offline

#4 2015-02-15 17:01:50

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,163
Website

Re: [Solved] 32bit container on 64bit system with systemd-nspawn.

I think you can use the instructions on building 32 bit packages in a 64 bit environment to set-up the 32 bit chroot, changing the locations to where you want the chroot. That way you'll install a 32bit base.


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#5 2015-02-15 17:29:22

89c51
Member
Registered: 2012-06-05
Posts: 741

Re: [Solved] 32bit container on 64bit system with systemd-nspawn.

Yes i know that already. That is a secondary issue which i could also solve by installing a 32bit VM in Vbox. The 32bit on 64bit with nspawn is what i want to do. I am curious. hmm

Last edited by 89c51 (2015-02-15 17:29:55)

Offline

#6 2015-02-15 18:05:24

89c51
Member
Registered: 2012-06-05
Posts: 741

Re: [Solved] 32bit container on 64bit system with systemd-nspawn.

Ok i think i found something.

Pacstrap lets you use a different config file for pacman with the -C option. So will something like:


pacstrap -i -c -d -C pacman.conf ~/Arch32_cont base
systemd-nspawn -bD --personality=x86 ~/Arch32_cont 

work if i set Architecture = i686 in the pacman.conf file??

Offline

#7 2015-04-29 22:49:38

89c51
Member
Registered: 2012-06-05
Posts: 741

Re: [Solved] 32bit container on 64bit system with systemd-nspawn.

Just in case anyone needs that.

To create a 32 bit container on a 64 bit system the procedure is.

Copy your /etc/pacman.conf to your home directory and change the Architecture = auto to Architecture = i686

mkdir Arch32_cont
sudo pacstrap -i -c -d -C pacman.conf ~/Arch32_cont base
sudo systemd-nspawn --personality=x86 -bD ~/Arch32_cont

login as root with no password. Do whatever you want (create a user, build packages etc) and you can simply delete everything with:

sudo rm -rf ~/Arch32_cont

Offline

#8 2022-11-05 19:29:22

warteeminus321
Member
Registered: 2022-09-03
Posts: 27

Re: [Solved] 32bit container on 64bit system with systemd-nspawn.

This was perfect except 32 repos are elsewhere now. So to make this pacstrap work you need to edit /etc/pacman.d/mirrorlist and add there at least one server from https://archlinux32.org/mirrorlist/ and to install a 32 bit keyring from AUR https://aur.archlinux.org/packages/archlinux32-keyring

Last edited by warteeminus321 (2022-11-05 19:34:17)


Hitchhacker's Guide to the Galaxy: “Nothing travels faster than the speed of light with the possible exception of bad news, which obeys its own special laws.”
If you didn't know you are backdoored, you are backdoored.

Offline

#9 2022-11-06 01:14:41

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,740

Re: [Solved] 32bit container on 64bit system with systemd-nspawn.

Please don't necrobump 7 year old solved threads.

Closing.

Offline

Board footer

Powered by FluxBB