I'm using Raspbian Jessie Lite, and during startup there's a line:

Started LSB: Apply config from /boot/os_config.json.

What is os_config.json? Is there documentation for it somewhere? What is it used for?

I'm trying to customize an image and that sounds like something I should look at, either to avoid building something myself that's already done or give me an idea of and/or do something I hadn't thought of.


os_config.json is used by NOOBS, and the message you are seeing comes from /etc/init.d/apply_noobs_os_config. This is left default enabled but I would presume it disables itself after the first run; i.e., somewhat like raspi-config it is run as a once only service. I'd also presume on a non-NOOBs system it does nothing.

What is it used for?

You'll find some examples if you search online but it mostly appears to be some basic stuff, e.g., this is from here (which is 3+ years old):

 "description" : "An XBMC media center distribution for Raspberry Pi",
 "flavour" : "RaspBMC",
 "imagefolder" : "/settings/os/RaspBMC",
 "keyboard" : "gb",
 "language" : "en",
 "partitions" : [
 "release_date" : "2013-08-20",
 "videomode" : 0

Some of this is likely for the NOOBS menu, and some of it maybe passed as options to the kernel or init -- in any case the general idea is pretty clear. I would not bother investigating further as I doubt this system will suit your purposes well.

I'm trying to customize an image and that sounds like something I should look at

This is ambiguous, but presuming you just want to automate installation, have a look around here for questions referencing puppet or chef (if you search separately, you will find more things). I notice this references a chef spin-off/fork/plugin/module (?) specifically for the Pi.

Personally, I find it easiest to just script that kind of thing myself, although this is no doubt dependent on how well you understand the OS, etc.

  • Ah, thanks, exactly what I was after. apply_noobs_os_config does in fact delete itself after first run (so you need to look at source or the mounted image prior to first boot). It actually runs raspi-config --apply-os-config, which runs this code. Interestingly, most of the stuff people are putting in that file is ignored, only flavour, language, and keyboard are actually used (and even then, with some rules -- see source).
    – gregmac
    Apr 18 '17 at 19:49
  • I'm actually trying to create a customized image, not just customize after boot. I'm also doing this from an automated build script -- it mounts the image, then uses proot (with qemu-arm) to execute customization inside. Running pi-gen fully automated from my CI environment (without just giving the build root access) was crazy complicated, plus I am only trying to add a single application so compiling the whole was redundant.
    – gregmac
    Apr 18 '17 at 20:06
  • And though this doesn't help me much, it was a quick fix for a minor annoyance I hadn't got to yet: the default gb keyboard layout doesn't allow me to type | from an us keyboard.
    – gregmac
    Apr 18 '17 at 20:08
  • I had not noticed that about raspi-config (I've ignored the NOOBS stuff) -- it would not be that hard to generalize the whole thing that way (maybe someone should...), although I guess in that case you might as well write something new. The sed line for parsing json is hacky (it's not really parsing json), but bash can source files with native associative arrays defined in them.
    – goldilocks
    Apr 19 '17 at 12:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.