segunda-feira, 18 de abril de 2016

How to rescue the grub boot load

Sometimes when we have two operational system on hard drive, example Ubuntu and Windows, can errors occur in the boot.
Possible causes.

  • Update on Windows.
  • Upgrade Windows on other version for Windows 10.
  • Configuration boot loader on Windows.
  • Lost boot loader on hard drive 

The correction is simple, requires the Linux installation media installed.

Now you insert the media into the computer you need to fix the boot.

First open the terminal and run command with root.

#fdisk -l


See the partitions on the disk settings:

Disk /dev/sdb: 1000.2 GB, 1000200658432 bytes
255 heads, 63 sectors/track, 121600 cylinders, total 1953516911 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00087501

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048      976895      487424   83  Linux
/dev/sdb2          976896   196288511    97655808   83  Linux
/dev/sdb3       196290558  1953515519   878612481    5  Extended
/dev/sdb5       196290560   212289535     7999488   82  Linux swap / Solaris
/dev/sdb6       212291584  1953515519   870611968   83  Linux

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc92bea40

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048  1953516911   976757432    7  HPFS/NTFS/exFAT


This example show that partition /dev/sdb1 and /dev/sda1 are partition bootable. See that the partition /dev/sdb1 is my partition the boot on Linux and /dev/sda1 is partition the boot on Windows. Sure how the partition /dev/sda1 is partition primary, we will go record the bootloader the zero track HD. Use this command

#grub-install /dev/sda

Remember that Grub should be installed on the HD track zero,  as I installed Windows first, the zero track is Windows partition.
Be careful not to confuse the live partition on the HD partition, Grub should be applied to HD partition.
An easy way to remember and which the system was first installed in HD, the first partition is where the zero track.





Nenhum comentário:

Postar um comentário