# Computer stuck right before prompting for a logon

## ONEEYEMAN

Hi, ALL,

I have a very weird problem.

I had a working system for some time. Then I decided to install Samba and in order for it to run I changed the rc.conf.

Then I think I did something else, because when I rebooted the machine was stuck on following:

```

Starting locals      [ok]

This is IgorGentooLaptop.

```

and never goes to the login prompt.

I booted from the CD and updated the system, then ran etc-update, but that didn't help. It still stuck on the same place after reboot.

Does anybody have an idea what is going on?

I can probably send more info thru the pastebin when booted from LiveCD - just tell me what kind.

Thank you.Last edited by ONEEYEMAN on Sun Jul 26, 2015 2:33 am; edited 2 times in total

----------

## NathanZachary

By chance, are you using anything like NIS, LDAP, or some other centralised authentication mechanism?  If so, is the server that provides the authentication up and responding as intended?

----------

## ONEEYEMAN

NathanZachary,

No, this is my personal computer (laptop) at home and I don't have anything centralized.

When I boot up from the LiveCD and later on chroot into the system, the dmesg log will still have the old log from my unsuccessful try, right?

If yes, I will just send the dmesg output from this box. I will need the wget for that, right?

Thank you.

----------

## NathanZachary

You should be able to see the logs once you mount your partitions.  You shouldn't *have* to chroot in order to see them, but there also shouldn't be any harm in doing so.  

I would also assume by how you worded your post that you are not using a display manager, and you just have it boot to your default shell.  Are you able to switch to another tty when it hangs before displaying the prompt?

----------

## ONEEYEMAN

NathanZachary,

You assumption is correct. I did system upgrade from the LiveCD boot up from the plain Terminal. And there is no GUI available.

In terms of switching: yes, I can press Alt+F2 and switch to a different terminal, but it won't help, since I still see the hang.

Thank you.

----------

## tclover

You have obviously some faulty init script services! So, remove them promptly and boot without them, first. And then try starting one-by-one to identify the hang-faulty one and then fix it by whatever means... Sometimes, some malformed sed commands does that hang thing as well, so, use sed cautiously in init script or any command that can hang. You can boot using bash as your init by appending `init=/bin/bash' kernel command line; remove the local init scripts to somewhere `mv /etc/local.d/*.st{art,op} /root'; and then exec the real init `exec /sbin/nit' if using SysSvinit or whater init system you're using. Just fix the fault init services and start one-by-one by hand to identify the faulty ones. 

If that does not work... well then, remove `local' init service as well `rc-update del local' which should not be broken... And fix it by yoursel or by merging a new OpenRC.

Good luck!

EDIT: darn... looks like local service is started safely, the previous is irrelevent then. Set up looging support to rc.conf and remove samba related service...

----------

## ONEEYEMAN

tclover,

I don't run samba on start-up.  :Wink: 

Running rc-update I see following:

```

(chroot) livecd log # rc-update

binfmt      |  boot

bootmisc  |  boot

dbus        |             default

dcron       |             default

devfs       |                              sysinit

dmesg     |                               sysinit

fsck         |  boot

hostname |  boot

hwclock    |  boot

keymaps   |  boot

killprocs    |                                                   shutdown

kmod-static-nodea |                     syhsinit

local         |              default

localmount |  boot

loopback   |  boot

modules    |  boot

mount-ro   |                                                     shutdown

mtab         |  boot

net.eth0    |               default

net.wlan0  |               default

netmount   |               default

procfs        |  boot

root           |  boot

savecache  |                                                       shutdown

swap          |  boot

swapfiles     |  boot

sysctl          |  boot

sysfs           |                                  sysinit

sysklogd     |              default

termencoding |  boot

tmpfiles.dev  |                                   sysinit

tmpfiles.setup | boot

udev            |                                   sysinit

urandom      |   boot

```

Now those are the lines I see on the monitor when booting from the hard drive:

```

Bringing up interface eth0                                                        [ok]

Starting ifplugd on eth0                                                            [ok]

Backgrounding                                                                        [ok]

WARNING: net.eth0 has started, but is inactive

Bringing up interface wlan0                                                       [ok]

Starting up wpa_supplicant on wlan0

Successfully initialized wpa_supplicant

nl80211: Could not re-add multicast membership for vendor events: -2 (No such file or directory)

Starting wpa_cli on wlan0

Backgrounding

WARNING: net.wlan0 has started but is inactive

WARNING: netmount will start when net.eth0, et.wlan0 has started

Starting local

```

Every command execution is OK'ed.

What strange is the line about multicast on nl80211 as all options from this link are turned on.

The firmware for my b43 LP-PHY is also installed.

Any idea what is it about?

Thank you.Last edited by ONEEYEMAN on Sat Jul 04, 2015 1:32 pm; edited 1 time in total

----------

## ONEEYEMAN

ALL,

Here is the dmesg output booting from the hard drive.

I don't see anything wrong here.

Thank you.

----------

## tclover

I cannot tell if every service is started as expected because that rc output is only partial... only service having explicit error handling output some info. So, first, try to turn on debug mode on rc.conf (I don't remeber how to do that); second, append `single' to your kernel command line. And then, run `rc default' after loggin in to be able to have job control with `\Control-C'. You should get the service which is hanging. OpenRC is very poor in this regard--meaning any hanging service would stuck the boot up/shutdown without any possibility to control anything. Because, indeed, it looks like a service is hanging on something; so, getting to a sulogin shell will greatly help to get/kill the faulty service and fix it--not knowing what is hanging the boot up will keep you in the dark.

Now, plan C: If booting to single run level does not work... you should be pruning or removing service from boot run level untill you get what service is hanging. However, it does looks like a service in default or some app launched by a service in default run level is the faulty one here.

Good luck!

----------

## ONEEYEMAN

The dmesg showed the error about root partition.

After adding "rootfs=extr4" to the kernel line I was able to boot the machine.

Thank you.

----------

## ONEEYEMAN

This apparently is not yet solved.  :Sad: 

I sync'ed up my tree and upgraded everything successfully. Then I had to reboot.

After the reboot I have the same issue.

Is there any way I can post what I see on the screen?

Thank you.

----------

## eccerr0r

I had this happen on my machines and I think the root cause is exactly what NathanZachary is hinting at.

Here's another idea: remove or rename /etc/issue to something else and see if it behaves any better.

----------

