summaryrefslogtreecommitdiff
path: root/src/fstab-generator
Commit message (Collapse)AuthorAge
* fstab-generator: fix trivial leakZbigniew Jędrzejewski-Szmek2014-07-07
|
* fstab-generator: allow x-systemd.device-timeout for swap unitsZbigniew Jędrzejewski-Szmek2014-06-30
|
* Move x-systemd-device.timeout handling from core to fstab-generatorZbigniew Jędrzejewski-Szmek2014-06-30
| | | | | | | | | | | | | Instead of adjusting job timeouts in the core, let fstab-generator write out a dropin snippet with the appropriate JobTimeout. x-systemd-device.timeout option is removed from Options= line in the generated unit. The functions to write dropins are moved from core/unit.c to shared/dropin.c, to make them available outside of core. generator.c is moved to libsystemd-label, because it now uses functions defined in dropin.c, which are in libsystemd-label.
* fstab-generator: simplify add_root_mountZbigniew Jędrzejewski-Szmek2014-06-23
|
* stop complaining about unknown kernel cmdline optionsLennart Poettering2014-06-19
| | | | | Also stop warning about unknown kernel cmdline options in the various tools, not just in PID 1
* fstab-generator: when running in a container, ignore fstab entries referring ↵Lennart Poettering2014-03-11
| | | | | | | | | | | to device nodes Since these device nodes will never appear in the container anyway there's no point in waiting for them. This makes it easier to boot images generated with general purpose installers like Anaconda which unconditionally populate /etc/fstab to boot in containers.
* fstab-generator: the root partition is not optionalLennart Poettering2014-03-07
|
* fstab-generator: merge /proc/cmdline parsing loops into oneLennart Poettering2014-03-07
|
* generators: add Documentation= fields that point to the generator man pagesLennart Poettering2014-03-06
|
* util: move more intellegince into parse_proc_cmdline()Lennart Poettering2014-03-06
| | | | | Already split variable assignments before invoking the callback. And drop "rd." settings if we are not in an initrd.
* generators: rework mount generatorsLennart Poettering2014-03-06
| | | | | | | | | | | | | - Add support for finding and mounting /srv based on GPT data, similar to how we already handly /home. - Share the fsck logic between GPT, EFI and fstab generators - Make sure we never run the EFI generator inside containers - Drop DefaultDependencies=no from EFI mount units - Other fixes
* Extract looping over /proc/cmdline into a shared functionZbigniew Jędrzejewski-Szmek2014-02-17
| | | | | | | In cryptsetup-generator automatic cleanup had to be replaced with manual cleanup, and the code gets a bit longer. But existing code had the issue that it returned negative values from main(), which was wrong, so should be reworked anyway.
* fstab-generator: Create fsck-root symlink with correct pathColin Guthrie2014-02-10
| | | | | | This was noticed in Brussels at the hackfest. The fstab-generator currently creates a broken symlink pointing to itself in /run/systemd/generator/local-fs.target.wants/ for systemd-fsck-root.service
* fstab-generator: Do not try to fsck non-devicesThomas Bächler2013-12-21
| | | | | | This fixes a regression introduced in 64e70e4 where the mount fails when fstab is misconfigured with fs_passno > 0 on a virtual file system like nfs, and the type is specified as "auto".
* fstab-generator: use RequiresOverridable for fsck unitsZbigniew Jędrzejewski-Szmek2013-11-15
| | | | | | | | | | | | | | | | | | This allows the user to disable fsck's by masking. If fsck fails, emergency target is started, the user might mount the unit using mount and disable fsck by masking the unit. In this case, .mount will be active because the mount is detect through /proc/self/mountinfo, but systemd-fsck@.service will still be in failed mode. This results in a funny situation where $ systemctl show -p ActiveState local-fs.target yyy.mount ActiveState=active ActiveState=active $ sudo systemctl start local-fs.target [sudo] password for test: Failed to start local-fs.target: Unit systemd-fsck@xxx.service is masked.
* fsck,fstab-generator: be lenient about missing fsck.<type>Zbigniew Jędrzejewski-Szmek2013-11-15
| | | | | | | | | | | | | If fstab contains 1 for passno, treat this as an error, but only warn briefly. If fstab doesn't contain this information, don't complain at all. Patch is complicated a bit by the fact that we might have the fstype specified in fstab or on /proc/cmdline, in which case we can check if we have the appropriate fsck tool, or not specified, or specified as auto, in which case we have to look and check the type of the filesystem ourselves. It cannot be done before the device appears, so it is too early in the generator phase, and it must be done directly in fsck service.
* util: unify reading of /proc/cmdlineLennart Poettering2013-11-06
| | | | | | Instead of individually checking for containers in each user do this once in a new call proc_cmdline() that read the file only if we are not in a container.
* fsck-root: only run when requested in fstabTom Gundersen2013-10-19
| | | | | | fsck-root is redundant in case an initrd is used, or in case the rootfs is never remounted 'rw', so the new default is the correct behavior for most users. For the rest, they should enable it in fstab.
* fstab-generator: Generate explicit dependencies on systemd-fsck@.service ↵Thomas Bächler2013-10-19
| | | | | | | | | instead of using FsckPassNo [tomegun: * order all fsck instances after fsck-root * check for OOM * added notes in the manpages]
* fstab-generator: When parsing the root= cmdline option, set FsckPassNo to 1Thomas Bächler2013-10-19
| | | | | | [tomegun: without this we would never fsck the rootfs if it was directly mounted 'rw' from the initrd. We now risk fsck'ing it twice in the case it is mounted 'ro', so that should be addressed in a separate patch.]
* Introduce _cleanup_endmntent_Zbigniew Jędrzejewski-Szmek2013-10-03
|
* Remove six unused variables and add annotationZbigniew Jędrzejewski-Szmek2013-09-17
| | | | clang FTW!
* swap: create .wants symlink to 'auto' swap devicesTom Gundersen2013-09-16
| | | | | | | | | | | As we load unit files lazily, we need to make sure something pulls in swap units that should be started automatically, otherwise the default dependencies will never be applied. This partially reinstates code removed in commit 64347fc2b983f33e7efb0fd2bb44e133fb9f30f4. Also don't order swap devices after swap.target when they are 'nofail'.
* swap: handle nofail/noauto in coreTom Gundersen2013-09-11
|
* mount: move device links handling from generatorTom Gundersen2013-09-11
| | | | | | | This makes mount units work like swap units: when the backing device appears the mount unit will be started. v2: the device should want the mount unconditionally, not only for DefaultDependencies=yes
* fstab-generator: use DefaultDependencies=yesTom Gundersen2013-09-11
| | | | This removes some redundancy between the generator and the core mount handling.
* fstab-generator: log_oom() if automount_name is nullWANG Chao2013-08-14
|
* fstab-generator: read rd.fstab=on/off switch correctlyWANG Chao2013-08-09
|
* fstab-generator: respect noauto/nofail when adding sysroot mountWANG Chao2013-08-09
| | | | | | | Currently we don't respect noauto/nofail root mount options (from rootflags kernel cmdline). We should map these two flags to the corresponding boolean variable noauto and nofail when calling add_mount().
* move _cleanup_ attribute in front of the typeHarald Hoyer2013-04-18
| | | | http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html
* Always use errno > 0 to help gccZbigniew Jędrzejewski-Szmek2013-03-29
| | | | | | gcc thinks that errno might be negative, and functions could return something positive on error (-errno). Should not matter in practice, but makes an -O4 build much quieter.
* unit: replace remote-fs-setup.target by network-online.targetLennart Poettering2013-03-29
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=787314
* fstab-generator: drop x-initrd.rootfs mount optionHarald Hoyer2013-03-26
| | | | | | | | | | | x-initrd.mount now has different meanings, if fstab-generator is called in the initramfs. initrd:/etc/fstab and x-initrd.mount defines mounts for the initrd-root-fs.target initrd:/sysroot/etc/fstab and x-initrd.mount defines mounts for the initrd-fs.target
* fstab-generator: degrade the message about missing "root=" to log_debugHarald Hoyer2013-03-26
| | | | | Some installation media (fedora at least) does not have and need a "root=" argument on the kernel command line.
* units: introduce remote-fs-setup.target to pull in dependencies from remote ↵Lennart Poettering2013-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | mounts This introduces remote-fs-setup.target independently of remote-fs-pre.target. The former is only for pulling things in, the latter only for ordering. The new semantics: remote-fs-setup.target: is pulled in automatically by all remote mounts. Shall be used to pull in other units that want to run when at least one remote mount is set up. Is not ordered against the actual mount units, in order to allow activation of its dependencies even 'a posteriori', i.e. when a mount is established outside of systemd and is only picked up by it. remote-fs-pre.target: needs to be pulled in automatically by the implementing service, is otherwise not part of the initial transaction. This is ordered before all remote mount units. A service that wants to be pulled in and run before all remote mounts should hence have: a) WantedBy=remote-fs-setup.target -- so that it is pulled in b) Wants=remote-fs-pre.target + Before=remote-fs-pre.target -- so that it is ordered before the mount point, normally.
* fstab-generator: add missing strempty() callsMantas Mikulėnas2013-03-25
|
* fstab-generator: fix minor memory leak on error pathLennart Poettering2013-03-25
|
* fstab-generator: add missing OOM checkLennart Poettering2013-03-25
|
* fstab-generator: rename x-initrd-rootfs.mount to x-initrd.rootfsLennart Poettering2013-03-25
| | | | | | This changes the fstab mount option x-initrd-rootfs.mount to x-initrd.rootfs, in order to only use a single namespace "x-initrd." for all mount options of the initrd.
* Make initrd.target the default target in the initrdHarald Hoyer2013-03-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First, rename root-fs.target to initrd-root-fs.target to clarify its usage. Mount units with "x-initrd-rootfs.mount" are now ordered before initrd-root-fs.target. As we sometimes construct /sysroot mounts in /etc/fstab in the initrd, we want these to be mounted before the initrd-root-fs.target is active. initrd.target can be the default target in the initrd. (normal startup) : : v basic.target | ______________________/| / | | sysroot.mount | | | v | initrd-root-fs.target | | | v | initrd-parse-etc.service (custom initrd services) | | v | (sysroot-usr.mount and | various mounts marked | with fstab option | x-initrd.mount) | | | v | initrd-fs.target | | \______________________ | \| v initrd.target | v initrd-cleanup.service isolates to initrd-switch-root.target | v ______________________/| / | | initrd-udevadm-cleanup-db.service | | (custom initrd services) | | | \______________________ | \| v initrd-switch-root.target | v initrd-switch-root.service | v switch-root
* add initrd-fs.target and root-fs.targetHarald Hoyer2013-03-13
| | | | | | | | | | | | | | Instead of using local-fs*.target in the initrd, use root-fs.target for sysroot.mount and initrd-fs.target for /sysroot/usr and friends. Using local-fs.target would mean to carry over the activated local-fs.target to the isolated initrd-switch-root.target and thus in the real root. Having local-fs.target already active after deserialization causes ordering problems with the real root services and targets. We better isolate to targets for initrd-switch-root.target, which are only available in the initrd.
* Revert "fstab-generator: place initrd /sysroot mounts in initrd-fs.target"Harald Hoyer2013-03-05
| | | | | | | This reverts commit 8330847e949fc0c26b16910e5240eef1fe2c330a. Conflicts: src/fstab-generator/fstab-generator.c
* fstab-generator: only handle block devices with root= kernel command line ↵Harald Hoyer2013-03-04
| | | | | | parameter skip s.th. like root=nfs:... root=iscsi:... root=nbd:...
* fstab-generator: place initrd /sysroot mounts in initrd-fs.targetHarald Hoyer2013-03-04
| | | | also do not overwrite /sysroot*.mount units already generated from fstab
* fstab-generator: initrd - mount selected entries from /sysroot/etc/fstabTom Gundersen2013-03-01
| | | | | | | | | | | | | | | | We only mount "/usr" and entries marked with "x-initrd.mount". This (together with the right unit files) is needed in the initramfs in order to natively support mounting /usr (and friends) from the initramfs. The way it is meant to work is: * wait for sysroot.mount to be mounted * do a daemon-reload to generate sysroot-usr.mount (++) from /sysroot/etc/fstab * wait for sysroot-usr.mount to be mounted * switch-root Cc: Harald Hoyer <harald.hoyer@gmail.com> Cc: Dave Reisner <d@falconindy.com>
* fstab-generator: drop rootwait supportTom Gundersen2013-03-01
| | | | | | I originally added this to stay as compatible as possible with the kernel, but as Lennart argued it is not really useful in the initramfs, so let's drop it (we already don't support 'rootdealy').
* fstab-generator: set "ro" as default for sysroot.mountHarald Hoyer2013-03-01
|
* fstab-generator: fix commit 92094b7Harald Hoyer2013-03-01
|
* fstab-generator: parse_new_root_from_proc_cmdline() don't use "defaults"Harald Hoyer2013-03-01
| | | | | | | Don't use "defaults" as default option string. "defaults,<anyotheroption>" does not even work for the mount unit mount options.
* fstab,mount: detect rbind as bind mountFrederic Crozat2013-03-01
| | | | | | Correctly detect rbind mount option as bind mount. Fixes https://bugzilla.novell.com/show_bug.cgi?id=804575.