Bug 73141 - RFE: add question what shell to use when starting rescue mode
Summary: RFE: add question what shell to use when starting rescue mode
Status: RESOLVED NOTABUG
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-30 10:29 UTC by Kwpolska
Modified: 2013-12-30 17:41 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Kwpolska 2013-12-30 10:29:04 UTC
When starting in rescue mode, systemd uses whatever shell root has specified in /etc/passwd.  It would be better off if it used something safer, or had something like FreeBSD, which prompts for the shell to use (“Enter full pathname of shell or RETURN for /bin/sh:”).  The default shell may be broken, leaving the system unbootable.
Comment 1 Zbigniew Jedrzejewski-Szmek 2013-12-30 16:31:00 UTC
How often would that be useful?
Comment 2 Kwpolska 2013-12-30 16:37:22 UTC
That would be useful whenever:

 * the shell is broken
 * the libraries used by the shell are broken (by a system update, by ID10-T error…)
 * the config of the shell is broken
 * root has a fancy shell set that fails to work well in tty1/takes a long time to startup/…

After all: rescue mode is meant to be started when something is broken badly, and fanciness is not allowed (also, you should’ve seen my face when systemd told me it mounts my drives, I almost thought it doesn’t recognize the ‘single’ kernel parameter)
Comment 3 Zbigniew Jedrzejewski-Szmek 2013-12-30 16:57:10 UTC
(In reply to comment #2)
> That would be useful whenever:
...
Yes, but how often do those things happen? In case of extreme breakage, systemd itself links to a bunch of libraries. With the exception of ncurses, bash links to a subset. So if bash is broken, systemd is very likely to be broken too.
Comment 4 Kwpolska 2013-12-30 17:00:28 UTC
What if bash is not broken, but zsh/fish/[insert sysadmin’s favorite shell which is the shell of root] is?  Or if .bashrc/what-you-have is unusable?
Comment 5 Kay Sievers 2013-12-30 17:41:24 UTC
In such rare case where systemd still works, but root's shell is broken,
init=/bin/sh (or whatever) is the solution. It is pretty unlikely that in
such case "emergency" will work.

There is no need to cover such unlikely and exotic failure cases with
systemd tools, and hope that systemd will still work.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.