My machine won't boot or won't choose the right operating system when I choose it in the GRUB menu. What information do I need to provide in my questions so people can help me?
The boot info script it a great way to get information for what's going on, especially to troubleshoot what's going on with your boot and partitions.
For 12.04 and newer:
sudo apt-get install boot-info-script pastebinit
And then run
If you need to share the information with someone to help you with your partitions (especially here on Ask Ubuntu, you can use it in conjunction with
pastebinit to post your boot information on the web:
sudo boot_info_script --stdout | pastebinit
This will automatically send the information to paste.ubuntu.com and return a URL for you. Take that URL and then edit it to your question.
For 11.10 and earlier:
- Download the Boot Info Script
- Extract the zip file to a directory of your choice.
Open a terminal (Applications -> Accessories -> Terminal in Gnome) and type:
sudo bash [path/to/the/download_folder]/boot_info_script.sh
For example if you downloaded the file to the desktop, use:
sudo bash ~/Desktop/boot_info_script.sh
You will now have the file RESULTS.txt in the same directory as the script. But if the script is inside a system directory (like /usr or /etc) RESULTS.txt will be in the home directory.
If you have pastebinit installed you can send the results directly to paste.ubuntu.com:
sudo bash boot_info_script.sh --stdout | pastebinit
When you are able to boot into your installation, the way to go is given in Jorge Castro's answer. Additional info gathered from Boot logs is appreciated. (For details, scroll down.) When your system is totally broken, and refuses to boot the installation at any cost, here is an alternative.
Rescatux to your Rescue!!
Ok, now that we have a title, the procedure follows. Experiment with everything it has, but at your own risk, and you may even end up solving your issue. If you wish to avoid any trouble, follow the instructions, exactly.
- Download Rescatux. Rescatux is a boot-rescue cd. choose any one ISO image from that page. Latest stable version (the one without alpha/beta in title) is recommended.
- Burn it onto a CD, or, make a usb-stick bootable with that ISO. (Detailed instructions below)
Boot using the cd/usb-stick.
Note: You may need to press or hold down F12 or some other key (Usually shown at bottom corner of startup screen) and select Boot from CD or USB or some other relevant option to prevent automatic-booting from hard-drive.
Note that booting may not be straightforward on boot-restricted hardware, such as Macbooks. You are suggested to seek help from our friends at Ask Different in that case.
Select Rescatux 32 bit, or Rescatux 64 bit, as applicable. If in doubt, select 32-bit. If neither options are available, and you see 'live', select it.
Supportoption, followed by
Boot info scriptand then
- A confirmation message gets displayed, that bootinfo script run was Ok.
- Select Support, and then share_log. select bootinfoscript_log.txt, click next, and you will get a link to uploaded results. You may use that link when requesting for help.
- If you are offline, you may view logs by selecting that option under support, and can save that file elsewhere. On a different usb-stick,etc, and include that information when asking a question.
Include bootogs, if possible:
To access boot logs:
- If you can boot into your installation, start a terminal, and type
dmesg > dmesglog.txtand
cp /var/log/boot.log bootlog.txtand include contents of both files (dmesglog.txt and bootlog.txt), while asking the question. You should find them created in your home-directory, if you followed the instructions correctly.
- If you have any live cd, ( Ubuntu, Rescatux, or any other livecd): Open file-browser,
mount the disk with installation, navigate to var/log, and include contents of files
boot.logwhile asking a question.
To burn a CD:
- Using Ubuntu: Right-click on the downloaded iso and select
Write to disk.Follow on-screen instructions.
Alternatively, Search for
Disc burnerand open it. Choose the iso image, and follow on-screen instructions.
- Using Windows: Right-click on the downloaded iso, and select 'Burn Disk Image'. You will be guided by CD burning wizard.
Else, search and open Windows Disc Image Burner, and follow the on-screen instructions. Choose the proper iso file (the one you downloaded) when prompted.
- Using Mac/Other Linux Distros: Most probably, you will have a right-click menu option. Else, use your default disc-burning utility. (Update with specific instructions welcome.)
To make bootable usb-stick:
- Suggested tool: Unetbootin. (Works on Windows, Linux, and MacOSX.)
- Experienced users may find it easier to use
sudo dd if=<path-to-iso> of=<USB-drive-here>
sudo dd if=~/rescatux.iso of=/dev/sdbReplace sdb with whatever the usb disk is, and ~/rescatux.iso with path to your iso file)
DO NOT USE
ddif you are inexperienced. typing just a single letter wrong could potentially leave your entire hard-disk unbootable that can only be fixed by reinstalling, and may cause permanent data loss.
If you can't boot into the system, use the "try out" mode of the ubuntu install cd. This will give you a graphical desktop running from your cd/dvd.
You can then mount your root partition and reinstall grub using boot-repair.