# How do I connect to internet using ethernet before booting from a SD card in yocto?

**URL:** <https://forums.digi.com/t/how-do-i-connect-to-internet-using-ethernet-before-booting-from-a-sd-card-in-yocto/21298>\
**Category:** Linux\
**Tags:** ethernet, linux, embedded-linux, ccimx6ulsbc, yocto\
**Created:** [April 20, 2020, 6:11am UTC](https://forums.digi.com/t/how-do-i-connect-to-internet-using-ethernet-before-booting-from-a-sd-card-in-yocto/21298 "2020-04-20T06:11:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pablovi96](https://avatars.discourse-cdn.com/v4/letter/p/91b2a8/32.png) [@pablovi96](https://forums.digi.com/u/pablovi96)\
**Post date:** [April 20, 2020, 6:11am UTC](https://forums.digi.com/t/how-do-i-connect-to-internet-using-ethernet-before-booting-from-a-sd-card-in-yocto/21298/1 "2020-04-20T06:11:48Z")

</div>

Hi!

I want to be connected to internet through ethernet cable before I finish the boot.  
I run a .sh script when the boot finishes which uses internet. When I boot via tftp this script works but when I boot from a sd card doesnt work. I have tried to do: setenv ipaddr 192.168.xxx.xxx and then saveenv but didnt work.

What could I do to configure the internet before booting automatically?

---

<div class="post-metadata">

**Author:** ![LeonidM](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@LeonidM](https://forums.digi.com/u/LeonidM)\
**Post date:** [April 20, 2020, 3:10pm UTC](https://forums.digi.com/t/how-do-i-connect-to-internet-using-ethernet-before-booting-from-a-sd-card-in-yocto/21298/2 "2020-04-20T15:10:25Z")

</div>

ethernet driver loads during kernel boot as any other driver. Once the driver is loaded network manager starts and configures interfaces. You need to call your script after the network manager init.  
You can try calling in your script something like:  
ifconfig eth0 up  
ifconfig eth0 192.168.1.7 netmask 255.255.255.0  
or something like that to have network temporarily until network-manager starts
