Add win 10 to GRUB menu on Kali linux.
Mình có 2 ổ cứng :
- Ổ 1 cài Kali linux.
- Ổ 2 cài Win 10.
Khi boot thì mình chỉnh boot từ ổ kali linux. Nhưng khi muốm boot vào win 10 thì phải vào bios chỉnh laị boot từ win 10, như vậy rất mất thời gian. Nên hôm nay mình sẽ thêm lựa chọn boot win 10 trong menu boot của kali.
Đầu tiên cài 'os-prober', để linux nhận được partition của win 10.
sudo apt install os-prober
Ta kiểm tra xem linux nhận diện được ổ cứng win chưa.
sudo os-prober
/dev/sdb2@/efi/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
Để thêm win 10 vào menu GRUB của kali, ta dùng lệnh sau để cập nhật GRUB menu.
sudo update-grub
Generating grub configuration file ...
Found theme: /boot/grub/themes/kali/theme.txt
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-5.16.0-kali7-amd64
Found initrd image: /boot/initrd.img-5.16.0-kali7-amd64
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done
Ta thấy là GRUB chưa nhận được win 10. Ta thêm dòng sau vào file '/etc/default/grub'.
sudo nvim /etc/default/grub
GRUB_DISABLE_OS_PROBER=false
:wq
Sau đó update lại grub.
sudo update-grub
Generating grub configuration file ...
Found theme: /boot/grub/themes/kali/theme.txt
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-5.16.0-kali7-amd64
Found initrd image: /boot/initrd.img-5.16.0-kali7-amd64
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/sdb2@/efi/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
done
Như vậy khi boot từ kali linux, thì menu GRUB sẽ có thêm lựa chọn boot từ win 10.