linux-automation / meta-lxatac

Build your own LXA TAC images and bundles
MIT License
5 stars 15 forks source link

meta-lxatac-bsp: base-files: add fstab with explicit mount for /srv #24

Closed hnez closed 1 year ago

hnez commented 1 year ago

We have previously relied on systemd-gpt-auto-generator to automatically generate a srv.mount unit based on the partition type of the data partiton. The data partition is created on first boot by systemd-repart.

This results in /srv not being mounted on first boot as systemd-generators run very early in the boot process, long before systemd-repart had a chance to create the partition.

Add a fstab (mostly the default fstab from poky) that includes an explicit /srv mount.

hnez commented 1 year ago

An alternative to this could also be to stay with the default poky fstab and deploying a srv.mount unit. A drawback both options is that the PARTUUID we match on is searched on all block devices, which could in theory lead to confusion with removable media.

systemd-gpt-auto-generator is smart enough to only consider partitions on the same device as our other system partitions.

Another option is to have a look at running systemd-gpt-auto-generator again after systemd-repart. I don't know how frowned upon that would be.

michaelolbrich commented 1 year ago

What happens if you run systemctl daemon-reload after systemd-repart? It should create the mount unit, but I'm not sure if it will be mounted immediately.

hnez commented 1 year ago

PR #42 is a cleaner attempt to solve the same issue. I will close this PR.