On Wed, Oct 16, 2013 at 01:17:25PM +0200, Juerg Haefliger wrote: > >> All, > >> > >> The (admittedly hacky) dracut-modules-growroot package installs a > >> dracut script that runs in the pre-pivot stage. It unmounts the root > >> partition, extends it to the maximum possible size and then tries to > >> remount it. What I noticed in F20 is that as soon as the > >> repartitioning finishes (its an sfdisk command), something > >> automatically remounts the root partition and the growroot script > >> fails when it tries to mount the already mounted partition. > >> > >> Can somebody shed some light on what is happening and why the root > >> partition is automatically remounted and if I can rely on that and not > >> have the growroot script try to remount it? > >> > >> Thanks > >> ...Juerg > >> > > > > Oh, that is systemd, because it generates a unit file from the kernel command > > line called sysroot.mount, which is required by the following systemd targets. > > Is there an easy way to wait until this (remounting of root) has > happened or do I need to poll and time out? Yes. A unit with Requires=sysroot.mount, After=sysroot.mount will be started only after /sysroot has been mounted. But it looks like the resize script should run *before* the automatic mounting. If the script is made into a Type=oneshot unit, adding Before=sysroot.mount will delay mounting until the unit has finished. I'm not sure though, what's the best way to make sure that it is run after the root device has been detected, unless the root device name is known in advance. If it is, Requires=<device>.device, After=<device>.device should be added. Zbyszek -- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct