Hello wonderful OpenWRT community.
I’ve been trying repeatedly to install OpenWrt 23.05.2 on a Raspberry Pi4B and I’m having trouble with the initial configuration. Keep in mind I am far from being proficient whit Linux, hence, I thoroughly followed this tutorial on YouTube:
How To Build A Custom Raspberry Pi Router // OpenWrt on RPi 4
My setup is a Windows 7 computer, a Linux Fedora computer and the Pi4 connected to a monitor and keyboard. So, I’m having no problem to be connected to the internet via my
ISP->Modem->Switch->Win7 and Fedora, and Pi4, if required.
Following the tutorial, the user is suppose to :
1- Burn the OpenWrt image on a micro SD card
2- Make some minutes modifications to the file system
3- Make some modifications on ‘dhcd’ file
4- Make some modifications on ‘network’ file
5- Connect the microSD card into the Pi4
6- Boot the Pi4
7- Connect an Ethernet cable between the Pi4 and the Fedora computer
Following these instructions the Pi4 should, by default, provide an Ethernet IP address to the Fedora computer in order to get access to OpenWrt OS and perform some more modifications via SSH.
The Problem: The Pi4B do connect on the Fedora computer cause I can see both Pi4 and Fedora Ethernet LEDs flashing. The problem I have is that the Fedora computer keep popping a message “Connection Failed / Activation of network connection failed”
I do have a monitor and keyboard on the Pi4. Which means, I can bring the prescribed modifications to the Pi4 via the connected keyboard, but that is not ideal, for I cannot follow the exact instructions as indicated. But it is manageable.
Further down the instruction list, after the tweaking is done, the Pi4 should issue an IP address to the Fedora computer. Problem keep getting that same error message. No IP address is displayed on the Fedora computer, despite all the adjustments and tweaking performed. If I attempt to ping the Pi4 I also get an error message “Network is unreachable”
There is definitely something wrong with the initial OpenWrt initial parameters that prevent the connection between the Pi4 and the Fedora computer. I don’t know where I could be wrong. I followed these instructions very thoroughly without any success.
I can post a list of steps if required. Those steps are listed on the YouTube tutorial.
Much appreciation for your help
Please detail these modifications.
And what is your ISP modem+router's subnet (what address does your win7 or linux box get)?
How is the pi supposed to be connected to your network, and are you planning to use it as a router? If so, do you have a second ethernet adapter for the pi and/or a managed switch?
1 Like
Download firmware here
check this option: Customize installed packages and/or first boot script. when it is done( which may take a while) request a build.
Set your laptop to a static address 192.168.1.2
add the subnet 255.255.255.0 (it should self populate that)
Plug the pi ethernet cord to the laptop. Type '192.168.1.1 in the address field of your browser, there is not password yet so leave it blank.
set up the radio and confirm you can get in the pi through wifi.
Once connected by WiFI, unplug the ethernet and make a new interface and name it wan, choose eth0 as the device with DHCP client then delete it in the lan.,
You now have a wan and lan for the router. Log in the lan through wifi and configure it as you want but making sure the lan does not have the same ip address range as the ISPs.router
1 Like
I tried repeating the procedure with OpenWrt version 22.03.5, as suggested.
I'm getting exactly the same results:
I cannot call 192.168.1.1. Browser cannot connect
from Browser: "http://192.168.1.1/ is unreachable"
When you say "Customize installed package" do you mean proceed as instructed in the video? or otherwise ?
And, how do you activate the WiFi ?
Exact procedure that I followed
> |1||Download the OpenWRT OS file from the WEB||
> |2||Launch Balena Etcher and flash the sd card|Choose file|
> |3||Remove SD card and re-connect to update mounting||
> |4|sudo su|Go SuperUser|pass: hp|
> |5|lsblk|Run 'lsblk' to see the newly written medium|sdb - sdb1 - sdb2|
> |6|umount|/run/media/hp/rootfs||
> |7|fdisk|/dev/sdf||
> |8|p|print the partition table||
> |9|d|delete a partition||
> |10|2|Choosing the partition 2 for deletion||
> |11|n|Create a New partition||
> |12|p|primary partition||
> |13|2|Choosing the new partition number||
> |14|147456|First sector of that partition||
> |15||<ENTER> will default to the maximum available ||
> |16|n|No - Do not revome signature||
> |17|w|Write the changes to the SD card||
> |18|e2fsck|-f /dev/sdf2|Cleanup|
> |19|y|Confirm Padding at end of inode bitmap|Confirm|
> |20|resize2fs|/dev/sdf2||
> |21|umount|/dev/sdf1||
> |22||Disconnect hp computer from Internet|Avoid any conflict|
> |23||Take SDcard from hp computer and put into Pi4||
> |24||Plug USBC power adapter into Pi4|No power yet|
> |25||Plug Ethernet cable from Pi4 to hp computer||
> |26||Plug power adapter into 120VAC plug to power-up|Power - Up
From this point on the Pi4 is started and the remaining commands must be entered via USB keyboard from Pi4, because the Fedora computer does not automatically get an IP address from the Pi4, as it should
What is the cable plugged into?
Non of that is this:
Download firmware here
check this option: Customize installed packages and/or first boot script. when it is done( which may take a while) request a build.
Set your laptop to a static address 192.168.1.2
add the subnet 255.255.255.0 (it should self populate that)
Plug the pi ethernet cord to the laptop. Type '192.168.1.1 in the address field of your browser, there is not password yet so leave it blank.
set up the radio and confirm you can get in the pi through wifi.
Once connected by WiFI, unplug the ethernet and make a new interface and name it wan, choose eth0 as the device with DHCP client then delete it in the lan.,
You now have a wan and lan for the router. Log in the lan through wifi and configure it as you want but making sure the lan does not have the same ip address range as the ISPs.router
The internet is not connected to Pi4 nor to Fedora. The only connection I have is an Ethernet cable from the Pi4 to the Fedora computer.
The normal behavior should be that when the Pi4 is powered-up, an IP address should be provided to the computer due to Automatic DHCP by default (at least that's what the video instructions lead me to believe)
after you have successfully logged into LuCI by typing 92.168.1.1
You can play with the partition size after you followed my instruction but before firstboot.
I knew that n you showed me what you had done and none of it was my instructions.
Yes, of course. But in order to do that I need a functional connection between Fedora and Pi4, which I have not at the present. The weird thing is both Pi4 and the computer Ethernet LEDs are lite ON, which would imply that there is a connection somehow?
How are you connecting to the internet right now?
Give me a minute here. Let me take a close look.
I mean physically or wirelessly on what device?
I'm actually on the WEB with my Windows 7 computer.
I'm looking at the option "Customize installed packages and/or first boot script"
I must admit that all that stuff is way beyond my Linux knowledge.
One thing I can change is the USB<->Ethernet driver name, but is just about where my competence is ending.
Just request a build with those packages and do not touch the script option.
This may sound narcissistic but I do not care what any video or guy at a bar told you.
I'm going to add download the raspberry pi imager from here pick the bootloader for the pi4.
then start following my instructions.
OK, let me resume:
I click on "Customize installed packages and/or first boot script"
I do not change any of the proposed list in "Installed Packages"
and I request a custom build and burn the SD card with the result.
then we take it from there. Is that it ?
Yes but before you flash the firmware, download the bootloader and upgrade it following the instructions in the video just do it for a pi4 and not for Pi 5.
Yes we take from there if I do not fall asleep.
Hang-On, I'M on it.
Pi5? Did I mention Pi5 somewhere ?
My unit is Pi4B hence: Model Raspberry Pi 4B/400/4CM (64bit)
By the way: Thank you !
Sorry, I had too many conversations going on. 60 seconds.