Mengembalikan Grub Linux Yang Hilang Karena Install Ulang Windows dengan cara :
Buka Terminal Linux (Ctrl+Alt+T) Kemudian Ketikkan Perintah Seperti dibawah ini :
Buka Terminal Linux (Ctrl+Alt+T) Kemudian Ketikkan Perintah Seperti dibawah ini :
❶Lankah Pertama Cek Partisi Linux dengan perintah
# sudo fdisk -l :
Device Boot Start End Blocks Id System
/dev/sda1 * 1 2550 20482843+ 7 HPFS/NTFS
/dev/sda2 2551 6559 32202292+ f W95 Ext’d (LBA)
/dev/sda5 2551 5100 20482843+ b W95 FAT32
/dev/sda6 5101 6316 9767488+ 83 Linux
/dev/sda7 6317 6559 1951866 82 Linux swap / Solaris
/dev/sda1 * 1 2550 20482843+ 7 HPFS/NTFS
/dev/sda2 2551 6559 32202292+ f W95 Ext’d (LBA)
/dev/sda5 2551 5100 20482843+ b W95 FAT32
/dev/sda6 5101 6316 9767488+ 83 Linux
/dev/sda7 6317 6559 1951866 82 Linux swap / Solaris
❷Sekarang ketik
# sudo mount -t ext4 /dev/sda6 /mnt/
→ CATATAN: sda6 adalah nama partisi Linux di laptop/PC. Anda bisa menggantinya sesuai partisi Linux di komputer Anda. ←
❸kemudian ketikan lagi :
# sudo mount -t proc proc /mnt/proc/
# sudo mount -t sysfs sys /mnt/sys/
# sudo mount -o bind /dev/ /mnt/dev/
# sudo chroot /mnt/ /bin/bash
# grub-install /dev/sda.
# sudo mount -t sysfs sys /mnt/sys/
# sudo mount -o bind /dev/ /mnt/dev/
# sudo chroot /mnt/ /bin/bash
# grub-install /dev/sda.
• akan muncul pesan seperti dibawah :
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install’.
(hd0) /dev/sda
❹ ketikkan seperti berikut :
# grub-install /dev/sda6
# grub-install /dev/sda6
• kemudian akan muncul pesan :
grub-setup: warn: Attempting to install GRUB to a partition instead of the MBR. This is a BAD idea.
grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and its use is discouraged.
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install’.
(hd0) /dev/sda
❺ kemudian ketikkan perintah:
# update-grub
# update-grub
• proses berjalan :
Generating grub.cfg …
Found linux image: /boot/vmlinuz-2.6.31-14-generic
Found initrd image: /boot/initrd.img-2.6.31-14-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Microsoft Windows 7 on /dev/sda2
done.