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've installed windows 7 and then Ubuntu 11.10, and then set up everything on easyBCD.

When I select Ubuntu on the boot menu, I end-up in grub prompt (like "grub>" in a black screen) instead of loading Ubuntu directly.

I have to run:

grub>  root (dh0,4)
grub>  kernel /vmlinuzblahblah root=/dev/sda6
grub>  boot

Every time to boot Ubuntu(where vmlinuz is a long filename I always tab).

How could I skip this process?

share|improve this question
    
Try reinstalling grub from Synaptic or do " sudo update-grub" from Ubuntu installed system. –  tijybba Jun 22 '12 at 6:17
add comment

2 Answers

up vote 1 down vote accepted

My "Fix-Grub-routine" is as follows:

  1. Boot from an Ubuntu LiveCD (USB key usually)
  2. Mount the /root and /boot partition of my original install in the live environment. Lets say my root is mounted in /tmp/myRoot/ and boot in /tmp/myBoot/
  3. Mount/bind a few important directories
    sudo mount --bind /dev /tmp/myRoot/dev
    sudo mount --bind /proc /tmp/myRoot/proc
    sudo mount --bind /sys /tmp/myRoot/sys
    sudo mount --bind /tmp/myBoot /tmp/myRoot/boot
  4. Chroot into my original installation
    sudo chroot /tmp/myRoot/
  5. Now I'd usually do update-grub but since you messed up your bootsystem using some weird third-party application, I think it might be better to re-install grub using grub-install /dev/sda *.
  6. When done, exit the chroot and reboot the system (without your live-media)

Note: Replace /dev/sda with the drive you want grub to be installed on!

Note2: Most of this information used to be on an Ubuntu wikipage called RecoveringUbuntuAfterInstallingWindows. While finding this page to link to in this post I noticed the page has had quite a change. The chrooting and stuff is not described anymore but instead a boot-repair utility is available on some live cds. I have not experience with it, but I suppose it's worth a shot.

share|improve this answer
    
boot repair is indeed excellent. especially for unexperienced users. –  cipricus Sep 10 '12 at 10:34
add comment

Assuming Windows 7 boot environment is in control of the booting: (Windows 7 MBR and Windows PBR + bootmgr + \Boot folder with BCD store on active partition)

  1. Boot Ubuntu LiveCD and reinstall GRUB2 to Partition boot record.
  2. Copy file /boot/grub/boot.img from Ubuntu to Windows 7 "\" root folder.
  3. Reboot to Windows 7. Download and install Visual BCD Editor.
  4. Create BootSector Loader. (rightclick select "Create BootSector Loader")
  5. Amend drive and path of created loader to point to drive and path of "boot.img"

That's all.

share|improve this answer
1  
oh, thanks. Now my pc doesn't even boot. –  galmeida Mar 4 '12 at 19:16
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.