Thứ Ba, 16 tháng 6, 2015

Nếu các bạn cài windows sau khi cài linux thì mặc định bootloader chỉ nhận windows, không xuất hiện Ubuntu / linux, hướng dẫn sau giúp bạn khắc phục điều này.

How to Restore GRUB2 after installing Windows:

1. Boot from an Ubuntu Live CD or Live USB
2. Once up and running, Open a Terminal



3. Type sudo su (press enter after typing each command)
4. Type fdisk -l



5. Note which device contains your Linux partition (IE: /dev/sda1)


6. Type mount /dev/sdx# /mnt (replacing x# with your actual device and partition number)
7. Type mount --bind /dev /mnt/dev
8. Type mount --bind /proc /mnt/proc
9. Type cp /etc/resolv.conf /mnt/etc/resolv.conf
10. Type chroot /mnt


11. Type grub-install --recheck /dev/sdx (replacing x with your actual device)

12. Type reboot (to reboot your PC)




Make sure to remove your Live USB or CD. Upon reboot you should be presented with a GRUB2 menu. However, Windows is missing. Now, I show you how to fix that.

Making GRUB 2 detect Windows Installs:
1. Proceed to boot into your Linux environment.
2. Open a terminal and type sudo update-grub (enter your root password when prompted)



If all went well, grub should have updated it's menu entries to reflect what it detected. Including existing Windows partitions.

Chúc các bạn thành công!

Nguồn http://www.lancelhoff.com

0 nhận xét:

Đăng nhận xét