diff options
Diffstat (limited to 'src/systemd-gpt-auto-generator')
-rw-r--r-- | src/systemd-gpt-auto-generator/gpt-auto-generator.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/systemd-gpt-auto-generator/gpt-auto-generator.c b/src/systemd-gpt-auto-generator/gpt-auto-generator.c index a8149b8756..73e32da751 100644 --- a/src/systemd-gpt-auto-generator/gpt-auto-generator.c +++ b/src/systemd-gpt-auto-generator/gpt-auto-generator.c @@ -956,6 +956,12 @@ static int add_root_mount(void) { * wait for a root device to show up. A udev rule will create * the link for us under the right name. */ + if (in_initrd()) { + r = generator_write_initrd_root_device_deps(arg_dest, "/dev/gpt-auto-root"); + if (r < 0) + return 0; + } + return add_mount( "root", "/dev/gpt-auto-root", |