0

accidently I chose recovery of windows in my grub menu and it promptly overwote now I dont have any boot at all. I have tried various methods with no success for example as below but when I get to sudo chroot /mnt it says unable to resolve host ubuntu.

running 11.10 x64

You'll need to install GRUB manually. To do that you'll have to boot up using a live CD then do the following:

  • Setup a chroot environment.
  • open a terminal and mount the root partition to /mnt

    sudo mount /dev/sdXy /mnt
    
  • sdXy being the root partition of your installed ubuntu, e.g. /dev/sda5. you can find that out using

       sudo fdisk -l
    
  • next, mount some virtual devices

     sudo mount --bind /dev /mnt/dev
     sudo mount --bind /proc /mnt/proc
     sudo mount --bind /sys /mnt/sys
    
  • chroot into the installed system

    sudo chroot /mnt
    
  • finally, (re)install GRUB

    grub-install --recheck /dev/sdX
    
  • sdX is the internal hard drive, probably /dev/sda and while we're at it, we may as well update it, too.

    update-grub
    
  • if there were no errors during the installation, you can type "exit" to leave chroot nd then simply reboot the computer. you should then be able to boot both windows and linux.

1 Answer 1

1

You might try using RescaTux. It is a live CD that will detect your operating systems and then install grub accordingly.

http://www.supergrubdisk.org/rescatux/

6
  • Dean I only have a blank screen with no boot or grub menu o w7 boot. can I use what you suggested by boting pc from cd?
    – Antony
    Jun 20, 2012 at 16:35
  • @Antony yes, u can. Rescatux works well.
    – Mahesh
    Jun 20, 2012 at 16:44
  • I downloaded it but would you believe that when I took the 11.10 cd out to replace it with rescatux ubuntu booted.all ok on its own????
    – Antony
    Jun 20, 2012 at 17:50
  • Anyone know of an explanation seeing how far I got with grub?
    – Antony
    Jun 20, 2012 at 17:50
  • @Antony, that is amazing. I have no explanation for that. But it looks like it's your lucky day! You should keep that Rescatux CD around for a rainy day. I think you can check this question as answered to close the question. Jun 20, 2012 at 17:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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