I am attempting to install OpenWRT on a Raspberry Pi 2 B v1.1. I have at my disposal a monitor, USB keyboard, windows laptop for ssh access, an ethernet connection (but only one ethernet port), and the ubiquitous Edimax brand USB WiFi adaptor. The problem is as follows:
The pi doesn't have WiFi built in, as it is a version that doesn't have that feature. I cannot use an Edimax USB WiFi adapter to connect it, as the drivers for it are not installed. to install the drivers i need to connect to the internet. Attempting to connect to my router via the ethernet port fails. I searched for solutions to these issues, and all of them suggest running opkg update. I cannot do this, as there is no connection over which to download the files. I cannot get a newer pi due to a stock shortage and price scalpers.
So you can see my issue: I have essentially, due to hardware limitations, been caught in a catch-22. I am very new to networking, so please explain any solutions as if I was 5.
Im not sure I understand what you are suggesting I do. how exactly does one connect in that manner? (i wasn't exaggerating when i said I'm very new to all this.)
First make sure you get the correct image of Openwrt on to the Pi2's sd card. Put the sd card in and power on the PI. Then connect your PC to the Pi and follow this to set it as a DHCP client. Ignore the fixed IP instructions for now, but you will use them later. After you do this you can connect the PI to the router and then connect to it via SSH with it's new IP address that it received from the router. Then you can install packages etc with internet. When you're done setting up the Pi you can set the fixed IP for it again with the instructions from the link so that you can connect clients via the ethernet port.
If you don't like this method you can still figure out how to use serial console as other's have said or add a usb ethernet adapter as suggested below me.
Be aware that alle RPis below the RPi4 are limited by their USB 2.0 based system bus, meaning they are not suited to be run as router for faster WAN speeds. Adding a USB network card (~10 bucks for a USB 2.0 one, as your RPi2 doesn't have USB3 ports anyways) would significantly ease your initial setup, otherwise you would need a managed switch to differentiate between WAN and LAN.
Using the local keyboard and screen, run vi /etc/config/network. There are guides to more advanced use of vi on the Internet, but basically all you need to know is:
Type an i first off
use the arrow keys to move around, you can type in new text, and backspace to erase stuff
when finished, press esc then w and q
Now in the file, erase eth0 from the block that creates a bridge named br-lan. Then make a new block:
config interface 'wan'
option proto 'dhcp'
option device 'eth0'
Write and quit to get back to the command prompt. Plug the Ethernet port into your home LAN. Then run /etc/init.d/network restart and Internet access should be possible. You can install packages. Once you have the USB to Ethernet converter driver installed, edit /etc/config/network and add eth1 (which will be the USB converter) to the lan bridge where you removed eth0. Then you can connect a PC to eth1 and access the GUI, and be routed to the Internet*
If your home lan uses 192.168.1.X, you'll need to change the OpenWrt LAN IP to something outside that range such as 192.168.2.1 for routing to the Internet to work.
Okay, I have internet, but cannot run opkg update. I'm getting an error like wget returned 5. at least its different from the previous error code.
One other thing I should mention: the laptop has no Ethernet port. I've been using a USB to Ethernet converter to connect from the Ethernet port of the pi to the USB port of the laptop.
would I also be able to install some other services I'm planning on implementing using the image builder? because that would save me some time.
EDIT: what version would be best for me to use, such that im able to install things like tor, pihole, unbound, etc, while being compatible with my older Pi?
the tutorial says i need to be running Raspbian. currently i have openWrt installed. will it still work? or do the changes carry over if i use raspbian then switch to OpenWrt after?