Sunday, July 29, 2018

Dual Boot between PCIe M.2 and SATA in HP 840 G2.

Holly PCIe/M.2 battman, I took me 5 try's to get Kali linux on the M.2 and Windows 10 on the 500GB SATA to dual boot from options in BIOS. F9 at start up, choose the drive, boot. So , yes I can be done and yes GRUB likes to mess up boot loaders. I got ti get my GRUB on. < see what I did there.

This is what should have worked.



  1. install Windows 10 on the SATA and make sure all is good.
  2. remove Windows 10 SATA and install PCIe M.2 and install Kali and make sure all is good.
  3. Put Windows 10 back in and check fur dual boot.

End result, Windows works but Kali does not boot.


Boot with Kali Live USB and fix GRUB


The below are the steps I followed to get it back working.


mount /dev/sda* /mnt
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mkdir /mnt/sys/firmware/efi/efivars
mount --bind /sys/firmware/efi/efivars /mnt/sys/firmware/efi/efivars
mkdir /mnt/boot/efi
mount /dev/sda+ /mnt/boot/efi
mount -o remount,rw /dev/sda+ /mnt/boot/efi
mkdir /mnt/hostrun
mount --bind /run /mnt/hostrun
chroot /mnt
mkdir /run/lvm
mount --bind /hostrun/lvm /run/lvm
grub-install /dev/sda
update-grub
exit
umount /mnt/dev
umount /mnt/proc
umount /mnt/sys/firmware/efi/efivars
umount /mnt/sys
umount /mnt/boot/efi
umount /mnt/hostrun
umount /mnt/run/lvm
umount /mnt
REBOOT


Now Kali works but Windows 10 no longer boots.


Removed PCIe M.2 and fix Windows10 boot loader


Boot with Windows 10 USB installer

Choose repair my computer
Select command prompt
type -> Bootsect /nt60 driveletter: /mbr

Put PCIe M.2 back in


Check dual boot with F9


WORKING

No comments:

Post a Comment