How to build a manjaro core rootfs for container usage?

As the title,iwant to build a plain rootfs for my chroot container,but i didn’t found something like this
or i just make a pacstrap is ok?

Change your pacman mirror to

Server = https://xxxx/manjaro/stable/$repo/$arch

Install the manjaro keyring or change to source to TrustAll SigLevel
Then use

pacstrap /manjaro-chroot/ base pamac

to install the manjarorootfs
Then you’re good there,go to /manjaro-chroot to do package or just chroot

manjaro has as similar script basestrap

you could use systemd-nspawn


The following recipe works on Manjaro

$ mkdir ~/TestContainer
$ basestrap -c ~/TestContainer base
$ systemd-nspawn -D ~/MyContainer

While inside the container

  • set a root password (otherwise root login is blocked)
  • edit /etc/securetty (append pts/0 and save the file - otherwise login is rejected)

Then logout of the container

$ logout

Boot the container

$ systemd-nspawn -b -D ~/TestContainer
2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.