Skip to content

Printer-side layout

This page maps the printer's storage: which parts are read-only, where OpenCreator installs itself, and where to find configs, logs and saved state. Paths are the ones on the printer's SoC. On a tunneled printer, Klipper's config and logs are on the SBC instead (see OpenCreator for SBC).

Partitions and mounts

Mount What it is Writable
/ FlashForge's root file system, a squashfs image (/dev/mmcblk0p4) No. With OpenCreator's own kernel, some folders get a writable layer (below)
/usr/prog FlashForge's program partition: app_startup.sh, PROGRAM/ (the firmwareExe launcher, the MCU flashing tools, kernel packages), the stock Python 3.8, nginx, Moonraker, mjpg-streamer and the Wi-Fi config Yes
/usr/data The user data partition (ext4). Almost everything OpenCreator installs lives here Yes
/etc Bind-mounted from /usr/prog/etc by stock's app_startup.sh (or by the early boot hook after 60 s) Yes
/opt Entware, bind-mounted from /usr/data/bin/opt at boot Yes
/tmp A small RAM disk, emptied at every boot Yes

The installer changes nothing on the root file system. It installs on /usr/prog and /usr/data only, and the only file it replaces in FlashForge's program folder is /usr/prog/PROGRAM/software/firmwareExe (a copy of the original is kept). Stock mounts /usr/data and /usr/prog with the sync option; the installer drops it while it runs, so package installs don't wait for the flash on every write, and puts it back when it exits.

With OpenCreator's kernel (not FlashForge's), /bin, /sbin, /lib, /usr/bin, /usr/sbin and /usr/lib get a writable layer kept in /usr/data/overlay, and the kernel adds compressed swap in RAM. See Early boot and recovery stick.

FlashForge's kernels run the eMMC at 25 MHz. At every boot, 09-emmc-clock.sh raises it to 100 MHz (see Boot and services).

What's in /usr/data

