RPi4 step-by-step set up: please help


I am very interested in playing online gaming and always had problem with my internet and router.

I have tried couple of fancy routers like Netduma R1, R2, Ubiquiti Edge Router Lite, Archer C7. R2 fairly doing its job but sometimes feel like it struggles.

I decided to try different options and with the help of forum members I wanted to try Raspberry PI4. Though I am new to this things but it interested me to do.

I have searched the forum but found no proper instruction for any new comers to install openWRT in PI4.

So I thought I gather information from forum members and try to install at the same time create a step by step guide to help PI4 users.

I appreciate everyone's help and input to make it successful.

My thanks to dlakelan who suggested me this idea and other forum members who shared and answered all my questions.

Badri M

1 Like

Quick HowTo;

  1. get rpi-4-ext4-factory.img.gz
  2. flash it on uSD (or USB if you have the bootloader already set to boot from USB)
  3. connect to network and boot
  4. access by
1 Like

I started with this community build - Rpi4 < $(community_build). I have a Unifi Pro connected as an AP for Wifi. Been running great for 4 wks. IMO, the RPi is much more flexible and has enough power/RAM than most of the std home routers out there.

The community build has most of the typical packages built in, i.e. adblock, SQM, banip etc. But I have since learnt how to compile my own image with the packages I need using instructions from https://openwrt.org/docs/guide-user/additional-software/imagebuilder. Have fun!

1 Like


In the download section for Pi4B there is different image. And shared different one. Which one is right?

openWRT download section:

You shared:

Badri M

I prefer and tested only ext4...


Why we dont have a stable release for Pi4?

Badri M

Because is still not ready. The support is still experimental, particularly when you use the Wireless Controller of the RPI4. "Here be dragons" as they used to say.

BTW i use the Rpi4 < $(community_build)

But since OP asked for a step by step, here we go with the Rpi4 <$(community_build) by wulfy23, as i did:

Go to https://github.com/wulfy23/rpi4/tree/master/builds/

