HOWTO debug Ubuntu boot hang
HI guys, I've got a version of Ubuntu 13.10 in my Virtualbox OSE virtual computer. It hangs very early in the boot. GRUB runs and the boot starts. In /var/log/boot.log, I see the same messages as I see on the screen. I have to press ESC to see the text while the computer boots. There are perhaps 3 or 4 "Starting <service>....OK" messages, and that is all. I never get a chance to log in. The problem I have is that I don't know in which order the boot scripts are supposed to run. With the "old" initscripts, one would see Snn<script> or Knn<script> and the "nn" would be the number representing the order in which the scripts are "S"tarted or "K"illed. That isn't the case here. I've found the boot scripts in /etc/init/*.conf so I can match boot messages to scripts. However, I'm unable to determine which script got stuck since I don't know the order of execution. My version of 13.10 is customized, not stock, so I can't compare to a known good. Any ideas would be greatly appreciated. Thanks! Andy -- Andy Stewart (KB1OIQ) Founder: Worcester Linux Users' Group Founder: Chelmsford Linux Meetup Group President: PART of Westford, MA (WB1GOF)
Andy Stewart writes:
The problem I have is that I don't know in which order the boot scripts are supposed to run. With the "old" initscripts, one would see Snn<script> or Knn<script> and the "nn" would be the number representing the order in which the scripts are "S"tarted or "K"illed. That isn't the case here.
The manpage for systemd(1) has this tidbit:
--test Determine startup sequence, dump it and exit. This is an option useful for debugging only.
That sounds like it might be useful. --MCV.
On 03/13/2014 10:18 PM, Michael C Voorhis wrote:
Andy Stewart writes:
The problem I have is that I don't know in which order the boot scripts are supposed to run. With the "old" initscripts, one would see Snn<script> or Knn<script> and the "nn" would be the number representing the order in which the scripts are "S"tarted or "K"illed. That isn't the case here.
The manpage for systemd(1) has this tidbit:
--test Determine startup sequence, dump it and exit. This is an option useful for debugging only.
That sounds like it might be useful.
--MCV.
I'm not sure that Ubuntu is using systemd - yet. I'm running version 13.10. http://www.zdnet.com/after-linux-civil-war-ubuntu-to-adopt-systemd-700002637... I have a feeling that I need to figure out how to debug upstart, but I'm not sure. Andy -- Andy Stewart (KB1OIQ) Founder: Worcester Linux Users' Group Founder: Chelmsford Linux Meetup Group President: PART of Westford, MA (WB1GOF)
Lots of details here: http://upstart.ubuntu.com/cookbook My problem seems to be something to do with networking. None of the network related services are starting. More news later..... Andy -- Andy Stewart (KB1OIQ) Founder: Worcester Linux Users' Group Founder: Chelmsford Linux Meetup Group President: PART of Westford, MA (WB1GOF)
Andy Stewart writes:
Lots of details here: http://upstart.ubuntu.com/cookbook My problem seems to be something to do with networking. None of the network related services are starting. More news later..... Andy
In FreeBSD I've run into issues with this specific problem, where DHCP runs and then netowrk dependent services start before they should. The FreeBSD folks eventually remedied the problem ("SYNCDHCP" setting for network interfaces) but my initial "fix" was to edit the network start script and add a "sleep 5" or "sleep 10" line in there allowing the networking to settle. Other cures have been to insert a ping or a dig call which must succeed, before allowing the boot process to continue. MCV.
Andy> I've got a version of Ubuntu 13.10 in my Virtualbox OSE virtual Andy> computer. It hangs very early in the boot. GRUB runs and the Andy> boot starts. I've moved to Linux Mint myself, but it's based on Ubuntu and I've noticed that my main desktop, which NFS mounts home dirs and other stuff, takes *forever* to actually boot not. There's something in the setup which hangs for five minutes or so (not sure, I just walk away right now cause I rarely reboot the box...) before it continues. Have you just let the boot sit there to see if it ever finishes? I've been meaning to turn on verbose debugging to try and figure out what's going on too, but it's a low priority. Andy> In /var/log/boot.log, I see the same messages as I see on the Andy> screen. I have to press ESC to see the text while the computer Andy> boots. There are perhaps 3 or 4 "Starting <service>....OK" Andy> messages, and that is all. I never get a chance to log in. So which services start? Or more accurately, which is the last service to start? Have you looked in /var/log/upstart as well? You might be able to also setup your system so that init (upstart) is started with the -v option to increase verbosity. Andy> The problem I have is that I don't know in which order the boot Andy> scripts are supposed to run. With the "old" initscripts, one Andy> would see Snn<script> or Knn<script> and the "nn" would be the Andy> number representing the order in which the scripts are "S"tarted Andy> or "K"illed. That isn't the case here. They're supposed to run according to events, not any particular order. The idea is that as things become ready, the next step can fire off more quickly, without the system getting stuck behind some hanging process. Good luck! John P.S. Another idea might be to try and boot a default 13.10 install in another VM and see how that looks in the console. It should be similiar at least, if not fairly identical. John
participants (3)
-
Andy Stewart
-
John Stoffel
-
Michael C Voorhis