Access permanent data
Create the filesystem
gokrazy provides a handy way to create the permanent data filesystem on the fourth partition of your gokrazy installation.
The gokrazy/mkfs program will create the filesystem.
To actually access the permanent data partition from your own program, gokrazy will mount the partition under /perm directory during the startup.
You can add the gokrazy/mkfs program to your gokrazy instance:
…or, if you want to run it only once without otherwise including it in your
installation, you can use gok run:
Permanent data in action
The Go program demonstrates the functionality of the permanent data mount:
Manual inspection/modification
You can inspect and modify the data on the permanent data filesystem manually. This can be handy if you need e.g. to pass a configuration file for your application. To access the filesystem put the SD card into your PC/notebook. Your OS will likely mount the filesystem automatically. Copy the file to the permanent data filesystem.
If you want to access files on the permanent data filesystem you may need the sudo capability.
Notes about macOS
In macOS, to identify what device file maps to the mini sd card use:
If you want to create an ext4 filesystem from macOS, use the ext2/3/4 utilities. The easiest way to install them is via homebrew.
With the utilities installed you can run (replace X and Y based on the diskutil list output):