this post was submitted on 30 Oct 2023
6 points (100.0% liked)

Self-Hosted Main

511 readers
1 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

For Example

We welcome posts that include suggestions for good self-hosted alternatives to popular online services, how they are better, or how they give back control of your data. Also include hints and tips for less technical readers.

Useful Lists

founded 1 year ago
MODERATORS
 

Hey fellow self-hosters!

Not directly related to self-hosting, but since it looks like quite a few people here (like me) are using Raspberry PIs to self-host stuff, I thought some people might be interested.

I use my Raspberry Pi as a NAS, and I'm using Ansible to automate the whole setup. After trying some stuff and experimenting a bit, I like to start again with a clean install and run my Ansible playbook to have a clean setup.

But I'm not always home when I do stuff with my Pi and thought it would be useful to have a way to reflash it remotely, so I could continue to break stuff and just reflash it when it gets too messy.

So I made a script to remotely reflash the Raspberry Pi. The main idea is that after flashing the SD card with the Raspi Imager, I make a copy of the bootfs and rootfs partitions, and when I need to reset the Pi to the initial state, I restore both copies of the partitions.

I wrote a step-by-step guide explaining everything:

https://gist.github.com/lilianmallardeau/04368e95bc97eb9738fba13df3bbfe4a

Feel free to use it if you like!

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 1 points 1 year ago (1 children)

Please elaborate how to overlay rootfs.

[โ€“] [email protected] 1 points 1 year ago

Configure your raspberry pi os properly, then use raspi-config to switch to overlay root filesystem. You can switch back (using raspi-config) if you want to make changes to your os.

See https://learn.adafruit.com/read-only-raspberry-pi/overview