summaryrefslogtreecommitdiffstats
path: root/units/systemd-repart.service.in (follow)
Commit message (Collapse)AuthorAgeFilesLines
* repart: Don't fail on boot if we can't find the root block deviceDaan De Meyer2023-09-221-0/+2
| | | | | | When booting from virtiofs, we won't be able to find a root block device. Let's gracefully handle this similar to how we don't fail if we can't find a GPT partition table.
* Revert "units: Import all repart credentials in systemd-repart.service"Daan De Meyer2023-08-011-1/+0
| | | | This reverts commit ed6b99dbf121f8ad3e68a1eb8e2fff4d4bdf3066.
* units: Import all repart credentials in systemd-repart.serviceDaan De Meyer2023-08-011-0/+1
|
* Drop split-usr and unmerged-usr supportLuca Boccassi2023-07-281-1/+1
| | | | | | | | | | As previously announced, execute order 66: https://lists.freedesktop.org/archives/systemd-devel/2022-September/048352.html The meson options split-usr, rootlibdir and rootprefix become no-ops that print a warning if they are set to anything other than the default values. We can remove them in a future release.
* units/systemd-repart: stop pretending that root config is executed in the initrdZbigniew Jędrzejewski-Szmek2023-05-231-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have a system with /usr/lib/repart.d/50-root.conf with GrowFileSystem=yes. The partition wouldn't be resized in the initrd, because ConditionDirectoryNotEmpty=|/sysusr/usr/lib/repart.d was evaluated very early, before /sysroot was mounted. There was no ordering dependency between systemd-repart.service and sysroot.mount. (There was After=initrd-usr-fs.target, but it seems to be only referred to by systemd-fstab-generator, which in my case doesn't even run, because there's no fstab.) But in fact, we neeed to run systemd-repart in the initrd only in limited circumstances: when we need to create the root device based on config under sysusr.mount. If there is config on the root device, it can be executed in the host system, early during boot. Thus, let's remove the condition on /sysroot/…. Without an ordering dependency on sysroot.mount, it was subject to a race condition anyway. (A race condition with a low probability of "winning", because systemd-repart.service has no dependencies, but sysroot.mount requires a device to be detected and the mount to happen.) The other problem was that systemd-repart.service didn't have the ordering wrt. initrd-switch-root.target, so it was subject to the same race condition that was fixed for other units in 7c0e2b555968d70ac563a37e32a6931ee90961a6. (If the systemd-repart.service/stop job is slow, we could end up not restarting systemd-repart.service in the host system.) With the changes here, I see systemd-repart.service/start running twice: in the initrd it is skipped because the conditions fail, and then in the host system it runs normally. Note: support for /sysroot is retained in systemd-repart code. I don't see a strong reason to remove it, since it may still be useful to people invoking repart in the initrd in other circumstances.
* units: do more reordering of ordering configZbigniew Jędrzejewski-Szmek2023-05-231-5/+8
| | | | | | | | | | | | | No functional change, just a cleanup to make the subsequent changes easier to see. This is a continuation of 9810e419425263bde86787bc21251f1ad3c35628 > The block is reordered and split to have: > 1. description + documentation > 2. (optionally) conditions > 3. all the dependencies The dependencies for shutdown.target are listed separately because they are the other deps are for startup, and shutdown.target only matter much later.
* units: pull in loop.ko and dm-mod.ko before repartLennart Poettering2022-12-231-1/+2
| | | | | | | | | | | | | | | We want to make use of that when formatting file systems, hence let's pull in these modules explicitly. (This is necessary because we are an early boot service that might run before systemd-tmpfiles-dev.service, which creates /dev/loop-control and /dev/mapper/control.) Alternatively we could just order ourselves after systemd-tmpfiles-dev.service, but I think there's value in adding an explicit minimal ordering here, since we know what we'll need. Fixes: #25775
* meson: use jinja2 for unit templatesZbigniew Jędrzejewski-Szmek2021-05-191-1/+1
| | | | | | | | | We don't need two (and half) templating systems anymore, yay! I'm keeping the changes minimal, to make the diff manageable. Some enhancements due to a better templating system might be possible in the future. For handling of '## ' — see the next commit.
* units: fix repart conditions to run if definitions exist in /sysroot + /sysusrLennart Poettering2021-04-211-0/+5
| | | | | The systemd-repart code was already smart enough to look for definitions there, but the unit file conditions made that pointless. Let's fix that.
* fstab-generator: if usr= is specified, mount it to /sysusr/usr/ firstLennart Poettering2021-04-201-1/+1
| | | | | | | | | | | | | | | This changes the fstab-generator to handle mounting of /usr/ a bit differently than before. Instead of immediately mounting the fs to /sysroot/usr/ we'll first mount it to /sysusr/usr/ and then add a separate bind mount that mounts it from /sysusr/usr/ to /sysroot/usr/. This way we can access /usr independently of the root fs, without for waiting to be mounted via the /sysusr/ hierarchy. This is useful for invoking systemd-repart while a root fs doesn't exist yet and for creating it, with partition data read from the /usr/ hierarchy. This introduces a new generic target initrd-usr-fs.target that may be used to generically order services against /sysusr/ to become available.
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* units: run systemd-repart only if there's configuration for itLennart Poettering2020-04-021-0/+4
|
* Revert "units: make systemd-repart.service installable"Lennart Poettering2020-04-021-4/+0
| | | | | | | | | | | | | | | | | | | | This reverts commit 7e1ed1f3b29162df25064b33dc55ac8cf432bb0b. systemd-repart is not a user service that should be something people enable/disable, instead it should just work if there's configuration for it. It's like systemd-tmpfiles, systemd-sysusers, systemd-load-modules, systemd-binfmt, systemd-systemd-sysctl which are NOPs if they have no configuration, and thus don't hurt, but cannot be disabled since they are too deep part of the OS. This doesn't mean people couldn't disable the service if they really want to, there's after all "systemctl mask" and build-time disabling, but those are OS developer facing instead of admin facing, that's how it should be. Note that systemd-repart is in particular an initrd service, and so far enable/disable state of those is not managed anyway via "systemctl enable/disable" but more what dracut decides to package up and what not.
* units: make systemd-repart.service installableZbigniew Jędrzejewski-Szmek2020-03-311-1/+5
| | | | | | This essentially adds another layer of configurability: build disable, this, presence of configuration. The default is set to enabled, because the service does nothing w/o config.
* units: add unit file for systemd-repart to automatically run at bootLennart Poettering2020-01-201-0/+25