I have not seen ONE installer that cares about disk partition alignment, and they all tend to default to 8 byte alignment.
This part is complicated, and probably the huge reason I avoid installing from ISO unless a lot has changed across releases.
In a VM environment:
Install normally like I described above.
- Prepare a normal OPNsense installation as I described above, installed in a VM, to a VDisk of 14GB
- Confirm in /etc/fstab, that the only mountpoint is correctly using the GPT label, instead of block device:
NO: /dev/vt...p1 OR /dev/ada0p1 ... ...
YES: /dev/gpt/efiboot0 /boot/efi msdosfs rw 2 2
- prepare another Vdisk, partition with gdisk. I usually use a Linux-based distro, the utilities on them tend to not get in my way when partitioning.
- Start the first partition, EFI type, at 1MB into the disk, with size 255MB.
- Create a 2nd partition, FreeBSD-pZFS type (a504 on gdisk), size of about 15GB.
- @nero355 It will start Aligned at 256MB.
- Still in Gdisk, Copy the names of the original partitions, efiboot0 and zfs0, respectively.
- I don't think FreeBSD cares about the File system labels as much as a Linux-based distro might.
- Format the EFI partition, mount both original and new EFI partitions, copy the contents of the original, over to the new one.
- I even add a separate installation of Memtest86+ with grub, attached with various menu options and serial output for headless firewalls.
- dd the original ZFS partition, over to the new one.
- Disconnect both Vdisks, and start the VM with the Newly created Vdisk.
- Use zpool -e zOPN /dev/vtblk0p2 to expand the ZFS pool to use the remaining space above the original 14GB.
Customize your VM Firewall as much as you need, to avoid repeat work for multiple deployments
compress the image, and now you have an aligned image, ready for deployment of course in the config, replace references to vtblkX to ataX/nvmeX, and vtnetX... to igbX etc, that way the newly deployed hardware starts up with the correct interfaces ready to go. You can use the same EFI partition to store some configs from a more familiar OS to you, log into the console, copy the config.xml to /conf and reboot immediately.
This part is complicated, and probably the huge reason I avoid installing from ISO unless a lot has changed across releases.
In a VM environment:
Install normally like I described above.
- Prepare a normal OPNsense installation as I described above, installed in a VM, to a VDisk of 14GB
- Confirm in /etc/fstab, that the only mountpoint is correctly using the GPT label, instead of block device:
NO: /dev/vt...p1 OR /dev/ada0p1 ... ...
YES: /dev/gpt/efiboot0 /boot/efi msdosfs rw 2 2
- prepare another Vdisk, partition with gdisk. I usually use a Linux-based distro, the utilities on them tend to not get in my way when partitioning.
- Start the first partition, EFI type, at 1MB into the disk, with size 255MB.
- Create a 2nd partition, FreeBSD-pZFS type (a504 on gdisk), size of about 15GB.
- @nero355 It will start Aligned at 256MB.
- Still in Gdisk, Copy the names of the original partitions, efiboot0 and zfs0, respectively.
- I don't think FreeBSD cares about the File system labels as much as a Linux-based distro might.
- Format the EFI partition, mount both original and new EFI partitions, copy the contents of the original, over to the new one.
- I even add a separate installation of Memtest86+ with grub, attached with various menu options and serial output for headless firewalls.
- dd the original ZFS partition, over to the new one.
- Disconnect both Vdisks, and start the VM with the Newly created Vdisk.
- Use zpool -e zOPN /dev/vtblk0p2 to expand the ZFS pool to use the remaining space above the original 14GB.
Customize your VM Firewall as much as you need, to avoid repeat work for multiple deployments
compress the image, and now you have an aligned image, ready for deployment of course in the config, replace references to vtblkX to ataX/nvmeX, and vtnetX... to igbX etc, that way the newly deployed hardware starts up with the correct interfaces ready to go. You can use the same EFI partition to store some configs from a more familiar OS to you, log into the console, copy the config.xml to /conf and reboot immediately.
"