How I Restored GRUB2 after a Windows 7 Install. GRUB2
(Grand Unified Bootloader) is a universal bootloader used by
Ubuntu and other Linux Distributions. If you have a Linux
Distribution installed on a partition, and attempt to install
Windows alongside it, your GRUB bootloader will be overwritten by the
Windows bootloader, and your computer will only boot into Windows.
Recovering the GRUB2 Bootloader after a Windows Install is simple. When finished, your Bootloader should detect all installed Operating Systems and automatically add a bootable menu item for each of them.
Note: This GRUB2 Installation process assumes that a Linux Partition still exists. If you overwrote Linux with Windows, this tutorial will not work for you, as there is no Linux system to recover boot.
How to Restore GRUB2 after installing Windows:
Making GRUB 2 detect Windows Installs:
Recovering the GRUB2 Bootloader after a Windows Install is simple. When finished, your Bootloader should detect all installed Operating Systems and automatically add a bootable menu item for each of them.
Note: This GRUB2 Installation process assumes that a Linux Partition still exists. If you overwrote Linux with Windows, this tutorial will not work for you, as there is no Linux system to recover boot.
How to Restore GRUB2 after installing Windows:
- Boot from an Ubuntu Live CD or Live USB
- Once up and running, Open a Terminal
- Type
sudo su
(press enter after typing each command) - Type
fdisk -l
- Note which device contains your Linux partition (IE: /dev/sda1)
- Type mount /dev/sdx# /mnt (replacing x# with your actual device and partition number)
- Type
mount --bind /dev /mnt/dev
- Type
mount --bind /proc /mnt/proc
- Type
cp /etc/resolv.conf /mnt/etc/resolv.conf
- Type
chroot /mnt
- Type
grub-install --recheck /dev/sd
x (replacing x with your actual device) - Type
reboot
(to reboot your PC)
Making GRUB 2 detect Windows Installs:
- Proceed to boot into your Linux environment.
- Open a terminal and type
sudo update-grub
(enter your root password when prompted)
No comments:
Post a Comment