Path What it holds
/usr/data/opencreator/klipper/klipper The Kalico checkout
/usr/data/opencreator/klipper/klippy-env Kalico's virtualenv, on the hard-float Python
/usr/data/opencreator/klipper/config The live printer config Klipper and Moonraker read
/usr/data/opencreator/klipper/logs printer.log, moonraker.log, AFC.log
/usr/data/opencreator/klipper/gcodes A link to /usr/data/gcodes, where uploaded print files are kept
/usr/data/opencreator/opencreator-fs The opencreator-fs checkout Moonraker's update manager pulls (the opencreator entry)
/usr/data/opencreator/startup The startup system: startup.sh, startup/scripts/*.sh, the updater and helper commands
/usr/data/opencreator/firmware The firmwareExe launcher, the early boot hook driver.sh and the boot progress screen, as installed copies
/usr/data/opencreator/moonraker OpenCreator's Moonraker components and graph scripts
/usr/data/opencreator/mcu-flash oc-mcu-flash, the live MCU flasher
/usr/data/opencreator/mcu-flash-pending An MCU flash queued for the next power-on, when there is one
/usr/data/opencreator/plugin-manager oc-plugin and the plugin catalog
/usr/data/opencreator/plugins Installed plugins, one git checkout each
/usr/data/opencreator/tunneled The tunnel-mode boot script and oc-tunneled
/usr/data/opencreator/install.json The install record: installer version, model, mode, web UI, touchscreen, backup location
/usr/data/python-hf The hard-float Python that Kalico and Moonraker run on
/usr/data/bin/opt Entware (mounted at /opt)
/usr/data/mainsail, /usr/data/fluidd The web UIs
/usr/data/nginx nginx's site config and OpenCreator's snippets in conf.d/
/usr/data/grumpyscreen, /usr/data/helixscreen The touchscreen UIs, when installed
/usr/data/firmwareRes/config Stock-format calibration data: extruder.json, zoffset.json and test.json
/usr/data/logs Logs from the boot scripts and MCU flashing (below)

Moonraker runs with /usr/data/opencreator/klipper as its data folder, so its config, logs and gcodes are the ones above. G-code storage is configured at /usr/data/gcodes ([virtual_sdcard] in printer.base.cfg).

The config tree

printer.cfg is the file Klipper reads. It includes printer.override.cfg, printer.base.cfg, printer.macro.cfg, printer.motor.cfg, mainsail.cfg, the KAMP_LiTE files, printer.power_loss_recovery.cfg, the MPC files and, when you turn one on, an ACE config from ace/. printer.base.cfg holds the machine itself (the four MCUs, the [mclib stepper_*] motor sections, fans, the motion guard) and includes the filament, probe, mesh, vibration, Creator 5 toolchanger, Misc and AFC files. What each file holds is listed in Making the configs yours.

The config layout is originally based on FlashForge's default config layout, just expanded with new macros, settings, and removals of useless settings. This does not mean our config is interchangable with stock firmware, and if you try, it will not work as a lot of settings are intertwined with our Kalico.

The Creator 5 has no chamber heater, chamber fans or aux fan, so those are in printer.pro.cfg. They're only included on a Creator 5 Pro, through printer.model.cfg. On the printer, that file is written at every boot by 10-klipper.sh, from the model in the stock boot script (MACHINE= in /usr/prog/app_startup.sh). If the model can't be read and the file is missing, it assumes a Creator 5 Pro. In tunnel mode, the Pi installer asks which printer it's connected to. On a Creator 5, M106/M107 P2 and P3 do nothing, and M191 says there's no chamber heater instead of failing.

Some files are written by the installer or the printer, not shipped as templates: printer.model.cfg, printer.accessory.*.cfg (for example the VDS dryer, turned on when the installer finds one answering on /dev/ttyS3), c5_misc_variables.cfg (the switch states), AFC/AFC.var.unit (AFC's state; 10-klipper.sh creates it as {} when it's missing, since AFC stops with an error without it) and camera.conf (which camera streamer to run). Graphs from calibration go in input_shaper/ and vfa/ in the same folder, so you can open them from the web UI.

The updater keeps its own state next to the configs, in .opencreator-updater/: the base copy of every template it last applied (base/), the last applied commit, and which MCU firmware it last flashed. See Firmware, installer and updates.

Logs

Log What writes it
/usr/data/opencreator/klipper/logs/printer.log Klippy
/usr/data/opencreator/klipper/logs/moonraker.log Moonraker
/usr/data/opencreator/klipper/logs/AFC.log AFC
/tmp/early.log The early boot hook driver.sh
/tmp/opencreator.log firmwareExe, startup.sh and the service loops
/tmp/<script>.log Each startup script's own output, for example /tmp/10-klipper.sh.log
/tmp/opencreator-updater.log The updater
/tmp/oc-plugin-boot.log Plugins' startup items
/usr/data/logs/c5-mcu-wake.log The MCU wake script
/usr/data/logs/usb.log USB serial and USB Ethernet setup
/usr/data/logs/oc-mcu-flash.log Live MCU flashing
/usr/data/logs/oc-mcu-flash-pending.log MCU flashing at power-on

Logs in /tmp are gone after a reboot. support-zip.sh in startup/commands/ packs the recent logs, the configs (with URLs, passwords, tokens and keys removed) and system details into support.zip in the config folder.

Saved state outside the config

File What
/usr/data/opencreator/.clock The last saved time, restored at boot (the printer has no hardware clock)
/usr/data/opencreator/timezone, timezone.auto The touchscreen's timezone: yours, or the one looked up from the network
/usr/data/opencreator/.camera-ip The printer's last address, so camera URLs can follow a new one
/usr/data/opencreator/.loopscript-commit The opencreator-fs commit the updater last applied to OpenCreator's own folders
/usr/data/opencreator/.installed/<folder>.md5 What the installer or updater installed in each OpenCreator folder
/usr/data/opencreator/mcu-firmware.commit The MCU firmware the installer last flashed