Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boot_folder: explain how to use firstboot #1701

Closed
wants to merge 1 commit into from

Conversation

fasmide
Copy link

@fasmide fasmide commented Oct 20, 2020

Documentation for the changes found in the firstboot merge request: RPi-Distro/raspberrypi-sys-mods#40

Let me know what you think :)

@lurch
Copy link
Contributor

lurch commented Oct 20, 2020

Doesn't make sense to merge this until after the linked PR has been merged (and included in a Raspberry Pi OS release), so I'll mark this as 'draft' for now...

@lurch lurch marked this pull request as draft October 20, 2020 18:16
configuration/boot_folder.md Outdated Show resolved Hide resolved
configuration/boot_folder.md Outdated Show resolved Hide resolved
@fasmide fasmide force-pushed the firstboot-docs branch 2 times, most recently from 673a27c to ba6ae8c Compare October 20, 2020 18:37
@@ -43,6 +43,14 @@ When this file is present, SSH will be enabled on boot. The contents don't matte

This is the file to configure wireless network settings (if the hardware is capable of it). Edit the country code and the network part to fit your case. More information on how to use this file can be found in [the `wireless/headless` section](./wireless/headless.md).

### run_once

If a `/boot/run_once` executable exists at boot time, Raspberry Pi OS executes it on the first boot. It may contain bash, python, or any executable ARM binary. After execution, `run_once` will be renamed to `run_once.XXX`. Later reboots will know `run_once.XXX` was already executed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess technically it's "executes it on the next boot" rather than just "first boot" ? (I think there's nothing which means it only runs programs on first boot?)


If a `/boot/run_once` executable exists at boot time, Raspberry Pi OS executes it on the first boot. It may contain bash, python, or any executable ARM binary. After execution, `run_once` will be renamed to `run_once.XXX`. Later reboots will know `run_once.XXX` was already executed.

Use it to provision your Raspberry Pi using simple scripts or initializing configuration management like cloud-init, puppet or ansible.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slight grammar inconsistency between "provision" and "initializing".


Use it to provision your Raspberry Pi using simple scripts or initializing configuration management like cloud-init, puppet or ansible.

Once the system has booted, view status and script output with `systemctl status run_once` and `journalctl -u run_once`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would probably be clearer if this was more verbose: "view status with systemctl status run_once and view script output with journalctl -u run_once." ?

And perhaps "script output" isn't the right terminology, as earlier on you say "or any executable ARM binary" ?

@aallan
Copy link
Contributor

aallan commented Jun 7, 2021

I'd encourage you to wrap this PR up in the next week or so as we're in the process of transitioning the documentation from the current Markdown-based source format to Asciidoc. At some point soon — probably around the end of June, beginning of July — we will freeze the current documentation repo. After that time contributions and PRs based on the Markdown source will not be accepted, and any PRs that are still open will be closed.

See #1911 for full details.

@aallan
Copy link
Contributor

aallan commented Jun 7, 2021

Been in draft since December. Marking for 7 day closure.

@fasmide
Copy link
Author

fasmide commented Jun 8, 2021

@aallan thanks for reaching out - the RPi-Distro/raspberrypi-sys-mods#40 pull request which this documentation describes proved to be somewhat controversial

So ill just wait and see where it ends. It should be possible to recreate this pull request when the time comes :)

@fasmide fasmide closed this Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants