Add fstab override for VM to mount /boot.

This commit is contained in:
parazyd 2020-11-13 11:26:10 +01:00
parent 9a1874d072
commit 8e7a779237
No known key found for this signature in database
GPG Key ID: 6B636BF0493EE747
1 changed files with 5 additions and 1 deletions

View File

@ -23,11 +23,15 @@ vars+=(vmname)
vm_inject_overrides()
{
fn vm_inject_overrides
req=(strapdir)
req=(strapdir bootfs)
ckreq || return 1
notice "Injecting rootfs overrides"
cat <<EOF | sudo tee -a "$strapdir/etc/fstab" >/dev/null
/dev/sda1 /boot ${bootfs} defaults 0 1
EOF
cat <<EOF | sudo tee "$strapdir/etc/rc.local" >/dev/null
#!/bin/sh
# rc.local for base images