Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tools:lxc [2022/09/02 18:33] – [Install] darron | tools:lxc [2024/10/24 00:19] (current) – [Setup] darron | ||
---|---|---|---|
Line 31: | Line 31: | ||
==systemd== | ==systemd== | ||
< | < | ||
+ | systemctl stop lxc-monitord.service | ||
+ | systemctl disable lxc-monitord.service | ||
+ | systemctl mask lxc-monitord.service | ||
systemctl disable lxc-net.service | systemctl disable lxc-net.service | ||
systemctl disable lxc.service | systemctl disable lxc.service | ||
Line 38: | Line 41: | ||
< | < | ||
- | sed -i ' | + | sed -i ' |
- | sed -i ' | + | sed -i ' |
</ | </ | ||
Line 85: | Line 88: | ||
iptables -t raw -F | iptables -t raw -F | ||
iptables -t nat -F | iptables -t nat -F | ||
- | /usr/sbin/conntrack -F | + | conntrack -F |
# raw: | # raw: | ||
Line 152: | Line 155: | ||
< | < | ||
lxc-create -n terminator -t debian -- -r bullseye -a armhf | lxc-create -n terminator -t debian -- -r bullseye -a armhf | ||
+ | </ | ||
+ | |||
+ | Install bookworm (32-bit) | ||
+ | |||
+ | < | ||
+ | lxc-create -n cracker -t debian -- -r bookworm -a armhf | ||
</ | </ | ||
=== Configure === | === Configure === | ||
Line 261: | Line 270: | ||
Now we can start and stop the container, attach to it, etc. | Now we can start and stop the container, attach to it, etc. | ||
+ | |||
+ | ===Runit=== | ||
+ | |||
+ | Start container and login as root | ||
+ | < | ||
+ | lxc-start -F -n container | ||
+ | </ | ||
+ | |||
+ | Install runit. It will ask you to enter a phrase and after installation reboot. | ||
+ | |||
+ | < | ||
+ | apt install runit-init | ||
+ | reboot | ||
+ | </ | ||
+ | |||
+ | or | ||
+ | |||
+ | < | ||
+ | apt-get install runit runit-run runit-systemd | ||
+ | </ | ||
+ | |||
+ | Login to tidy up. | ||
+ | |||
+ | < | ||
+ | lxc-attach -n container | ||
+ | cd / | ||
+ | rm getty-tty* | ||
+ | </ | ||
+ | |||
+ | ===Apt=== | ||
+ | |||
+ | < | ||
+ | sed -i ' | ||
+ | </ |