Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I used the USB installer to create a bootable USB pendrive from the Ubuntu 12.04 amd64 iso image.

I followed the basic installation and got Ubuntu on my laptop, alongside with Windows 7, which came with the machine.

The problem is I can't find any way to boot Ubuntu when starting windows, unless the pendrive is inserted at startup. When the pendrive is inside, GRUB appears, otherwise, nothing.

How can I fix this?

And, secondly, in case I now want to get rid of Windows 7 and assign all space to ubuntu,, what would be the best path to take, now?

share|improve this question

First Question

There are two ways to get grub back.

Method 1

While running Ubuntu via Pendrive, install boot-repair, open up a terminal and type the following:

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

boot-repair will automatically launch, if is doesn't, launch it via Dash. Select recommended repair and boot-repair will take care of repairing and getting back grub for you. Reboot.

Method 2

While running Ubuntu via Pendrive, you can mount the root partition into which you installed Ubuntu. To mount the partition, you can either mount it via Places in Nautilus or via terminal, by typing sudo mount /media/label_or_name_of_root_partition. For example, to mount the Ubuntu root partition labeled as ubuntu, do this:

sudo mount /media/ubuntu


sudo mount /mnt/ubuntu

After mounting the root partition of Ubuntu, reinstall grub by specifying the root Ubuntu partition and hard drive:

sudo grub-install --root-directory=/media/ubuntu /dev/sda

Do not include the partition number on /dev/sda because grub will be installed on the mbr of the hard disk not on a partition.

After the installation, you should see something like this:

Installation finished. No error reported.


Second Question

If the time comes and you want to completely remove Windows, you can use GParted to delete the Windows partition and increase the Ubuntu partition with the space gained. There are several tutorials you can find on the web or here to use GParted. This particular post would help you remove windows so Ubuntu fills the hard drive and this Ubuntu Community page remove Windows

share|improve this answer
The first method seems to be working fine. Thanks! – Temitope Jul 4 '12 at 10:47
You're very much welcome. Glad it worked. – Peachy Jul 4 '12 at 10:53

To repair your boot, use Boot-Repair graphical tool. It will reinstall GRUB and indicate a BootInfo URL in case you still have problems.

To remove Windows (or any OS), just use OS-Uninstaller graphical tool.

share|improve this answer

As for the second part of your question, one tool that you can use to resize/create/delete partitions is GParted. Here is one of many available guides out out there.

share|improve this answer

Your Answer


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.