* systemd-fstab-generator overwrites sysroot.mount created by dmsquash-generator.
@ 2015-07-18 13:27 Ali H. Caliskan
[not found] ` <CAFO=TmWCtM6-GabdH9GrLExBR4EH9=U+9zFDucQkBhdhAvND7g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Ali H. Caliskan @ 2015-07-18 13:27 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA
dracut-dmsquash-generator creates $GENERATOR_DIR/sysroot.mount and
dracut-rootfs-generator doesn't touch it but systemd-fstab-generator
does overwrite the sysroot.mount file which causes error like "Timed
out waiting for device dev-mapper-live\x2drw.device." I don't know if
it can be resolved by dracut or if systemd should skip writing
sysroot.mount if it already exists.
I'm able to boot with rd.live.image by letting
dracut-dmsquash-generator create sysroot.mount.new and then tell
dracut-rootfs-generator to sysmlink sysroot.mount.new to
initrd-root-fs.target.requires/sysroot.mount. Also I had to remove "if
[ -z "$DRACUT_SYSTEMD" ]; then" condition from the
dmsquash-live-root.sh in order to mount LiveOS/rootfs.img into
/sysroot directory.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: systemd-fstab-generator overwrites sysroot.mount created by dmsquash-generator.
[not found] ` <CAFO=TmWCtM6-GabdH9GrLExBR4EH9=U+9zFDucQkBhdhAvND7g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2015-09-02 11:20 ` Harald Hoyer
[not found] ` <55E6DB94.8060205-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Harald Hoyer @ 2015-09-02 11:20 UTC (permalink / raw)
To: Ali H. Caliskan, initramfs-u79uwXL29TY76Z2rM5mHXA
On 18.07.2015 15:27, Ali H. Caliskan wrote:
> dracut-dmsquash-generator creates $GENERATOR_DIR/sysroot.mount and
> dracut-rootfs-generator doesn't touch it but systemd-fstab-generator
> does overwrite the sysroot.mount file which causes error like "Timed
> out waiting for device dev-mapper-live\x2drw.device." I don't know if
> it can be resolved by dracut or if systemd should skip writing
> sysroot.mount if it already exists.
>
> I'm able to boot with rd.live.image by letting
> dracut-dmsquash-generator create sysroot.mount.new and then tell
> dracut-rootfs-generator to sysmlink sysroot.mount.new to
> initrd-root-fs.target.requires/sysroot.mount. Also I had to remove "if
> [ -z "$DRACUT_SYSTEMD" ]; then" condition from the
> dmsquash-live-root.sh in order to mount LiveOS/rootfs.img into
> /sysroot directory.
Hmm,
according to the man page systemd.generator:
SYNOPSIS
/path/to/generator normal-dir early-dir late-dir
1. normal-dir
argv[1] may be used to override unit files in /usr, but not those in
/etc. This means that unit files placed in this directory take precedence
over vendor unit configuration but not over native
user/administrator unit configuration.
2. early-dir
argv[2] may be used to override unit files in /usr and in /etc. This
means that unit files placed in this directory take precedence over all
configuration, both vendor and user/administrator.
3. late-dir
argv[3] may be used to extend the unit file tree without overriding
any other unit files. Any native configuration files supplied by the
vendor or user/administrator take precedence over the generated ones
placed in this directory.
systemd-fstab-generator uses argv[1], so this is normal-dir
<https://github.com/systemd/systemd/blob/master/src/fstab-generator/fstab-generator.c#L653>
dmsquash-generator.sh uses argv[2], so this is early-dir
<https://github.com/haraldh/dracut/blob/master/modules.d/90dmsquash-live/dmsquash-generator.sh#L53>
If I run test/TEST-16-DMSQUASH and rd.break before switch-root, I can see
switch_root:/run/systemd# find generator.early/
generator.early/
generator.early/dev-mapper-live\x2drw.device.d
generator.early/dev-mapper-live\x2drw.device.d/timeout.conf
generator.early/sysroot.mount
switch_root:/run/systemd# find generator
generator
generator/initrd-root-fs.target.requires
generator/initrd-root-fs.target.requires/sysroot.mount
generator/sysroot.mount
# systemctl show sysroot.mount |grep Path
FragmentPath=/run/systemd/generator.early/sysroot.mount
# cat generator.early/sysroot.mount
[Unit]
Before=initrd-root-fs.target
[Mount]
Where=/sysroot
What=/dev/mapper/live-rw
# cat generator/sysroot.mount
# Automatically generated by systemd-fstab-generator
[Unit]
SourcePath=/proc/cmdline
Documentation=man:fstab(5) man:systemd-fstab-generator(8)
Before=initrd-root-fs.target
[Mount]
What=live:CDLABEL=LiveCD
Where=/sysroot
Options=rw
So, works as expected. The question is, why is your system different?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: systemd-fstab-generator overwrites sysroot.mount created by dmsquash-generator.
[not found] ` <55E6DB94.8060205-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2015-10-25 12:54 ` Ali H. Caliskan
0 siblings, 0 replies; 3+ messages in thread
From: Ali H. Caliskan @ 2015-10-25 12:54 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA
I just wanted to say that my system is now working as expected as
well. I tested the latest release(043) successfully booting live
image. I have no idea what update fixed the issues I had before with
dracut.
On Wed, Sep 2, 2015 at 1:20 PM, Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> On 18.07.2015 15:27, Ali H. Caliskan wrote:
>> dracut-dmsquash-generator creates $GENERATOR_DIR/sysroot.mount and
>> dracut-rootfs-generator doesn't touch it but systemd-fstab-generator
>> does overwrite the sysroot.mount file which causes error like "Timed
>> out waiting for device dev-mapper-live\x2drw.device." I don't know if
>> it can be resolved by dracut or if systemd should skip writing
>> sysroot.mount if it already exists.
>>
>> I'm able to boot with rd.live.image by letting
>> dracut-dmsquash-generator create sysroot.mount.new and then tell
>> dracut-rootfs-generator to sysmlink sysroot.mount.new to
>> initrd-root-fs.target.requires/sysroot.mount. Also I had to remove "if
>> [ -z "$DRACUT_SYSTEMD" ]; then" condition from the
>> dmsquash-live-root.sh in order to mount LiveOS/rootfs.img into
>> /sysroot directory.
>
>
> Hmm,
>
> according to the man page systemd.generator:
>
> SYNOPSIS
> /path/to/generator normal-dir early-dir late-dir
>
>
> 1. normal-dir
>
> argv[1] may be used to override unit files in /usr, but not those in
> /etc. This means that unit files placed in this directory take precedence
> over vendor unit configuration but not over native
> user/administrator unit configuration.
>
> 2. early-dir
>
> argv[2] may be used to override unit files in /usr and in /etc. This
> means that unit files placed in this directory take precedence over all
> configuration, both vendor and user/administrator.
>
> 3. late-dir
>
> argv[3] may be used to extend the unit file tree without overriding
> any other unit files. Any native configuration files supplied by the
> vendor or user/administrator take precedence over the generated ones
> placed in this directory.
>
>
> systemd-fstab-generator uses argv[1], so this is normal-dir
> <https://github.com/systemd/systemd/blob/master/src/fstab-generator/fstab-generator.c#L653>
>
> dmsquash-generator.sh uses argv[2], so this is early-dir
> <https://github.com/haraldh/dracut/blob/master/modules.d/90dmsquash-live/dmsquash-generator.sh#L53>
>
>
> If I run test/TEST-16-DMSQUASH and rd.break before switch-root, I can see
>
> switch_root:/run/systemd# find generator.early/
> generator.early/
> generator.early/dev-mapper-live\x2drw.device.d
> generator.early/dev-mapper-live\x2drw.device.d/timeout.conf
> generator.early/sysroot.mount
> switch_root:/run/systemd# find generator
> generator
> generator/initrd-root-fs.target.requires
> generator/initrd-root-fs.target.requires/sysroot.mount
> generator/sysroot.mount
>
>
> # systemctl show sysroot.mount |grep Path
> FragmentPath=/run/systemd/generator.early/sysroot.mount
>
> # cat generator.early/sysroot.mount
> [Unit]
> Before=initrd-root-fs.target
> [Mount]
> Where=/sysroot
> What=/dev/mapper/live-rw
>
> # cat generator/sysroot.mount
> # Automatically generated by systemd-fstab-generator
>
> [Unit]
> SourcePath=/proc/cmdline
> Documentation=man:fstab(5) man:systemd-fstab-generator(8)
> Before=initrd-root-fs.target
>
> [Mount]
> What=live:CDLABEL=LiveCD
> Where=/sysroot
> Options=rw
>
>
> So, works as expected. The question is, why is your system different?
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-10-25 12:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-18 13:27 systemd-fstab-generator overwrites sysroot.mount created by dmsquash-generator Ali H. Caliskan
[not found] ` <CAFO=TmWCtM6-GabdH9GrLExBR4EH9=U+9zFDucQkBhdhAvND7g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-02 11:20 ` Harald Hoyer
[not found] ` <55E6DB94.8060205-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-10-25 12:54 ` Ali H. Caliskan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.