aurae-runtime / auraed

Secure mTLS and gRPC backed runtime daemon. Alternative to systemd. Written in Rust.
https://aurae.io/auraed
Apache License 2.0
60 stars 11 forks source link

mount kernel filesystems if run as pid1 #18

Closed Vincinator closed 2 years ago

Vincinator commented 2 years ago

Hi aurae community,

This PR adds first steps to make auraed boot as pid1, mainly mounting the kernel filesystems (devfs, procfs and sysfs), but also some minor fixes to make auraed boot without kernel panic.

ToDo:

How to test

Steps to run auraed as pid in a qemu vm are documented in the hack/README.md. Copy pasted them here:

make build-container
make kernel
make initramfs

# create `vm-br0` bridge on your machine:
make network

# run auraed in a VM as pid 1:
make virsh-start virsh-console virsh-stop

# exit VM console with Ctrl+]
Screenshot 2022-09-27 at 17 01 29

Links

[1] https://docs.rs/syslog/latest/src/syslog/lib.rs.html#232-243

cla-bot[bot] commented 2 years ago

In order to contribute to an Aurae project you must sign and agree to the CLA.

MalteJ commented 2 years ago

@cla-bot check

cla-bot[bot] commented 2 years ago

In order to contribute to an Aurae project you must sign and agree to the CLA.

cla-bot[bot] commented 2 years ago

Rechecking your CLA permissions. Remember to add your GitHub username to the .clabot file. You can run @cla-bot check any time to check again.

Vincinator commented 2 years ago

@cla-bot check

cla-bot[bot] commented 2 years ago

In order to contribute to an Aurae project you must sign and agree to the CLA.

cla-bot[bot] commented 2 years ago

Rechecking your CLA permissions. Remember to add your GitHub username to the .clabot file. You can run @cla-bot check any time to check again.

cla-bot[bot] commented 2 years ago

In order to contribute to an Aurae project you must sign and agree to the CLA.

MalteJ commented 2 years ago

@cla-bot check

cla-bot[bot] commented 2 years ago

Rechecking your CLA permissions. Remember to add your GitHub username to the .clabot file. You can run @cla-bot check any time to check again.

krisnova commented 2 years ago

Non blocker however I am wondering about the name system for a module for init. This seems to be overloaded. I am unsure how I feel about it. Does anyone else have any thoughts?

Vincinator commented 2 years ago

Non blocker however I am wondering about the name system for a module for init. This seems to be overloaded. I am unsure how I feel about it. Does anyone else have any thoughts?

My vote goes to naming it init. Current scope is just initialization of stuff for the user space.

Vincinator commented 2 years ago

@kris-nova this PR is ready to be merged from my point of view Thanks for your feedback!

krisnova commented 2 years ago

Note for myself. Configuration to remove /proc procfs(5) is in this issue: https://github.com/aurae-runtime/auraed/issues/25