I have Windows 10 installed on SSD (240GB plugged in sata express slot) and then I have plugged M.2 SSD (240GB) to install Ubuntu 18.04 on it. In the end of installing Ubuntu 18.04 the setup program gives message about failing to install bootloader. GParted shows initial partitions including Windows on /dev/sdb and Ubuntu related partition - on /dev/sda. I have googled and looked through some articles about dual booting but I have no idea how to solve this issue.
Thanks in advance.
/dev/sda
is the better choice because the Ubuntu installer installed grub on the same drive as Ubuntu was installed on + it can boot to Windows. I recommend booting from the same Ubuntu USB that you used to install and installing Boot-Repair on the Ubuntu USB from a live session ("Try Ubuntu") and run the Recommended repair. If that doesn't work try the answers to Dual-boot boot menu does not show up after installing Ubuntu 15.10 alongside Windows 10. – karel Dec 01 '19 at 11:55