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.

Firstly I'd like to apologize if this sounds like a question already asked but the answers given were of no any help :/

Here's my situation.

I bought a USB key with Ubuntu 12.04 LTS from Canonical.

I partitioned a HDD on which Windows 7 is.

Changed the booting order to 'external first'.

Inserted my new USB and installed Ubuntu.

Every time I want to use Ubuntu I just have to plug in the USB.

If I want to use W7 I just have to un-plug the USB.

So far so good, I love Ubuntu!

Now though...

I want to stop pluging and un-pluging the USB.

I'd like to boot up and be presented with the GRUB on which I can just select what operating system I use without the USB as I do on another laptop I installed Ubuntu with a CD.

So I thing the right question is: how can I move the GRUB + Ubuntu installation from the USB to the HDD without loosing any file or customization?

Many thanks in advanced,

Eugene

share|improve this question

closed as unclear what you're asking by Braiam, Eliah Kagan, Radu Rădeanu, Eric Carvalho, jokerdino Sep 2 '13 at 14:20

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

3  
It is unclear where you installed Ubuntu. Did you install it on the partition that you had made on your HDD (and just boot it from USB)? If in doubt edit your question to add the output of both of the following commands: sudo fdisk -l and mount. –  Takkat Apr 17 '13 at 18:27
    
possible duplicate of Can't boot without Flash Drive plugged in –  Eliah Kagan Sep 2 '13 at 1:11
    
possible duplicate of How do I install Ubuntu? –  Eric Carvalho Sep 2 '13 at 12:02

1 Answer 1

Just copy USB linux partition partition using additional software (Norton Ghost, Partition Magic, GParted or mini Partition Wizard Home) and then install GRUB on your PC hard disk drive. To do this just boot your PC using USB pendrive. Then you have to do fallowing:

$sudo su
#fdisk -l

This will list your partition from all hard drive and pendrive. You have to see where is your linux paritition name (what hard drive? ex: hda1 or sda1...)

#mkdir /mnt/root

#mount /dev/hda1 /mnt/root

This will mount your hard disk partition hda1 with linux on it under /mnt/root.

#mount -o bind /dev /mnt/root/dev
#mount -t proc none /mnt/root/proc
#chroot /mnt/root

#mount /dev/hda1 /boot

#grub-install /dev/hda             
#update-grub

Those two lines will install GRUB on your hda disk drive.

reboot your PC, remove USB pendrive.

Remember "hda" is your hard disk drive, but "hda1" is your linux partition on exacly this drive. I think your linux partition on hard disk drive should be "hda2" or "hda3", but just like i said before you will see it after "fdisk -l" command.

share|improve this answer

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