Customize rootfs without home disk

This commit is contained in:
Thales Maciel 2026-01-30 10:55:24 -03:00
parent 092700b241
commit f7e372d8db
No known key found for this signature in database
GPG key ID: 33112E6833C34679

View file

@ -9,7 +9,7 @@ usage() {
cat <<'EOF'
Usage: ./customize.sh <output-rootfs> [--size <size>]
Creates a copy of rootfs.ext4, optionally resizes it, boots a VM with the
Creates a copy of rootfs.ext4, optionally resizes it, boots a VM using the
copy as a writable rootfs, then applies base configuration and packages.
EOF
}
@ -231,10 +231,6 @@ ssh -i "$SSH_KEY" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
printf 'nameserver %s\n' \"$DNS_SERVER\" > /etc/resolv.conf
echo \"$VM_NAME\" > /etc/hostname
printf '127.0.0.1 localhost\n127.0.1.1 %s\n' \"$VM_NAME\" > /etc/hosts
mkdir -p /home
if ! grep -q '^/dev/vdb ' /etc/fstab; then
echo '/dev/vdb /home ext4 defaults 0 2' >> /etc/fstab
fi
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get -y upgrade
DEBIAN_FRONTEND=noninteractive apt-get -y install git less tree ca-certificates curl