linux

Ubuntu autoinstall

HowTo
https://canonical-subiquity.readthedocs-hosted.com/en/latest/tutorial/providing-autoinstall.html#providing-autoinstall

Download Ubuntu iso
https://releases.ubuntu.com/24.04/ubuntu-24.04-desktop-amd64.iso

wget https://releases.ubuntu.com/24.04/ubuntu-24.04-desktop-amd64.iso -O ~/Downloads/iso/ubuntu-24.04-desktop-amd64.iso

Prepare

sudo apt install qemu-system-x86
 
# mount ISO by double click
#sudo mount -r ~/Downloads/iso/ubuntu-24.04-desktop-amd64.iso /mnt

autoinstall.yaml

logrotate

Install

apt-get install -y logrotate

/etc/logrotate.d/rsyslog

/var/log/syslog
{
	rotate 7
	daily
        size 100M
	missingok
	notifempty
	delaycompress
	compress
	postrotate
		/usr/lib/rsyslog/rsyslog-rotate
	endscript
}
 
/var/log/mail.info
/var/log/mail.warn
/var/log/mail.err
/var/log/mail.log
/var/log/daemon.log
/var/log/kern.log
/var/log/auth.log
/var/log/user.log
/var/log/lpr.log
/var/log/cron.log
/var/log/debug
/var/log/messages
{
	rotate 4
	weekly
	missingok
	notifempty
	compress
	delaycompress
	sharedscripts
	postrotate
		/usr/lib/rsyslog/rsyslog-rotate
	endscript
}

Force logrotate

sysctl

configure parameter

# determine the maximum size of a shared memory segment
cat /proc/sys/kernel/shmmax
 
# set default shared memory limit for shmmax (16 GB)
echo 17179869184 > /proc/sys/kernel/shmmax
 
# add the following line to /etc/sysctl.conf to make a change permanent
echo "kernel.shmmax=4294967296" >> /etc/sysctl.d/90-shmmax.conf
 
# load parameter
/sbin/sysctl -p /etc/sysctl.d/90-shmmax.conf

reduce swap usage
https://en.wikipedia.org/wiki/Swappiness