I am currently running the Morello FVP on a CheriBSD instance, built with the cheribuild script.
I added a test file (helloworld.txt) to the root filesystem of the machine under ~/cheri/output/rootfs-morello-purecap/root
I then rebuilt the machine and disk image with ./cheribuild.py run-fvp-morello-purecap -d
I assumed this would take into account the changes I've made, and would rebuild the machine/disk image to include them. However, when going to /root on the CheriBSD instance after rebuilding, the file isn't there. It has also been removed from the host system under ~/cheri/output/rootfs-morello-purecap/root
Why is this happening? And what is the best way to make amendments to a CheriBSD instance, such as adding files, so that when the machine is rebuilt/booted with the cheribuild script they are included?
samDobson said:Just done this with the --logfile option so I can have a look at the build steps in detail. In which directory is this logfile produced?
~/cheri/build/nginx-morello-purecap-build/ will have .log files, but those are solely for the output from running configure and make. The output from cheribuild itself isn't saved anywhere.
samDobson said:Brilliant I'll give this a shot! Just to confirm, would it be --run-morello-purecap/extra-tcp........ or --run-fvp-morello-purecap/extra-tcp.........
It depends whether your using our Morello QEMU or Arm's Morello FVP.
samDobson said: I've navigated to it's directory at /opt/morello-purecap/postgres/bin and I can't seem to start the postgres service with ./postgres as I get this error message below, any ideas?
As it says you need to tell it where your data directory is.
samDobson said:There is also no entry for the postgres service in /etc/rc.d
Upstream PostgreSQL doesn't provide an rc.d file, if you want one you'll have to copy it from the FreeBSD Ports tree at https://github.com/freebsd/freebsd-ports/blob/main/databases/postgresql14-server/files/postgresql.in or write your own. Note that this includes passing -D to address the above error.
samDobson said:I also can't create a database with ./createdb as I am met with this error message:
createdb and initdb are different things. The former is for adding new databases to a running PostgreSQL instance. The latter is for setting up the first database that a server can then be started with. See https://www.postgresql.org/docs/current/creating-cluster.html and https://www.postgresql.org/docs/current/manage-ag-createdb.html. You'll need to run initdb pointed at where you want the data directory to be.