https://research.ng-london.org.uk/wiki/index.php?title=Reinstalling_Grub&feed=atom&action=history Reinstalling Grub - Revision history 2024-03-28T11:50:46Z Revision history for this page on the wiki MediaWiki 1.38.2 https://research.ng-london.org.uk/wiki/index.php?title=Reinstalling_Grub&diff=32&oldid=prev Jpadfield: Created page with "This page is part of the Linux Setup discussion. ==Reinstalling from LiveCD== This is a quick and simple method of restoring a broken system's GRUB 2 files. The terminal is..." 2010-11-18T14:55:44Z <p>Created page with &quot;This page is part of the <a href="/wiki/index.php/Linux_Setup" title="Linux Setup">Linux Setup</a> discussion. ==Reinstalling from LiveCD== This is a quick and simple method of restoring a broken system&#039;s GRUB 2 files. The terminal is...&quot;</p> <p><b>New page</b></p><div>This page is part of the [[Linux Setup]] discussion.<br /> <br /> ==Reinstalling from LiveCD==<br /> <br /> This is a quick and simple method of restoring a broken system's GRUB 2 files. The terminal is used for entering commands and the user must know the device name/partition of the installed system (sda1, sdb5, etc). The problem partition is located and mounted from the LiveCD. The files are then copied from the LiveCD libraries to the proper locations and MBR. It requires the least steps and fewer command line entries than the following methods.<br /> <br /> * Boot to the LiveCD Desktop (Ubuntu 9.10 or later).<br /> * Open a terminal by selecting Applications, Accessories, Terminal from the menu bar.<br /> * Determine the partition with the Ubuntu installation. The fdisk option &quot;-l&quot; is a lowercase &quot;L&quot;.<br /> sudo fdisk -l<br /> <br /> If the user isn't sure of the partition, look for one of the appropriate size or formatting.<br /> <br /> Running sudo blkid may provide more information to help locate the proper partition, especially if the partitions are labeled. The device/drive is designated by sdX, with X being the device designation. sda is the first device, sdb is the second, etc. For most users the MBR will be installed to sda, the first drive on their system. The partition is designated by the Y. The first partition is 1, the second is 2. Note the devices and partitions are counted differently. <br /> <br /> * Mount the partition containing the Ubuntu installation.<br /> sudo mount /dev/sd''xY'' /mnt<br /> Example: sudo mount /dev/sda1 Note: If the user has a separate /boot partition, this must be mounted to /mnt/boot<br /> * Run the grub-install command as described below. This will reinstall the GRUB 2 files on the mounted partition to the proper location and to the MBR of the designated device.<br /> sudo grub-install --root-directory=/mnt/ /dev/sdX<br /> Example: sudo grub-install --root-directory=/mnt/ /dev/sda<br /> * Reboot<br /> * Refresh the GRUB 2 menu with:<br /> sudo update-grub</div> Jpadfield