Dual boot ubuntu 16.04 can not connect to internet

my computer has two hard drivers, I installed ubuntu 16.04 and win10 on them respectively with UEFI mode. Before I installed win10 on the HD, I used ubuntu for a while and everything worked fine. After I installed win10, I found that ubuntu could not connect to internet but win10 worked fine.
I tried everything on the internet and nothing worked. Then I just unplugged the HD which has win10 and restarted the computer, the ubuntu suddenly is able to connect to the internet.

I’ve moved this to the https://community.ubuntu.com/c/support-help-requests category because this site isn’t designed to take tech support questions. Sorry. I’d recommend using one of the official support channels listed on the Finding Help page.