Alpine/Morefine: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
Line 108: Line 108:
* [https://www.reddit.com/r/AlpineLinux/comments/b2moz0/is_it_possible_to_install_linux_containers_on/ Alpine » Install » Linux Containers]
* [https://www.reddit.com/r/AlpineLinux/comments/b2moz0/is_it_possible_to_install_linux_containers_on/ Alpine » Install » Linux Containers]
* [https://lxdware.com/lxd-dashboard-installing-from-source-in-alpine-linux/ Alpine » Install » LXD Dashboard]
* [https://lxdware.com/lxd-dashboard-installing-from-source-in-alpine-linux/ Alpine » Install » LXD Dashboard]
* [https://pkgs.alpinelinux.org/package/v3.17/community/x86_64/lxd Alpine » Packages » LXD]
* [https://pkgs.alpinelinux.org/package/v3.17/community/x86_64/qemu Alpine » Packages » qemu]
* [https://pkgs.alpinelinux.org/package/v3.17/community/x86_64/lxd Alpine » Packages » lxd]
* [https://wiki.alpinelinux.org/wiki/Bridge  Alpine » Wiki » Bridge]
* [https://wiki.alpinelinux.org/wiki/Bridge  Alpine » Wiki » Bridge]
* [https://wiki.alpinelinux.org/wiki/LXC Alpine » Wiki » LXC]
* [https://wiki.alpinelinux.org/wiki/LXC Alpine » Wiki » LXC]

Revision as of 11:42, 21 January 2023

Install LXD

cat /etc/apk/repositories
:'
http://dl-cdn.alpinelinux.org/alpine/v3.17/main
http://dl-cdn.alpinelinux.org/alpine/v3.17/community

#http://dl-cdn.alpinelinux.org/alpine/edge/main
#http://dl-cdn.alpinelinux.org/alpine/edge/community
#http://dl-cdn.alpinelinux.org/alpine/edge/testing
:'

apk update
apk upgrade
apk add lxd
# enable service
rc-update add lxd
rc-service lxd start
rc-service lxd status

# configure system
rc-update add cgroups
rc-service cgroups start

# add cgfs to pam.d/system-login
echo "session    optional   pam_cgfs.so          -c freezer,memory,name=systemd,unified" >> /etc/pam.d/system-login

# add user and group idmaps to lxc config
echo "lxc.idmap = u 0 100000 65536" >> /etc/lxc/default.conf
echo "lxc.idmap = g 0 100000 65536" >> /etc/lxc/default.conf

# add root and other users
echo "root:100000:65536" >> /etc/subuid
echo "root:100000:65536" >> /etc/subgid
brctl addbr lxdbr0
tee -a /etc/network/interfaces >>/dev/null <<EOF
auto lxdbr0
iface lxdbr0 inet dhcp
    bridge-ports eth0

EOF

Knowledge

df -hT
fdisk -l
apk update
ip addr show
ip link show
apk add lsblk
apk add parted
apk add util-linux
apk add smartmontools
apk add e2fsprogs-extra
lscpu
lsblk
apk add fuse
apk add ntfs-3g
ls -lah /dev/sda*

parted -l
badblocks -v /dev/sda1 > ~/bad_sectors.txt
badblocks -v /dev/sda2 > ~/bad_sectors.txt
badblocks -v /dev/sda3 > ~/bad_sectors.txt
smartctl --version
smartctl -H /dev/sda1
smartctl -H /dev/sda2
smartctl -H /dev/sda3

References