| Current Path : /var/www/html/mmishra/mm/ |
| Current File : /var/www/html/mmishra/mm/bootsect |
When installing the GRUB boot loader, install it on your /boot partition rather than the MBR.
Note: For instance, my /boot partition is /dev/sda5. So I installed GRUB at /dev/sda5 instead of /dev/sda.
Under Linux make a copy of the boot info by typing the following at the command shell:
my_windows_part=/dev/sda3
my_boot_part=/dev/sda5
mkdir /media/win
mount $my_windows_part /media/win
dd if=$my_boot_part of=/media/win/linux.bin bs=512 count=1
Boot to Windows and open up and you should be able to see the FAT32 partition. Copy the linux.bin file to C:\. Now run cmd with administrator privileges (navigate to Start > All Programs > Accessories, right-click on Command Prompt and select Run as administrator):
bcdedit /create /d “Linux” /application BOOTSECTOR
BCDEdit will return an alphanumeric identifier for this entry that I will refer to as {ID} in the remaining steps. You’ll need to replace {ID} by the actual returned identifier. An example of {ID} is {d7294d4e-9837-11de-99ac-f3f3a79e3e93}.
bcdedit /set {ID} device partition=c:
bcdedit /set {ID} path \linux.bin
bcdedit /displayorder {ID} /addlast
bcdedit /timeout 30
Reboot and enjoy.