LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Hangup at boot.. (https://www.linuxquestions.org/questions/ubuntu-63/hangup-at-boot-599149/)

uncle-c 11-12-2007 04:28 PM

Hangup at boot..
 
Hi,
I'm running Ubuntu Server 7.04 and been having this annoying problem ever since the inital installation. The system boots up fine until the last phase when it reaches Running local boot scripts ( /etc/rc.local) whereupon it just stops. I press enter and the boot process carries on to the login prompt. Now I've checked the rc.local file and it is basically empty with everything commented out except the following on the last line :

Code:

exit 0
I've ran dmesg and do not get any clues. Even deleted "exit 0" from the file but no change.
Any ideas / solutions ??

Thanks again !
Uncle-C

Brian1 11-12-2007 05:53 PM

You might see if there are any other Startup scripts that are run at boot. Look at say /etc/rc3.d and rc.5.d and see if there are any files after S99local. Maybe they are the issue. During boot it goes through each runlevel that is needed but not sure on Ubuntu setup. Normally on Redhat type runlevel 3 is multiuser/networking enabled. Where runlevel 5 is multiuser/networking/Xserver. Each one starts in sequence 01 to 99 and aphabetically after the number.

Brian

uncle-c 11-13-2007 03:47 AM

Thanks Brain. I do not have X installed so am starting at runlevel 3.
I checked the /etc/rc3.d directory and the only file after S99local is S99rmnologin. I renamed S99rmnlogin to D99rmnologin but to now avail.
I think there may be some problems with my startup scripts. I get a Ubuntu login prompt before any of my services start as you can see from the output below :

Code:


* Mounting local filesystems ...
* Activating Swap file ...
* Configuring Network Interfaces ...
* Setting up console font and Keymap ...
* Starting system log daemon ...
Ubuntu 7.04 ubuntu tty1
 
ubuntu login :

* Starting kernel log                          [ok]

* Starting Samba daemons                        [ok]

* Starting OpenBSD Secure Shell Server          [ok] 

* Starting FTP Server : vsftpd                  [ok] 

* Starting the Winbind daemon winbind          [ok]

* Running local boot scripts (/etc/rc.local)    [ok]

Freezes at this point but if I press ENTER I get to my login prompt.

Thanks again,

Uncle.

Brian1 11-13-2007 05:40 PM

Got no more ideas.

Brian

erichwtl 01-26-2008 01:59 PM

Quote:

Originally Posted by uncle-c (Post 2957230)
Thanks Brain. I do not have X installed so am starting at runlevel 3.
I checked the /etc/rc3.d directory and the only file after S99local is S99rmnologin. I renamed S99rmnlogin to D99rmnologin but to now avail.
I think there may be some problems with my startup scripts. I get a Ubuntu login prompt before any of my services start as you can see from the output below :

Code:


* Mounting local filesystems ...
* Activating Swap file ...
* Configuring Network Interfaces ...
* Setting up console font and Keymap ...
* Starting system log daemon ...
Ubuntu 7.04 ubuntu tty1
 
ubuntu login :

* Starting kernel log                          [ok]

* Starting Samba daemons                        [ok]

* Starting OpenBSD Secure Shell Server          [ok] 

* Starting FTP Server : vsftpd                  [ok] 

* Starting the Winbind daemon winbind          [ok]

* Running local boot scripts (/etc/rc.local)    [ok]

Freezes at this point but if I press ENTER I get to my login prompt.

Thanks again,

Uncle.

Uncle, I have the same problem too. I've tried to do a google search, browse through various linux/ubuntu forums but have to found the answer to this particular problem. Is there anyone else here that may know how to resolve this problem. Thank you in advance.

rtcwls 01-30-2008 10:03 AM

I am having the exact same problem :(

Any help would be greatly appreciated.

zamula 02-18-2008 04:35 PM

I too get a login before many of my services start. It doesn't hang up, per se, but there's no obvious indication that I can enter my user name after the other services run. However, if I just type in my name it will then prompt me for my password and login works like normal. It's just a little annoying. Does anyone know of a fix for this?

awalli 03-27-2008 04:40 AM

there is no freeze!
 
I see the same on my Ubuntu Server 7.10.
In my opinion there is no freeze at all, but the login prompt shows up before all init-scripts are done.
It's cosmetic, but I want to see the login prompt *after* all scripts have finished.
Any ideas?
--
Thomas

awalli 03-27-2008 06:46 AM

and now I found the solution
 
I found the solution at http://forum.wchost.com.hk/viewtopic.php?f=9&t=30

The trick is to start tty1 through an event (Ubuntu uses Upstart) and not by runlevel.

I tried the following and it works!

1. edit /etc/event.d/tty1:

nano /etc/event.d/tty1

Code:

start on runlevel 2
goes to

Code:

# to start at 'the end' of runlevel 2
# use event 'lvl2complete'

#start on runlevel 2
start on lvl2complete

2. create a script in '/etc/rc2.d', call it 'S99zzzlvl2complete' and make it executable:

nano /etc/rc2.d/S99zzzlvl2complete

Code:

#!/bin/bash
initctl -q emit lvl2complete

chmod +x /etc/rc2.d/S99zzzlvl2complete

fortunately there is no risk because we can use tty2 if tty1 does not start
but it does :)

zamula 03-28-2008 01:59 PM

Oops, I realized I forgot to post the solution I found to this! awalli, thanks for your find as well. When I was looking around for a fix I ran into this thread on the Ubuntu development site, which had a very nice fix. It's worked great for me. All you have to do is change one line in tty1:

Quote:

Originally Posted by Tribaal
I think the most appropriate solution is to delay tt1 only.
This way the boot messages will be displayed in a proper fashion:
- Boot messages
- (All daemons started)
- Show the login prompt

Login via ssh is not affected in any way, and most probably this is how system admins will login to a headless server, so the cosmetic change will only be a change for the better.
In my particular case (I'm building virtual appliances), the cosmetic change makes all the difference in the world in the eyes of my clients (having a tidy login prompt looks more "professional").

I believe the change should be what Dario Berzano suggested:

In /etc/event.d/tty1:
Replace
"start on runlevel 2"
with
"start on stopped rc2"

I think it actually SOLVES the bug, not just works around it: it's the proper way to make sure an upsart daemon starts on the end of rc2.
I really hope this will make it into hardy.

- Trib'

I did this, and it worked perfectly for me. There's even a patch for download at the site I linked to, if you'd rather not do it by hand (though it's quite easy to do so). It looks like this fix may be included in the next version of Ubuntu.

markus27183 04-14-2009 08:10 PM

ubuntu loadup error
 
I get the same error. Have tried both the fixes above to no avail.
I installed it on a new hard drive on an intel processor and motherboard. Then I transferred it into an AMD machine, then I get this error. It works fine on the intel machine. Could it be a processor/driver error?


All times are GMT -5. The time now is 06:28 PM.