Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 163993 - init 1 to single user mode gives broken system state, no shell
Summary: init 1 to single user mode gives broken system state, no shell
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: AMD64 Linux
: High major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-26 23:26 UTC by David Govek
Modified: 2007-01-27 12:12 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Govek 2007-01-26 23:26:35 UTC
the aforementioned post describes in more detail, but in summary:

"init 1" to drop into single user mode gives the prompt "Give root password for maintenance (or type Control-D to continue)" as expected.

However, the prompt does not behave properly. It appears that there is a conflict with both /sbin/sulogin and an active shell competing for the console.

The prompt won't accept the root password, Control+D doesn't seem to do anything. It appears that the system is stuck and must be rebooted.

I believe these issues fall under baselayout (I'm currently using 1.12.6), but if not, let me know and I can update this bug report.

terminal9 gives a fix (about the 11th post) which appears to have solved my issue. Sorry this isn't a proper diff, but:

/sbin/rc:
 if [[ ${SOFTLEVEL} == "single" ]] ; then
-        rm -rf "${svcdir}/softscripts.new"
-        /sbin/sulogin ${CONSOLE}
+        /sbin/telinit S
         exit 0
 fi

/etc/inittab:
-l1:S1:wait:/sbin/rc single
+l1:1:wait:/sbin/rc single


Reproducible: Always

Steps to Reproduce:
1. using an affected baselayout (?) version, run "init 1"
2. wait for services to stop
3. try to interact with the provided prompt
Actual Results:  
Prompt does not accept root password.
Prompt does not accept Control+D.
Can't get out of prompt.

Expected Results:  
Prompt accepts root password for su shell
Prompt accepts Control+D to continue (return to init 3)

I'm using sys-apps/baselayout-1.12.6  USE="unicode -bootstrap -build -static"

If this issue doesn't pertain to baselayout, please let me know so I can adjust this report. Thanks!

Gentoo Base System version 1.12.6
Portage 2.1.1-r2 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.4-r4, 2.6.18-gentoo-r6 x86_64)
=================================================================
System uname: 2.6.18-gentoo-r6 x86_64 AMD Turion(tm) 64 Mobile Technology MT-32
Last Sync: Fri, 26 Jan 2007 06:30:01 +0000
ccache version 2.3 [enabled]
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: [Not Present]
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -msse3 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=athlon64 -msse3 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://open-systems.ufl.edu/mirrors/gentoo http://ftp.twaren.net/Linux/Gentoo/ ftp://gentoo.cites.uiuc.edu/pub/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X alsa_cards_ali5451 alsa_cards_als4000 alsa_cards_atiixp alsa_cards_atiixp-modem alsa_cards_bt87x alsa_cards_ca0106 alsa_cards_cmipci alsa_cards_emu10k1x alsa_cards_ens1370 alsa_cards_ens1371 alsa_cards_es1938 alsa_cards_es1968 alsa_cards_fm801 alsa_cards_hda-intel alsa_cards_intel8x0 alsa_cards_intel8x0m alsa_cards_maestro3 alsa_cards_trident alsa_cards_usb-audio alsa_cards_via82xx alsa_cards_via82xx-modem alsa_cards_ymfpci alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol amd64 berkdb bitmap-fonts cli cracklib crypt cups dlloader dri elibc_glibc gdbm gpm gtk iconv input_devices_evdev input_devices_keyboard input_devices_mouse isdnlog kernel_linux lcd_devices_bayrad lcd_devices_cfontz lcd_devices_cfontz633 lcd_devices_glk lcd_devices_hd44780 lcd_devices_lb216 lcd_devices_lcdm001 lcd_devices_mtxorb lcd_devices_ncurses lcd_devices_text libg++ logrotate ncurses nls nolvm1 nptl nptlonly offensive pam pcre perl ppds pppd python readline reflection session spl ssl tcpd truetype-fonts type1-fonts udev unicode userland_GNU video_cards_sis video_cards_vesa xorg zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 SpanKY gentoo-dev 2007-01-27 02:25:12 UTC
include all relevant information in the bug report, dont link to forums ... otherwise we waste time reading forums trying to figure out what the reporter is talking about often times sifting through irrelevant garbage
Comment 2 Roy Marples (RETIRED) gentoo-dev 2007-01-27 12:12:14 UTC
Going to single user mode and back is kind of broken in 1.12 (not that is worked exactly in prior baselayouts either)

It is fully functional in baselayout-1.13.0_alpha12, although some init scripts will need the following deps

depend() {
   need localmount
   after bootmisc
}

Otherwise if the need /var or something not mounted of / then they will fail. One example of this is metalog which I'll be fixing today.