-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af6ea19
commit dfbed2e
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# This file is part of https://github.com/random-archer/mkinitcpio-systemd-tool | ||
|
||
# Ensure /sysroot mount before switch root. | ||
# See issue #10. | ||
# See https://www.freedesktop.org/software/systemd/man/bootup.html | ||
|
||
[Unit] | ||
Description=Initrd SysRoot Mount | ||
Documentation=https://github.com/random-archer/mkinitcpio-systemd-tool/blob/master/README.md | ||
ConditionPathExists=/etc/initrd-release | ||
ConditionPathExists=/dev/mapper/root | ||
ConditionPathExists=/sysroot | ||
ConditionPathIsMountPoint=!/sysroot | ||
DefaultDependencies=no | ||
After=initrd-cleanup.service | ||
After=initrd-root-fs.target initrd-fs.target initrd.target | ||
Before=initrd-switch-root.service | ||
Before=initrd-switch-root.target | ||
|
||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=true | ||
ExecStart=/bin/mount /dev/mapper/root /sysroot | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Andrei-Pozolotin
Author
Collaborator
|
||
|
||
[Install] | ||
WantedBy=initrd-switch-root.service | ||
WantedBy=initrd-switch-root.target | ||
|
||
[X-SystemdTool] | ||
|
||
# enable service | ||
InitrdService=enable |
This path
/dev/mapper/root
is not always correct.In my case, root it's a LVM partition inside a LUKS partition. Maybe, you can fetch the root from fstab or the kernel args.
I'll try to improve it this weekend if it isn't fixed until then.