curl https://dl.hpc.market/liniti/24.04/ubuntu-base-24.04.2-base-amd64.tar.gz | tar zxf -
rm -f etc/resolv.conf
echo nameserver 119.29.29.29 > etc/resolv.conf
mount -o bind /dev dev
mount -t proc none proc
cat << 'EOF' | chroot . 
apt -y update
apt install -y fdisk gdisk parted e2fsprogs xfsprogs runit \
linux-image-6.8.0-60-generic linux-modules-extra-6.8.0-60-generic \
bridge-utils socat htop lsof strace isc-dhcp-client \
openssh-server openssh-client kexec-tools uuid \
net-tools ipmitool tmux wireguard-tools vim ipset \
iptables ebtables curl wget libarchive-tools cpio lshw \
nfs-common zfsutils-linux iputils-ping infiniband-diags \
nfs-kernel-server numactl pciutils bzip2 less gawk
apt clean all
passwd -d root
EOF
umount proc
umount dev
rm -rf *.*merged
> root/.bash_history
find etc/systemd/ |grep grub |xargs rm
find lib/modules/6.8.0-60-generic/ -name *.zst |xargs -n 1 unzstd --rm
depmod -b . 6.8.0-60-generic
mv boot/vmlinuz-6.8.0-60-generic ..
rm -f boot/vmlinuz* boot/initrd.img*
tar cf ../rootfs.tar .
