If your Ubuntu PC suddenly stopped booting into the desktop, and if you aren’t really an expert user, then there would be very little that you could do about it. So for the most users, the only way of fixing it would be to reinstall the OS (you can always use the Live CD for backing up your data).
However, before going through all that hassle, you can try asking for help from experts (using online sources like Ubuntu Forums, ‘AskUbuntu.com‘ etc) and who knows, they might be able to help you fix your issue as easy as by issuing a single command! :). In these situations, before they can help you, you have to give them enough details first.
So supposing that you have a non-bootable Ubuntu OS, it would be extremely useful if we could somehow generate a ‘log’ that includes advanced details about certain aspects of your computer and its boot process, because sometimes, the log itself can provide the answer in the hand of an expert.
In those situations, there is this small but very useful tool called ‘boot_info_script’ that when run, scans your HDD and creates a log file (text file) which holds various boot related information (such as the HDD drive and its partitions and the boot loader related information etc).
Using it to generate a log output is pretty simple. First, boot into a Live Desktop session using your GNU/Linux distribution (I’m using Ubuntu for this example). I don’t think it’s a prerequisite, but if you can, try to use the Live CD/DVD/USB of the OS that’s having the booting issue. Then install the ‘boot_info_script’ and simply run it.
Then it’ll scan your computer and create a log output automatically and save these details into a text file called ‘RESULTS.txt’ in your ‘Home’ folder (which you can use while asking for help) on the Live Desktop session.
How to install and use it in Ubuntu?
Step 1: First use a Live CD/DVD/USB of Ubuntu and boot into the Live desktop session.
Step 2: Then enter the below command to open the ‘Ubuntu Software Center’ (if you use Ubuntu 11.10 or below, then please skip to step 4).
Step 3: Then from its upper menu, go to: ‘Edit’ -> ‘Software Sources …’, and under the ‘Downloadable from the Internet’ sub option, put a check-mark to enable the option called ‘Community-maintained free and open-source software (universe)’ as shown below.
Then click on the ‘Close’ button and then close the Software Center as well.
Step 4: Now put the below three commands to install it (currently you can install ‘boot_info_script’ in Ubuntu 12.04 Precise Pangolin and 12.10 Quantal Quetzal only. Other Ubuntu users will have to manually install it. For that, please visit this page for instructions, it’s pretty easy.)
sudo apt-get update
sudo apt-get install gawk
sudo apt-get install boot-info-script
Step 5: Then, simply enter the below command to run it.
That’s it. Now you’ll see a small output on the Terminal window and the ‘log’ will be saved in a file called ‘RESULTS.txt’ in your ‘Home’ folder.
Please remember that, there’s no guarantee that this log along will help other to help you fix your computer’s boot related issues, but it does come in handy. Good luck.