15 lines
818 B
Bash
Executable file
15 lines
818 B
Bash
Executable file
#!/bin/bash
|
|
|
|
|
|
tar -xf ./files/jammy-server-cloudimg-amd64-root.tar.xz -C ./files/rootfs
|
|
sed -i "1 s,^.*$,root:\$y\$j9T\$4Sr0RCDCWboukd7UCeeWvIyH\$5bE15871.Uyzk77tFoYZqmPqOUosbB0MFWkKGq2/KI2::0:99999:7:::," ./files/rootfs/etc/shadow # password is amogus
|
|
|
|
echo "/dev/vda / ext4 discard,errors=remount-ro 0 1" > ./files/rootfs/etc/fstab
|
|
echo "TimeoutStartSec=1" >> ./files/rootfs/lib/systemd/system/snapd.seeded.service
|
|
rm ./files/rootfs/etc/systemd/system/multipath-tools.service
|
|
rm ./files/rootfs/lib/systemd/system/multipathd.service
|
|
|
|
# rm -f ./files/rootfs/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service
|
|
ln -sf ./files/rootfs/dev/null ./files/rootfs/etc/systemd/system/systemd-networkd-wait-online.service
|
|
|
|
virt-make-fs --format=qcow2 --size=2000M ./files/rootfs rootfs.qcow2
|