Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have installed the Ubuntu 12.04 using a bootable USB. The installation went fine but after the installation there was just a blank screen with the cursor blinking and Ubuntu wasn't starting. Maybe that was an installation error but when I booted again from my USB surprisingly Ubuntu started working. Even if I remove the USB after the initial boot, Ubuntu keeps working fine. Do I have to boot from my USB each time I restart my computer?

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

The problem

Grub, Ubuntu's bootloader, was installed on the flash drive, and not on your internal hard drive, as it should have been.

Solution

Boot with the flash drive plugged in. Remove it once Ubuntu is booted up.

Run the following commands from a Terminal:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair
boot-repair

Click on the "Recommended repair" button, and reboot.

Explanation

Boot-Repair installed Grub to your internal hard drive. This allows your computer to boot without depending on the bootloader that was installed on the flash drive.


Glossary

Bootloader: a piece of code that runs before any operating system is running. A bootloader is used to boot other operating systems. Each operating system usually has its own bootloader.

GRUB (Grand Unified Bootloader): a bootloader package developed to support multiple operating systems and allow the user to select among them during boot-up. It is Ubuntu's default bootloader.

Command, command line: the traditional Unix environment , where you type commands to tell the computer what to do.

Terminal: an application that allows you to access the command line. Open it by hitting its keyboard shortcut, Ctrl Alt T

share|improve this answer
    
charlo when and where will the "recommend repair" button appear? at the end this appeared in the terminal "W: Failed to fetch cdrom://Ubuntu 12.04 LTS Precise Pangolin - Release i386 (20120423)/dists/precise/restricted/binary-i386/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs" –  Laphanga Jul 12 '12 at 19:54
    
As soon as Boot-Repair is installed. Give it time. :) Are you connected to the internet? –  SirCharlo Jul 12 '12 at 19:57
    
yes i am connected to the internet. it ended like this in the terminal: W: Failed to fetch cdrom://Ubuntu 12.04 LTS Precise Pangolin - Release i386 (20120423)/dists/precise/restricted/binary-i386/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs E: Some index files failed to download. They have been ignored, or old ones used instead. zaigham@Zaigham-Inspiron-N4050:~$ –  Laphanga Jul 12 '12 at 20:00
    
btw how do you remember these lengthy commands. One should have an excellent memory to remember all these commands =) –  Laphanga Jul 12 '12 at 20:02
    
Ok, try them individually then. sudo add-apt-repository ppa:yannubuntu/boot-repair, then sudo apt-get update, then sudo apt-get install -y boot-repair, and finally boot-repair. And I don't remember them ;) –  SirCharlo Jul 12 '12 at 20:04
show 1 more comment

As SirCarlo says on his answer, this is caused for not installing mbr on the internel drive.

I prefer this solution myself.

  1. Boot to the Ubuntu using USB drive.

  2. Open a terminal and use this command

    sudo grub-install /dev/sda
    
  3. Then this command

    sudo update-grub
    

Note: If you have more than one hard drive, including USB drive, the system assigns letter a, b, c ... to them. Such as /dev/sda for First hard disk, /dev/sdb for second hard disk. Use sudo blkid command to see the actual hard disk letter for your internal drive.

share|improve this answer
    
but I am still not sure why grub was installed on my USB drive instead of the hard drive. Is it some kind of bug in the installation, because I see many other guys are having the same problem. Thanks btw –  Laphanga Jul 14 '12 at 21:58
    
@Laphanga that can be another question. It may be because, it is booted from USB. When you select a partition in local hard drive, the boot device changes to /dev/sda. But it requires some secs. may be you clicked "install" button very quickly. This is only my assumption. I'm not sure exactly. –  Anwar Shah Jul 15 '12 at 4:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.