Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jul 2022 15:07:23 -0700
From:      "Pat Maddox" <pat@patmaddox.com>
To:        freebsd-cloud@FreeBSD.org
Subject:   GCP ZFS-on-Root (working, and some questions)
Message-ID:  <360A7428-8A37-428D-BACE-6335A7AA6554@patmaddox.com>

next in thread | raw e-mail | index | archive | help
Hey there, I have taken some of the concepts and scripts that Colin used 
to make the AWS AMI Builder (thank you!!), and used them to configure a 
ZFS-on-Root image for GCP.

Here’s the script: 
https://gist.github.com/patmaddox/1a0be973ecfce4f056c517abb7746286

I did it slightly differently from the AMI builder. Instead of working 
in a mem disk, I just fetch base.txz and expand it to a dir, edit the 
files, etc.

One other difference is that because base.txz doesn’t include a 
kernel, I `cp -Rp /boot/kernel/ /mnt/boot/kernel/`.

It boots, I can SSH and do all the usual things, so far I am very happy.

My questions:

1. Is there anything I might be missing with the approach of extracting 
base.txz, and copying over the current instance’s kernel?
2. If I change the GCP disk size and reboot, the partition table is 
corrupt. I need to `geom part recover da0 && geom part resize -i 2 da0` 
to resize it. How can I have that happen automatically during the boot 
process, the way that the AMI does?

Pat



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?360A7428-8A37-428D-BACE-6335A7AA6554>