* [Patch v2 1/2] 99fs-lib/fs-lib.sh: Let user specify the action after fail for fsck
@ 2013-05-29 8:38 Baoquan He
[not found] ` <078c160e62c2c750efe71fc8a05dd7c5de71bde3.1369816679.git.bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 14+ messages in thread
From: Baoquan He @ 2013-05-29 8:38 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Baoquan He
The fsck is ignored when replace emergency_shell with action_on_fail,
now add it.
Signed-off-by: Baoquan He <bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
modules.d/99fs-lib/fs-lib.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules.d/99fs-lib/fs-lib.sh b/modules.d/99fs-lib/fs-lib.sh
index e1f3074..88e7348 100755
--- a/modules.d/99fs-lib/fs-lib.sh
+++ b/modules.d/99fs-lib/fs-lib.sh
@@ -7,14 +7,14 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
fsck_ask_reboot() {
info "note - fsck suggests reboot, if you"
info "leave shell, booting will continue normally"
- emergency_shell -n "(reboot ?)"
+ action_on_fail -n "(reboot ?)"
}
fsck_ask_err() {
warn "*** An error occurred during the file system check."
warn "*** Dropping you to a shell; the system will try"
warn "*** to mount the filesystem(s), when you leave the shell."
- emergency_shell -n "(Repair filesystem)"
+ action_on_fail -n "(Repair filesystem)"
}
# inherits: _ret _drv _out
--
1.7.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Patch v2 2/2] let user specify action after systemd start dracut-emergency
[not found] ` <078c160e62c2c750efe71fc8a05dd7c5de71bde3.1369816679.git.bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2013-05-29 8:38 ` Baoquan He
[not found] ` <dc98d3640cb7f265d9a84a11b87e494635485e8d.1369816679.git.bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-30 17:02 ` [Patch v2 1/2] 99fs-lib/fs-lib.sh: Let user specify the action after fail for fsck Vivek Goyal
1 sibling, 1 reply; 14+ messages in thread
From: Baoquan He @ 2013-05-29 8:38 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Baoquan He
If failed to mount /sysroot, triggering OnFailure= dependencies
of initrd-xxx.service, then dracut-emergency will be started by
systemd and enter into emergency shell.
Here add a judgement in dracut-emergency. If user specify
"action_on_fail=continue", continue though mount root failed.
Otherwise enter into interactive shell.
v1-v2->
action_on_fail function can't be used directly here, discard
it. Instead add a judgement to handle this.
Signed-off-by: Baoquan He <bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
modules.d/98systemd/dracut-emergency.sh | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/modules.d/98systemd/dracut-emergency.sh b/modules.d/98systemd/dracut-emergency.sh
index 8ab045e..51e1f80 100755
--- a/modules.d/98systemd/dracut-emergency.sh
+++ b/modules.d/98systemd/dracut-emergency.sh
@@ -30,7 +30,12 @@ if getargbool 1 rd.shell -d -y rdshell || getarg rd.break -d rdbreak; then
echo
[ -f /etc/profile ] && . /etc/profile
[ -z "$PS1" ] && export PS1="$_name:\${PWD}# "
- exec sh -i -l
+ if [ "$(getarg action_on_fail=)" = "continue" ]; then
+ echo "Systemd is starting dracut emergency"
+ echo "NoT dropping to emergency shell, because 'action_on_fail=continue' was set on kernel command line"
+ else
+ exec sh -i -l
+ fi
else
warn "$action has failed. To debug this issue add \"rd.shell rd.debug\" to the kernel command line."
exit 1
--
1.7.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [Patch v2 2/2] let user specify action after systemd start dracut-emergency
[not found] ` <dc98d3640cb7f265d9a84a11b87e494635485e8d.1369816679.git.bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2013-05-30 8:50 ` Baoquan
[not found] ` <51A712D0.80002-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 14+ messages in thread
From: Baoquan @ 2013-05-30 8:50 UTC (permalink / raw)
To: Harald Hoyer; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA
On 05/29/2013 04:38 PM, Baoquan He wrote:
> If failed to mount /sysroot, triggering OnFailure= dependencies
> of initrd-xxx.service, then dracut-emergency will be started by
> systemd and enter into emergency shell.
>
> Here add a judgement in dracut-emergency. If user specify
> "action_on_fail=continue", continue though mount root failed.
> Otherwise enter into interactive shell.
>
> v1-v2->
> action_on_fail function can't be used directly here, discard
> it. Instead add a judgement to handle this.
>
> Signed-off-by: Baoquan He <bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
> modules.d/98systemd/dracut-emergency.sh | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/modules.d/98systemd/dracut-emergency.sh b/modules.d/98systemd/dracut-emergency.sh
> index 8ab045e..51e1f80 100755
> --- a/modules.d/98systemd/dracut-emergency.sh
> +++ b/modules.d/98systemd/dracut-emergency.sh
> @@ -30,7 +30,12 @@ if getargbool 1 rd.shell -d -y rdshell || getarg rd.break -d rdbreak; then
> echo
> [ -f /etc/profile ] && . /etc/profile
> [ -z "$PS1" ] && export PS1="$_name:\${PWD}# "
> - exec sh -i -l
> + if [ "$(getarg action_on_fail=)" = "continue" ]; then
> + echo "Systemd is starting dracut emergency"
> + echo "NoT dropping to emergency shell, because 'action_on_fail=continue' was set on kernel command line"
> + else
> + exec sh -i -l
> + fi
> else
> warn "$action has failed. To debug this issue add \"rd.shell rd.debug\" to the kernel command line."
> exit 1
Hi Harald,
Since adding ConditionKernelCommandLine=!action_on_fail=continue doesn't
work, do you mind applying this patch? Or do you have other suggestions?
Baoquan
Thanks a lot
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Patch v2 2/2] let user specify action after systemd start dracut-emergency
[not found] ` <51A712D0.80002-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2013-05-30 9:15 ` Harald Hoyer
[not found] ` <51A718C8.9070406-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 14+ messages in thread
From: Harald Hoyer @ 2013-05-30 9:15 UTC (permalink / raw)
To: Baoquan; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA
On 05/30/2013 10:50 AM, Baoquan wrote:
> On 05/29/2013 04:38 PM, Baoquan He wrote:
>
>> If failed to mount /sysroot, triggering OnFailure= dependencies
>> of initrd-xxx.service, then dracut-emergency will be started by
>> systemd and enter into emergency shell.
>>
>> Here add a judgement in dracut-emergency. If user specify
>> "action_on_fail=continue", continue though mount root failed.
>> Otherwise enter into interactive shell.
>>
>> v1-v2->
>> action_on_fail function can't be used directly here, discard
>> it. Instead add a judgement to handle this.
>>
>> Signed-off-by: Baoquan He <bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>> ---
>> modules.d/98systemd/dracut-emergency.sh | 7 ++++++-
>> 1 files changed, 6 insertions(+), 1 deletions(-)
>>
>> diff --git a/modules.d/98systemd/dracut-emergency.sh b/modules.d/98systemd/dracut-emergency.sh
>> index 8ab045e..51e1f80 100755
>> --- a/modules.d/98systemd/dracut-emergency.sh
>> +++ b/modules.d/98systemd/dracut-emergency.sh
>> @@ -30,7 +30,12 @@ if getargbool 1 rd.shell -d -y rdshell || getarg rd.break -d rdbreak; then
>> echo
>> [ -f /etc/profile ] && . /etc/profile
>> [ -z "$PS1" ] && export PS1="$_name:\${PWD}# "
>> - exec sh -i -l
>> + if [ "$(getarg action_on_fail=)" = "continue" ]; then
>> + echo "Systemd is starting dracut emergency"
>> + echo "NoT dropping to emergency shell, because 'action_on_fail=continue' was set on kernel command line"
>> + else
>> + exec sh -i -l
>> + fi
>> else
>> warn "$action has failed. To debug this issue add \"rd.shell rd.debug\" to the kernel command line."
>> exit 1
>
>
> Hi Harald,
>
> Since adding ConditionKernelCommandLine=!action_on_fail=continue doesn't
> work, do you mind applying this patch? Or do you have other suggestions?
>
> Baoquan
> Thanks a lot
Hmm, "ConditionKernelCommandLine=!action_on_fail=continue" _has_ to work.
Otherwise I would consider that a serious bug in systemd.
Care to elaborate how you tested it?
If you are dropped to the shell, can you run:
# systemctl status dracut-emergency.service
# systemctl status emergency.service
to confirm you are not dropped to the emergency.service, which I think this is
the case in your test setup.
So, we have to add "ConditionKernelCommandLine=!action_on_fail=continue" to
emergency.service, too.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Patch v2 2/2] let user specify action after systemd start dracut-emergency
[not found] ` <51A718C8.9070406-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2013-05-30 10:15 ` Baoquan
[not found] ` <51A726D0.9070509-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-31 9:39 ` Baoquan
1 sibling, 1 reply; 14+ messages in thread
From: Baoquan @ 2013-05-30 10:15 UTC (permalink / raw)
To: Harald Hoyer; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA
On 05/30/2013 05:15 PM, Harald Hoyer wrote:
>> > Hi Harald,
>> >
>> > Since adding ConditionKernelCommandLine=!action_on_fail=continue doesn't
>> > work, do you mind applying this patch? Or do you have other suggestions?
>> >
>> > Baoquan
>> > Thanks a lot
> Hmm, "ConditionKernelCommandLine=!action_on_fail=continue" _has_ to work.
> Otherwise I would consider that a serious bug in systemd.
>
> Care to elaborate how you tested it?
>
> If you are dropped to the shell, can you run:
>
> # systemctl status dracut-emergency.service
> # systemctl status emergency.service
>
> to confirm you are not dropped to the emergency.service, which I think this is
> the case in your test setup.
>
> So, we have to add "ConditionKernelCommandLine=!action_on_fail=continue" to
> emergency.service, too.
>
Hi Harald,
I added this to dracut-emergency.service, and add
action_on_fail=continue to kdump command line, then change
dracut_initqueue.sh to make the RDENTRY=0, then mount won't succeed.
From my side, the ConditionKernelCommandLine=!action_on_fail=continue
doesn't work.
And I also tried ConditionKernelCommandLine=action_on_fail=continue, but
remove the kdump command line action_on_fail=continue, it didn't work
either.
Baoquan
Thanks a lot
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Patch v2 2/2] let user specify action after systemd start dracut-emergency
[not found] ` <51A726D0.9070509-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2013-05-30 10:33 ` Harald Hoyer
[not found] ` <51A72AF4.6070700-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 14+ messages in thread
From: Harald Hoyer @ 2013-05-30 10:33 UTC (permalink / raw)
To: Baoquan; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA
On 05/30/2013 12:15 PM, Baoquan wrote:
> On 05/30/2013 05:15 PM, Harald Hoyer wrote:
>
>>>> Hi Harald,
>>>>
>>>> Since adding ConditionKernelCommandLine=!action_on_fail=continue doesn't
>>>> work, do you mind applying this patch? Or do you have other suggestions?
>>>>
>>>> Baoquan
>>>> Thanks a lot
>> Hmm, "ConditionKernelCommandLine=!action_on_fail=continue" _has_ to work.
>> Otherwise I would consider that a serious bug in systemd.
>>
>> Care to elaborate how you tested it?
>>
>> If you are dropped to the shell, can you run:
>>
>> # systemctl status dracut-emergency.service
>> # systemctl status emergency.service
>>
>> to confirm you are not dropped to the emergency.service, which I think this is
>> the case in your test setup.
>>
>> So, we have to add "ConditionKernelCommandLine=!action_on_fail=continue" to
>> emergency.service, too.
>>
>
>
> Hi Harald,
>
> I added this to dracut-emergency.service, and add
> action_on_fail=continue to kdump command line, then change
> dracut_initqueue.sh to make the RDENTRY=0, then mount won't succeed.
>
> From my side, the ConditionKernelCommandLine=!action_on_fail=continue
> doesn't work.
>
> And I also tried ConditionKernelCommandLine=action_on_fail=continue, but
> remove the kdump command line action_on_fail=continue, it didn't work
> either.
>
>
> Baoquan
> Thanks a lot
>
>
worksforme... with
http://git.kernel.org/cgit/boot/dracut/dracut.git/commit/?id=b78e6ac2c328c76057b17059a761ab44707f9aa0
and
"rd.shell rd.break action_on_fail=continue"
dracut-pre-pivot[227]: /lib/dracut-lib.sh@933(_emergency_shell): systemctl start
dracut-emergency.service
Trying to enqueue job dracut-emergency.service/start/replace
Installed new job dracut-emergency.service/start as 39
Enqueued job dracut-emergency.service/start as 39
Starting of dracut-emergency.service requested but condition failed. Ignoring.
Job dracut-emergency.service/start finished, result=done
.. no rd.shell on rd.break...
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Patch v2 1/2] 99fs-lib/fs-lib.sh: Let user specify the action after fail for fsck
[not found] ` <078c160e62c2c750efe71fc8a05dd7c5de71bde3.1369816679.git.bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-29 8:38 ` [Patch v2 2/2] let user specify action after systemd start dracut-emergency Baoquan He
@ 2013-05-30 17:02 ` Vivek Goyal
[not found] ` <20130530170240.GH2864-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
1 sibling, 1 reply; 14+ messages in thread
From: Vivek Goyal @ 2013-05-30 17:02 UTC (permalink / raw)
To: Baoquan He; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA
On Wed, May 29, 2013 at 04:38:31PM +0800, Baoquan He wrote:
> The fsck is ignored when replace emergency_shell with action_on_fail,
> now add it.
should action_on_fail be named rd.action_on_fail to make it explicit that
this is an initramfs option and not a kernel command line option as such.
Vivek
>
> Signed-off-by: Baoquan He <bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
> modules.d/99fs-lib/fs-lib.sh | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/modules.d/99fs-lib/fs-lib.sh b/modules.d/99fs-lib/fs-lib.sh
> index e1f3074..88e7348 100755
> --- a/modules.d/99fs-lib/fs-lib.sh
> +++ b/modules.d/99fs-lib/fs-lib.sh
> @@ -7,14 +7,14 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
> fsck_ask_reboot() {
> info "note - fsck suggests reboot, if you"
> info "leave shell, booting will continue normally"
> - emergency_shell -n "(reboot ?)"
> + action_on_fail -n "(reboot ?)"
> }
>
> fsck_ask_err() {
> warn "*** An error occurred during the file system check."
> warn "*** Dropping you to a shell; the system will try"
> warn "*** to mount the filesystem(s), when you leave the shell."
> - emergency_shell -n "(Repair filesystem)"
> + action_on_fail -n "(Repair filesystem)"
> }
>
> # inherits: _ret _drv _out
> --
> 1.7.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe initramfs" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Patch v2 2/2] let user specify action after systemd start dracut-emergency
[not found] ` <51A72AF4.6070700-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2013-05-31 7:16 ` Baoquan
[not found] ` <51A84E34.5060906-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 14+ messages in thread
From: Baoquan @ 2013-05-31 7:16 UTC (permalink / raw)
To: Harald Hoyer; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA
On 05/30/2013 06:33 PM, Harald Hoyer wrote:
> worksforme... with
> http://git.kernel.org/cgit/boot/dracut/dracut.git/commit/?id=b78e6ac2c328c76057b17059a761ab44707f9aa0
> and
> "rd.shell rd.break action_on_fail=continue"
>
> dracut-pre-pivot[227]: /lib/dracut-lib.sh@933(_emergency_shell): systemctl start
> dracut-emergency.service
> Trying to enqueue job dracut-emergency.service/start/replace
> Installed new job dracut-emergency.service/start as 39
> Enqueued job dracut-emergency.service/start as 39
> Starting of dracut-emergency.service requested but condition failed. Ignoring.
> Job dracut-emergency.service/start finished, result=done
>
> .. no rd.shell on rd.break...
>
Hi Harald,
I tried your method, add
1)"rd.break=pre-pivot action_on_fail=continue" to kernel cmdline;
2)add "ConditionKernelCommandLine=!action_on_fail=continue" into
dracut-emergency.service
it works very well, won't drop into shell. And this works for 1st kernel
and kdump kernel.
However, when I tried the mount failed method, it doesn't work.
1)"rd.break=pre-pivot action_on_fail=continue" to kernel cmdline;
2)add "ConditionKernelCommandLine=!action_on_fail=continue" into
dracut-emergency.service
3)change root to a wrong name in /proc/cmdline to make mount root failed.
:/# cat /proc/cmdline
root=/dev/mapper/fedora-root111 action_on_fail=continue .....
In this way, it always drops into shell.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Patch v2 2/2] let user specify action after systemd start dracut-emergency
[not found] ` <51A84E34.5060906-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2013-05-31 7:25 ` Harald Hoyer
0 siblings, 0 replies; 14+ messages in thread
From: Harald Hoyer @ 2013-05-31 7:25 UTC (permalink / raw)
To: Baoquan; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA
On 05/31/2013 09:16 AM, Baoquan wrote:
> On 05/30/2013 06:33 PM, Harald Hoyer wrote:
>
>> worksforme... with
>> http://git.kernel.org/cgit/boot/dracut/dracut.git/commit/?id=b78e6ac2c328c76057b17059a761ab44707f9aa0
>> and
>> "rd.shell rd.break action_on_fail=continue"
>>
>> dracut-pre-pivot[227]: /lib/dracut-lib.sh@933(_emergency_shell): systemctl start
>> dracut-emergency.service
>> Trying to enqueue job dracut-emergency.service/start/replace
>> Installed new job dracut-emergency.service/start as 39
>> Enqueued job dracut-emergency.service/start as 39
>> Starting of dracut-emergency.service requested but condition failed. Ignoring.
>> Job dracut-emergency.service/start finished, result=done
>>
>> .. no rd.shell on rd.break...
>>
>
>
> Hi Harald,
>
> I tried your method, add
>
>
> 1)"rd.break=pre-pivot action_on_fail=continue" to kernel cmdline;
>
> 2)add "ConditionKernelCommandLine=!action_on_fail=continue" into
> dracut-emergency.service
>
> it works very well, won't drop into shell. And this works for 1st kernel
> and kdump kernel.
>
> However, when I tried the mount failed method, it doesn't work.
>
> 1)"rd.break=pre-pivot action_on_fail=continue" to kernel cmdline;
>
> 2)add "ConditionKernelCommandLine=!action_on_fail=continue" into
> dracut-emergency.service
>
> 3)change root to a wrong name in /proc/cmdline to make mount root failed.
>
> :/# cat /proc/cmdline
> root=/dev/mapper/fedora-root111 action_on_fail=continue .....
>
> In this way, it always drops into shell.
This is why I said to double check, if you are dropped to
dracut-emergency.service versus emergency.service.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Patch v2 1/2] 99fs-lib/fs-lib.sh: Let user specify the action after fail for fsck
[not found] ` <20130530170240.GH2864-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2013-05-31 7:30 ` Harald Hoyer
0 siblings, 0 replies; 14+ messages in thread
From: Harald Hoyer @ 2013-05-31 7:30 UTC (permalink / raw)
To: Vivek Goyal; +Cc: Baoquan He, initramfs-u79uwXL29TY76Z2rM5mHXA
On 05/30/2013 07:02 PM, Vivek Goyal wrote:
> On Wed, May 29, 2013 at 04:38:31PM +0800, Baoquan He wrote:
>> The fsck is ignored when replace emergency_shell with action_on_fail,
>> now add it.
>
> should action_on_fail be named rd.action_on_fail to make it explicit that
> this is an initramfs option and not a kernel command line option as such.
>
> Vivek
Yes, please
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Patch v2 2/2] let user specify action after systemd start dracut-emergency
[not found] ` <51A718C8.9070406-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-30 10:15 ` Baoquan
@ 2013-05-31 9:39 ` Baoquan
[not found] ` <51A86FDC.1050606-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
1 sibling, 1 reply; 14+ messages in thread
From: Baoquan @ 2013-05-31 9:39 UTC (permalink / raw)
To: Harald Hoyer; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA
On 05/30/2013 05:15 PM, Harald Hoyer wrote:
> Hmm, "ConditionKernelCommandLine=!action_on_fail=continue" _has_ to work.
> Otherwise I would consider that a serious bug in systemd.
>
> Care to elaborate how you tested it?
>
> If you are dropped to the shell, can you run:
>
> # systemctl status dracut-emergency.service
> # systemctl status emergency.service
>
> to confirm you are not dropped to the emergency.service, which I think this is
> the case in your test setup.
>
> So, we have to add "ConditionKernelCommandLine=!action_on_fail=continue" to
> emergency.service, too.
Hi Harald,
It is emergency.service takes care of emergency. Now I add
"ConditionKernelCommandLine=!action_on_fail=continue" to
emergency.service, the process just hang there. below is the console output:
[ 1.366071] bio: create slab <bio-1> at 1
dracut-initqueue[124]: Warning: Could not boot.
dracut-initqueue[124]: Warning: Not dropping to emergency shell, because
'action_on_fail=continue' was set on the kernel command line.
[ OK ] Started dracut initqueue hook.
Mounting /sysroot...
[FAILED] Failed to mount /sysroot.
See 'systemctl status sysroot.mount' for details.
[DEPEND] Dependency failed for Initrd Root File System.
[DEPEND] Dependency failed for Reload Configuration from the Real Root.
[ 185.641729] systemd[1]: Unit sysroot.mount entered failed state.
[ 185.642906] systemd[1]: Starting Journal Service...
[ 185.644860] systemd[1]: Stopped udev Kernel Device Manager.
[ 185.645337] systemd[1]: Stopping dracut pre-udev hook...
[ 185.645743] systemd[1]: Stopped dracut pre-udev hook.
[ 185.647077] systemd[1]: Stopping dracut cmdline hook...
[ 185.647498] systemd[1]: Stopped dracut cmdline hook.
[ 185.647884] systemd[1]: Starting Setup Virtual Console...
[ 185.649641] systemd-journald[49]: Received SIGTERM
[ 185.650284] systemd[1]: Stopping udev Kernel Socket.
[ 185.650690] systemd[1]: Closed udev Kernel Socket.
[ 185.652039] systemd[1]: Stopping udev Control Socket.
[ 185.652469] systemd[1]: Closed udev Control Socket.
[ 185.656516] systemd[1]: Starting Journal Service...
[ 185.657075] systemd[1]: Started Journal Service.
Baoquan
Thanks
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Patch v2 2/2] let user specify action after systemd start dracut-emergency
[not found] ` <51A86FDC.1050606-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2013-05-31 9:45 ` Harald Hoyer
[not found] ` <51A87129.4070307-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 14+ messages in thread
From: Harald Hoyer @ 2013-05-31 9:45 UTC (permalink / raw)
To: Baoquan; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA
On 05/31/2013 11:39 AM, Baoquan wrote:
> On 05/30/2013 05:15 PM, Harald Hoyer wrote:
>
>> Hmm, "ConditionKernelCommandLine=!action_on_fail=continue" _has_ to work.
>> Otherwise I would consider that a serious bug in systemd.
>>
>> Care to elaborate how you tested it?
>>
>> If you are dropped to the shell, can you run:
>>
>> # systemctl status dracut-emergency.service
>> # systemctl status emergency.service
>>
>> to confirm you are not dropped to the emergency.service, which I think this is
>> the case in your test setup.
>>
>> So, we have to add "ConditionKernelCommandLine=!action_on_fail=continue" to
>> emergency.service, too.
>
>
> Hi Harald,
>
> It is emergency.service takes care of emergency. Now I add
> "ConditionKernelCommandLine=!action_on_fail=continue" to
> emergency.service, the process just hang there. below is the console output:
>
> [ 1.366071] bio: create slab <bio-1> at 1
> dracut-initqueue[124]: Warning: Could not boot.
> dracut-initqueue[124]: Warning: Not dropping to emergency shell, because
> 'action_on_fail=continue' was set on the kernel command line.
> [ OK ] Started dracut initqueue hook.
> Mounting /sysroot...
> [FAILED] Failed to mount /sysroot.
> See 'systemctl status sysroot.mount' for details.
> [DEPEND] Dependency failed for Initrd Root File System.
> [DEPEND] Dependency failed for Reload Configuration from the Real Root.
> [ 185.641729] systemd[1]: Unit sysroot.mount entered failed state.
> [ 185.642906] systemd[1]: Starting Journal Service...
> [ 185.644860] systemd[1]: Stopped udev Kernel Device Manager.
> [ 185.645337] systemd[1]: Stopping dracut pre-udev hook...
> [ 185.645743] systemd[1]: Stopped dracut pre-udev hook.
> [ 185.647077] systemd[1]: Stopping dracut cmdline hook...
> [ 185.647498] systemd[1]: Stopped dracut cmdline hook.
> [ 185.647884] systemd[1]: Starting Setup Virtual Console...
> [ 185.649641] systemd-journald[49]: Received SIGTERM
> [ 185.650284] systemd[1]: Stopping udev Kernel Socket.
> [ 185.650690] systemd[1]: Closed udev Kernel Socket.
> [ 185.652039] systemd[1]: Stopping udev Control Socket.
> [ 185.652469] systemd[1]: Closed udev Control Socket.
> [ 185.656516] systemd[1]: Starting Journal Service...
> [ 185.657075] systemd[1]: Started Journal Service.
>
>
> Baoquan
> Thanks
>
emergency.service is the last resort emergency.
[harald@lenovo rules (master)]$ fgrep OnFail /lib/systemd/system/*.target
/lib/systemd/system/initrd-fs.target:OnFailure=emergency.target
/lib/systemd/system/initrd-fs.target:OnFailureIsolate=yes
/lib/systemd/system/initrd-root-fs.target:OnFailure=emergency.target
/lib/systemd/system/initrd-root-fs.target:OnFailureIsolate=yes
/lib/systemd/system/initrd.target:OnFailure=emergency.target
/lib/systemd/system/initrd.target:OnFailureIsolate=yes
Maybe we should refrain from isolating to the emergency.target, which starts
emergency.service.
I'll ask on the systemd-devel list.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Patch v2 2/2] let user specify action after systemd start dracut-emergency
[not found] ` <51A87129.4070307-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2013-06-03 3:04 ` Baoquan
[not found] ` <51AC07B2.1010407-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 14+ messages in thread
From: Baoquan @ 2013-06-03 3:04 UTC (permalink / raw)
To: Harald Hoyer; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA
On 05/31/2013 05:45 PM, Harald Hoyer wrote:
> emergency.service is the last resort emergency.
>
> [harald@lenovo rules (master)]$ fgrep OnFail /lib/systemd/system/*.target
> /lib/systemd/system/initrd-fs.target:OnFailure=emergency.target
> /lib/systemd/system/initrd-fs.target:OnFailureIsolate=yes
> /lib/systemd/system/initrd-root-fs.target:OnFailure=emergency.target
> /lib/systemd/system/initrd-root-fs.target:OnFailureIsolate=yes
> /lib/systemd/system/initrd.target:OnFailure=emergency.target
> /lib/systemd/system/initrd.target:OnFailureIsolate=yes
>
> Maybe we should refrain from isolating to the emergency.target, which starts
> emergency.service.
>
> I'll ask on the systemd-devel list.
I tried set these OnFailureIsolate=no, seems services not started any
more and systemd hang there.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Patch v2 2/2] let user specify action after systemd start dracut-emergency
[not found] ` <51AC07B2.1010407-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2013-07-01 13:51 ` Baoquan
0 siblings, 0 replies; 14+ messages in thread
From: Baoquan @ 2013-07-01 13:51 UTC (permalink / raw)
To: Harald Hoyer; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA
On 06/03/2013 11:04 AM, Baoquan wrote:
> On 05/31/2013 05:45 PM, Harald Hoyer wrote:
>
>> emergency.service is the last resort emergency.
>>
>> [harald@lenovo rules (master)]$ fgrep OnFail /lib/systemd/system/*.target
>> /lib/systemd/system/initrd-fs.target:OnFailure=emergency.target
>> /lib/systemd/system/initrd-fs.target:OnFailureIsolate=yes
>> /lib/systemd/system/initrd-root-fs.target:OnFailure=emergency.target
>> /lib/systemd/system/initrd-root-fs.target:OnFailureIsolate=yes
>> /lib/systemd/system/initrd.target:OnFailure=emergency.target
>> /lib/systemd/system/initrd.target:OnFailureIsolate=yes
>>
>> Maybe we should refrain from isolating to the emergency.target, which starts
>> emergency.service.
>>
>> I'll ask on the systemd-devel list.
>
>
> I tried set these OnFailureIsolate=no, seems services not started any
> more and systemd hang there.
Hi Harald,
About this issue, do you have any further suggestion?
Baoquan
Thanks a lot
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2013-07-01 13:51 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-29 8:38 [Patch v2 1/2] 99fs-lib/fs-lib.sh: Let user specify the action after fail for fsck Baoquan He
[not found] ` <078c160e62c2c750efe71fc8a05dd7c5de71bde3.1369816679.git.bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-29 8:38 ` [Patch v2 2/2] let user specify action after systemd start dracut-emergency Baoquan He
[not found] ` <dc98d3640cb7f265d9a84a11b87e494635485e8d.1369816679.git.bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-30 8:50 ` Baoquan
[not found] ` <51A712D0.80002-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-30 9:15 ` Harald Hoyer
[not found] ` <51A718C8.9070406-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-30 10:15 ` Baoquan
[not found] ` <51A726D0.9070509-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-30 10:33 ` Harald Hoyer
[not found] ` <51A72AF4.6070700-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-31 7:16 ` Baoquan
[not found] ` <51A84E34.5060906-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-31 7:25 ` Harald Hoyer
2013-05-31 9:39 ` Baoquan
[not found] ` <51A86FDC.1050606-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-31 9:45 ` Harald Hoyer
[not found] ` <51A87129.4070307-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-06-03 3:04 ` Baoquan
[not found] ` <51AC07B2.1010407-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-07-01 13:51 ` Baoquan
2013-05-30 17:02 ` [Patch v2 1/2] 99fs-lib/fs-lib.sh: Let user specify the action after fail for fsck Vivek Goyal
[not found] ` <20130530170240.GH2864-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-31 7:30 ` Harald Hoyer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox