TOC
ssh USERNAME@us5.ircnow.org
grep -B1 -A10 "owner USERNAME" /etc/vm.conf` `vmctl status | grep USERNAME`
vmctl create -s 16G diskname.qcow2 file diskname.qcow2 ls -lh diskname.qcow2
Start: vmctl start VMNAME
Get in: vmctl console VMNAME
Start and get in: vmctl start -c VMNAME
Get out: <NEWLINE>~.
Get out without get out ssh: <NEWLINE>~~.
Graceful shutdown: vmctl stop VMNAME
Cut Power: vmctl stop -f VMNAME
Console messes up the screen: reset; clear
/install.amd/vmlinuz priority=low vga=788 initrd=/install.amd/initrd.gz ---
/install.amd/vmlinuz priority=low DEBIAN_FRONTEND=text initrd=/install.amd/initrd.gz --- console=ttyS0,115200
Advanced options » Expert install » <TAB>
edit boot parameters and boot
Protip: Type line at end, then Ctrl+B to edit middle - don’t overshoot!
How to stop from scrolling off screen? lol.
Defaults are fine.
No autoconfigure.
Static IP address assigned to you hint: dig VMNAME.us5.ircnow.org
Netmask: 255.255.255.0 (default)
Gateway: 38.81.163.129 (NOT default)
DNS: 8.8.8.8 (NOT default)
Timeout for link autodetect - efault of 3 is fine. It never times out anyway if you got it wrong and hangs.
Protip: You can never enter the network setup menu (or type < to get out of it) to avoid this.
Hostname: Don’t think it matters.
DOmain name: Does it have to be us5.ircnow.org???
Protip: openssl rand -base64 12
makes a 16 char password
Protip: Save password to a file on bare metal computer and copy paste it in
Protip: Ctrl+c or Ctrl+shift+c = xsel -b ; Select with mouse = xsel ; Middle mouse button pastes xsel
Protip: Can’t only have ssh key because you need to login from console when network is down!
Protip: </var/log/auth.log grep "Invalid user" | wc -l
Protip: Someone tries to guess a password EVERY MINUTE
Protip: mbt is called “msdos” here
Reminder: GPT no work!!! i think
Protip: expr 1024 \* 1024 \* 1024 \* 4
to get 4GiB instead of 4GB, use suffix b
Protip: “10 11” enables user and group quotas on /home no comma no quotes
Protip: easier to make swap on a separate .qcow2
Protip: “targeted” works
Enable backports with “1 2 3” no comma no quotes
Select and install software takes a long time do NOT press enter to make it wake up or it will skip choices
DOn’t install desktop stuff on the SERVER lol
Install GRUB to the MBR (make sure you get the right disk 1st disk?)
You don’t need to “remove the installation media”
Protip: Don’t hold keys down or you may lock the console
To keep all .dpkg (to make a local archive later):
printf '%s' 'Binary::apt::APT::Keep-Downloaded-Packages "1";' > /etc/apt/apt.conf.d/99keep-downloaded-packages
To trust cdrom:
sed -i 's/deb cdrom/deb [trusted=yes] cdrom/' /etc/apt/sources.list
To get new kernel: (IMPORTANT!)
apt list | egrep 'linux-image.*bpo..-amd64-unsigned' #based on latest above apt install linux-image-5.6.0-0.bpo.2-amd64-unsigned uname -r #still old reboot uname -r #new
Now you put your authorized_keys in and switch to ssh instead of console.
To see kept .dpkg (to make a local archive later):
find /var/cache/apt/archives -name '*.deb' | wc -l du -ah /var/cache/apt/archives | sort -h | tail
To find an empty .qcow2 disk to put swap on:
lsblk mkswap /dev/DONT_GET_THIS_WRONG lsblk -o name,UUID | grep DONT_GET_THIS_WRONG uuid=$(lsblk -o name,UUID | grep vdc | awk '{print $2}') echo \$uuid #should exist! printf "%s\n" "UUID=$uuid none swap" >> /etc/fstab #applies on reboot swapon /dev/DONT_GET_THIS_WRONG #applies now swapon #verify have swap now
To not need password to sudo
/etc/sudoers #edit this file with this line USERNAME ALL=(ALL:ALL) NOPASSWD:ALL
apt get apt-file