fix-this! Posted January 8, 2009 Share Posted January 8, 2009 i currently have windows 7, vista & xubuntu installed using grub as the boot manager. i will be replacing my windows 7 x86 with x64 on friday and i know after i install windows it will wipe out grub. how can i re-install it or prevent this from happening ? Link to comment Share on other sites More sharing options...
Lechio Posted January 8, 2009 Share Posted January 8, 2009 To fix it, just boot with the Ubuntu CD and re-install GRUB. To prevent it from ever happening again you could make a dedicated partition for GRUB at the beginning of the disk and have the system boot from that active partition. Link to comment Share on other sites More sharing options...
fix-this! Posted January 8, 2009 Author Share Posted January 8, 2009 To fix it, just boot with the Ubuntu CD and re-install GRUB.To prevent it from ever happening again you could make a dedicated partition for GRUB at the beginning of the disk and have the system boot from that active partition. whats the command to reinstall grub ? Link to comment Share on other sites More sharing options...
Lechio Posted January 8, 2009 Share Posted January 8, 2009 sudo grub-install [OPTION] install_device Do "man grub-install" to read the manual page of the command. Link to comment Share on other sites More sharing options...
fix-this! Posted January 8, 2009 Author Share Posted January 8, 2009 So I boot into the live desktop and open a terminal and type the above command ? Link to comment Share on other sites More sharing options...
Lechio Posted January 8, 2009 Share Posted January 8, 2009 (edited) Yes. As an example, if you have GRUB installed on device sda you would run: sudo grub-install --no-floppy /dev/sda EDIT:You need to mount the partition where your Ubuntu is installed and chroot to there first. Edited January 8, 2009 by Lechio Link to comment Share on other sites More sharing options...
atlef Posted January 8, 2009 Share Posted January 8, 2009 The Ubuntu community documentation will show you how to do this. atlef. Link to comment Share on other sites More sharing options...
Lechio Posted January 8, 2009 Share Posted January 8, 2009 Here is the complete procedure on how to do it using the grub-install command and chrooting into the Ubuntu install (assuming you have Ubuntu installed on /dev/sda1): - Boot with the Ubuntu CD - Open a terminal and run: cd / sudo mkdir ubuntu sudo mount /dev/sda1 ubuntu sudo chroot ubuntu sudo grub-install --no-floppy /dev/sda sudo reboot Done. This is one of the easiest ways to do it. Link to comment Share on other sites More sharing options...
Recommended Posts