Blob


1 version=pmwiki-2.2.130 ordered=1 urlencoded=1
2 agent=Mozilla/5.0 (X11; Linux x86_64; rv:101.0) Gecko/20100101 Firefox/101.0
3 author=g1n
4 charset=UTF-8
5 csum=Added article about Arch Linux setup on VMM
6 ctime=1655050267
7 host=195.114.146.44
8 name=Vmm.Arch
9 rev=1
10 targets=
11 text=NOTE: This guide assumes that you have 50G disk for your vm%0a%0a* `vmctl start -c -B cdrom %3cvm-name>`%0a%0a* Press `%3cTAB>`, then enter ` console=ttyS0,115200`%0a%0a* The problem may occur with loading `/dev/disk/by-label/ARCH_%3cSMTH>`%0a * To fix it you need to create `/dev/disk/by-label/` if needed - `mkdir -p /dev/disk/by-label/`%0a * Then check `blkid`, and `ln -s %3cpath-to-iso-that-was-returned> /dev/disk/by-label/ARCH_%3cSMTH>`%0a `ln -s /dev/sr0 /dev/disk/by-label/ARCH_202206`%0a * exit from that console%0a%0a* login as `root`%0a* check if network is working using `ping archlinux.org`%0a* `timedatectl set-ntp true`%0a* check what disk you need to format using `fdisk -l`%0a* run `cfdisk %3cyour-disk>`%0a * choose `dos`%0a * partition scheme - 2G swap, 23G /, 25G /home%0a * mark root as bootable%0a * /dev/vda1 - swap, /dev/vda2 - /, /dev/vda3 - /home%0a* Formatting%0a * `mkfs.ext4 -L ROOT /dev/vda2`%0a * `mkfs.ext4 -L HOME /dev/vda3`%0a * `mkswap -L SWAP /dev/vda1`%0a* Mount%0a * `mount /dev/vda2 /mnt`%0a * `mkdir -p /mnt/home`%0a * `mount /dev/vda3 /mnt/home`%0a * `swapon /dev/vda1`%0a%0a* Installation process%0a * `pacstrap /mnt base linux linux-firmware`%0a * `genfstab -U /mnt >> /mnt/etc/fstab`%0a * `arch-chroot /mnt`%0a%0a * `ln -sf /usr/share/zoneinfo/UTC /etc/localtime`%0a * `hwclock --systohc`%0a * install editor (for example: `pacman -S vim`)%0a * edit /etc/locale.gen and uncomment `en_US.UTF-8 UTF-8`%0a * `locale-gen`%0a * Create /etc/locale.conf and insert `LANG=en_US.UTF-8`%0a * Create /etc/hostname and insert hostname%0a * set root password using `passwd`%0a%0a%0a* Bootloader%0a * `pacman -S syslinux`%0a * `syslinux-install_update -i -a -m`%0a * Fix /boot/syslinux/syslinux.cfg%0a * in lines with `APPEND` change `root=/dev/sdaX` to `root=%3cyour-root-partition>`%0a * in the end of `APPEND` lines add `console=ttyS0,115200`%0a * you should fix it for both: and for `arch` section, and for `archfallback` section%0a%0a* End of basic install%0a * exit from chroot%0a * `umount -R /mnt`%0a * `poweroff`%0a%0a* Now boot your vm and connect to serial console using `vmctl start -c %3cvm-name>`%0a* Fix networking%0a * Create file /etc/systemd/network/20-wired.network and add this to it:%0a [Match]%0a Name=enp0s2%0a%0a [Network]%0a Address=%3cipv4-addr>%0a Gateway=%3cgateway-ipv4-addr>%0a Address=%3cipv6-addr>%0a Gateway=%3cgateway-ipv6-addr>%0a * `systemctl enable systemd-networkd`%0a * `systemctl start systemd-networkd`%0a * Fix /etc/resolv.conf%0a * Add `nameserver %3cgateway-ipv4-addr>`%0a%0a* Update your system using `pacman -Syu`%0a%0a* Add your own user and add it to wheel group%0a * `useradd -m -G wheel %3cusername>`%0a%0a* Install and configure sudo%0a * `pacman -S sudo`%0a * Edit /etc/sudoers%0a * Uncomment line this line `%25wheel ALL=(ALL:ALL) ALL` or this `%25wheel ALL=(ALL:ALL) NOPASSWD: ALL`, if you want to allow sudo without password%0a%0a* Setup sshd%0a * `pacman -S openssh`%0a * Edit /etc/sshd/sshd\_config%0a * Change `PasswordAuthentication` field to no`%0a * Change `PermitRootLogin` field to `no`%0a * Change `PubkeyAuthentication` field to `yes`%0a * Make in your user's home dir folder .ssh with 700 permissions%0a * `mkdir -m 700 /home/%3cyour-user-home-dir>/.ssh`%0a * Add your public key to %3cyour-user-home-dir>/.ssh/authorized_keys%0a * `systemctl enable sshd`%0a * `systemctl start sshd`%0a * Try to connect to your server using ssh with key%0a%0a* It is recommended to `poweroff` your VPS and turn it on using `vmctl start %3cvm-name>` (maybe you will need to wait around 30 seconds or more)%0a%0a* If you having some issues with connecting, try to connect to serial console using `vmctl console %3cvm-name>`
12 time=1655050267
13 author:1655050267=g1n
14 csum:1655050267=Added article about Arch Linux setup on VMM
15 diff:1655050267:1655050267:=1,101d0%0a%3c NOTE: This guide assumes that you have 50G disk for your vm%0a%3c %0a%3c * `vmctl start -c -B cdrom %3cvm-name>`%0a%3c %0a%3c * Press `%3cTAB>`, then enter ` console=ttyS0,115200`%0a%3c %0a%3c * The problem may occur with loading `/dev/disk/by-label/ARCH_%3cSMTH>`%0a%3c * To fix it you need to create `/dev/disk/by-label/` if needed - `mkdir -p /dev/disk/by-label/`%0a%3c * Then check `blkid`, and `ln -s %3cpath-to-iso-that-was-returned> /dev/disk/by-label/ARCH_%3cSMTH>`%0a%3c `ln -s /dev/sr0 /dev/disk/by-label/ARCH_202206`%0a%3c * exit from that console%0a%3c %0a%3c * login as `root`%0a%3c * check if network is working using `ping archlinux.org`%0a%3c * `timedatectl set-ntp true`%0a%3c * check what disk you need to format using `fdisk -l`%0a%3c * run `cfdisk %3cyour-disk>`%0a%3c * choose `dos`%0a%3c * partition scheme - 2G swap, 23G /, 25G /home%0a%3c * mark root as bootable%0a%3c * /dev/vda1 - swap, /dev/vda2 - /, /dev/vda3 - /home%0a%3c * Formatting%0a%3c * `mkfs.ext4 -L ROOT /dev/vda2`%0a%3c * `mkfs.ext4 -L HOME /dev/vda3`%0a%3c * `mkswap -L SWAP /dev/vda1`%0a%3c * Mount%0a%3c * `mount /dev/vda2 /mnt`%0a%3c * `mkdir -p /mnt/home`%0a%3c * `mount /dev/vda3 /mnt/home`%0a%3c * `swapon /dev/vda1`%0a%3c %0a%3c * Installation process%0a%3c * `pacstrap /mnt base linux linux-firmware`%0a%3c * `genfstab -U /mnt >> /mnt/etc/fstab`%0a%3c * `arch-chroot /mnt`%0a%3c %0a%3c * `ln -sf /usr/share/zoneinfo/UTC /etc/localtime`%0a%3c * `hwclock --systohc`%0a%3c * install editor (for example: `pacman -S vim`)%0a%3c * edit /etc/locale.gen and uncomment `en_US.UTF-8 UTF-8`%0a%3c * `locale-gen`%0a%3c * Create /etc/locale.conf and insert `LANG=en_US.UTF-8`%0a%3c * Create /etc/hostname and insert hostname%0a%3c * set root password using `passwd`%0a%3c %0a%3c %0a%3c * Bootloader%0a%3c * `pacman -S syslinux`%0a%3c * `syslinux-install_update -i -a -m`%0a%3c * Fix /boot/syslinux/syslinux.cfg%0a%3c * in lines with `APPEND` change `root=/dev/sdaX` to `root=%3cyour-root-partition>`%0a%3c * in the end of `APPEND` lines add `console=ttyS0,115200`%0a%3c * you should fix it for both: and for `arch` section, and for `archfallback` section%0a%3c %0a%3c * End of basic install%0a%3c * exit from chroot%0a%3c * `umount -R /mnt`%0a%3c * `poweroff`%0a%3c %0a%3c * Now boot your vm and connect to serial console using `vmctl start -c %3cvm-name>`%0a%3c * Fix networking%0a%3c * Create file /etc/systemd/network/20-wired.network and add this to it:%0a%3c [Match]%0a%3c Name=enp0s2%0a%3c %0a%3c [Network]%0a%3c Address=%3cipv4-addr>%0a%3c Gateway=%3cgateway-ipv4-addr>%0a%3c Address=%3cipv6-addr>%0a%3c Gateway=%3cgateway-ipv6-addr>%0a%3c * `systemctl enable systemd-networkd`%0a%3c * `systemctl start systemd-networkd`%0a%3c * Fix /etc/resolv.conf%0a%3c * Add `nameserver %3cgateway-ipv4-addr>`%0a%3c %0a%3c * Update your system using `pacman -Syu`%0a%3c %0a%3c * Add your own user and add it to wheel group%0a%3c * `useradd -m -G wheel %3cusername>`%0a%3c %0a%3c * Install and configure sudo%0a%3c * `pacman -S sudo`%0a%3c * Edit /etc/sudoers%0a%3c * Uncomment line this line `%25wheel ALL=(ALL:ALL) ALL` or this `%25wheel ALL=(ALL:ALL) NOPASSWD: ALL`, if you want to allow sudo without password%0a%3c %0a%3c * Setup sshd%0a%3c * `pacman -S openssh`%0a%3c * Edit /etc/sshd/sshd\_config%0a%3c * Change `PasswordAuthentication` field to no`%0a%3c * Change `PermitRootLogin` field to `no`%0a%3c * Change `PubkeyAuthentication` field to `yes`%0a%3c * Make in your user's home dir folder .ssh with 700 permissions%0a%3c * `mkdir -m 700 /home/%3cyour-user-home-dir>/.ssh`%0a%3c * Add your public key to %3cyour-user-home-dir>/.ssh/authorized_keys%0a%3c * `systemctl enable sshd`%0a%3c * `systemctl start sshd`%0a%3c * Try to connect to your server using ssh with key%0a%3c %0a%3c * It is recommended to `poweroff` your VPS and turn it on using `vmctl start %3cvm-name>` (maybe you will need to wait around 30 seconds or more)%0a%3c %0a%3c * If you having some issues with connecting, try to connect to serial console using `vmctl console %3cvm-name>`%0a\ No newline at end of file%0a
16 host:1655050267=195.114.146.44