Select the folder rpi-4_snapshot_1.9.15-29_r14315 (at the time of writting i find it ok for my use case, i don't recommend to for the folder marked "testing", unless you really want to test bleeding edge fixes and bugs) and donload the file containing "fac" on its name (e.g.: rpi-4_snapshot_1.9.15-29_r14315/rpi4.64-snapshot-23290-1.9.15-29-r14315-ext4-fac.img.gz). That's what i downloaded.

I am on windows, and once downloaded, uncompress and extract the *.img file inside. Using Win32DiskImager (google for it, is in sourceforge) flash a microsd card with the image file, (Important!!! if is an used SD, you'll need to wipe it, google for utilities that do that).

Once prepared, put in the RPI.

Now, i will assume that you will use the PI for internet routing. And for that, you'll likely going to need a USB to ethernet dongle. You'll need to know in advance what kmod-usb-net-*** file you will need in advance. This build comes with some included,AFAIK. It detected automatically my TRIP-LITE u336-000-r , but depending on the adapter you buy, this may vary (And some aren't supported at all, do your research before buy!). Plug the dongle before turning on the unit, and connect an ethernet cable from the built-in ethernet port if the pi to your machine, and turn it on. Wait a few minutes and fire a browser to If everything is done correctly you'll have a login screen, just login and change the password for the router.

Go to the "network" tab and select "interfaces", you'll notice there's no WAN port. You'll need to add it manually, otherwise you wouldn't be able to connect the unit. Click on "ADD NEW INTERFACE" and name it "wan" (LOWERCASE!!! Do NOT put another name here, OpenWRT have everything defined assuming the internet interface is "wan") and in the protocol, select the protocol you'll going to use. Whichever you choose here, it will appear some values you need to assign depending on what you have as internet connection. What is important here is the "INTERFACE" that should appear in most cases: here you'll need to select the interface corresponding with the dongle, which in my case happens to be "eth1". Click on "Create interface" then click on "Save & Apply" and reboot.

If all was done correctly, then the pi is ready to use as a router. If you want to use the WIFI, the steps are the same, just add the interface and select the Wireless network interface. Since i don't use it, i can't tell if works ok or not.

The rest is up to you.

EDIT: I forgot, depending if your ISP offers IPV6 or not, maybe you'll going to need to disable it. My isp doesn't support IPV6, and OpenWRT will give you DNS errors in this case: Devs assumed everyone has IPV6 at this point, so when the router offers an IPV6 DNS server to your clients, supported or not, and it will offer an IPV6 ip first to aggravate things (i think is a bug, but for some reason devs don't agree). If you can't connect to the internet with the router configured, disable IPV6 in the LAN settings. It's in the "interfaces" -> LAN, then press "EDIT", select "DHCP Server" and disable the "DHCPv6-Service". Reboot your router and you're good to go. Another common problem is that some ISP's require a Specific mac address to allow you to connect. Google is your friend, because depends on what equipment you have in this case.



I am waiting for my USB to Ethernet adaptor. I will be doing the setup tomorrow. Again thanks for the detailed description.

Badri M


I got my USB to Ethernet adaptor.

I got stuck in the first step itself.

I have a 64GB SD card. I tried to format using gparted.

. I created new partition with partition table msdos
. Tried to copy the image to sd card
. Once copied I tried to partition and extend the second partition
. After that I tried e2fsck but says Bad magic number in super-block
. Without considering the error I tried to bring the Pi4 up by connecting my system to pi4 ethernet port.

But it didnt work

I am making lot mistake. Didnt know what?

Any help?

Badri M

Do not format the card. The image must not be copied, need to be applied.


  • Download the SD card formatter from the official SD association: https://www.sdcard.org/downloads/formatter/
  • Install it and format your card, using the "Overwrite Format". At least wait around 30 min. and cancel the format.
  • using winrar or any program that can extract gz files, decompress the "rpi4.64-snapshot-23290-1.9.15-29-r14315-ext4-fac.img.gz" you downloaded, the resulting file should be "rpi4.64-snapshot-23290-1.9.15-29-r14315-ext4-fac.img"
  • Use Win32DiskImager from here: https://sourceforge.net/projects/win32diskimager/
  • Select the image file, the sd card device, hash=none and press the "write" button. Do not bother trying to verify it, it will fail most of the time, since you already wrote something on the card.

At this point the card should be ready to put in the raspberry, do it. Connect the ethernet cable to the rpi native thernet port, connect the dongle to an usb3 port, and connect the dongle to the modem using another ethernet port. Wait one or two minutes, and launch your web browser to Depending on what browser or OS you're using, it will throw an certificate error. On firefox (other browsers you need to google "Allow self signed certificates" plus the name of your browser) you need to press the "advanced" button that will appear, then "add exception" then mark "permanently store this exception" and finally "confirm security exception". Then you'll get the welcome screen of openwrt.

That should do it. Far easier doing that write it.


I was using Unix and did something. Now the card is not visible in windows.

Badri M

Thanks. Its working now.

I have replaced my router to Pi4.

At present its running on default config. No changes done

I have to configure and test when playing games.

Badri M

Now Pi4 is running as a router. But I have 64gb sd card in pi4. How to extend the partition and allocote unused memory?

Badri M

I don't recommend to do so for now (updating OpenWrt in this case can be problematic), but if you really want to, just use any utility to edit partitions.... Since you mentioned you used unix, you should try to use growpart (https://www.systutorials.com/docs/linux/man/1-growpart/). Then do a resize2fs. Google is your friend :slight_smile:

I am using Ubiquiti EdgeSwitch 5xp. Do I need to add any package? I am not getting open NAT in my console.

I am setup is.

Cable Modem -> Pi4 -> EdgeSwitch 5xp -> GLinet M1000W -> Game console

In GLinet I have added my console to DMZ.

But how to configure in pi4?

Badri M


How to add device in DMZ?

And how to revert back my settings that means factory reset?

Badri M

I think I should close this thread and start a new one for optimization, switch configuration and DMZ.

I really thank everyone for your contribution.

Badri M

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.