Need Guidance - Trying to Install on X86 Hardware

Hello OpenWrt Forum goers,

I am attempting to install Openwrt, generic-ext4-combined-efi.img.gz, to an old Dell Optiplex 9020 I have. Contained within said Optiplex is the following...

  • Intel Core i5-4750 CPU @ 3.2 GHz x4
  • Mesa Intel HD Graphics 4600 (HSW GT2)
  • Samsung SSD 120 GB
  • 32 GB of DDR3@1600 CL 11

Using a Live USB of POP!_OS I had, and running the...

sudo lspci -vvv | grep driver

Command as is recommended in the guide here...

https://openwrt.org/docs/guide-user/installation/openwrt_x86

One strategy to identify needed modules is to boot into a live Linux distro (for example Arch Linux) and inspect the output of lsmod or lspci -vvv | grep driver and then search for corresponding OpenWrt kmod packages.

I get the following output...

Kernel driver in use: hsw_uncore
Kernel driver in use: i915
Kernel driver in use: snd_hda_intel
Kernel driver in use: xhci_hcd
Kernel driver in use: mei_me
Kernel driver in use: serial
Kernel driver in use: e1000e
Kernel driver in use: ehci-pci
Kernel driver in use: snd_hda_intel
Kernel driver in use: pcieport
Kernel driver in use: pcieport
Kernel driver in use: pcieport
Kernel driver in use: ehci-pci
Kernel driver in use: lpc_ich
Kernel driver in use: ahci
Kernel driver in use: i801_smbus
Kernel driver in use: igb
Kernel driver in use: igb

I also have my lsmod info but I feel that will be to long for this forum in a single post so I will leave it be until someone asks.

My goal is to install openwrt to the internal SSD but I don't want to have to take it out and even then, the guide still says I need additional kmod packages, which I would have no idea how to get or install once the openwrt img has been installed to the SSD.

I need guidance to help achieve my intended goal. Any advice, comments, recommendations, etc, would be greatly appreciated.

Thank you in advance!

Beyond the kmods, some common packages to consider installing on x86 are listed below:

Intel Microcode package:
https://openwrt.org/packages/pkgdata/intel-microcode

disk monitoring:
https://openwrt.org/packages/pkgdata_owrt21_2/smartmontools

hardware monitoring:
https://openwrt.org/packages/pkgdata/lm-sensors

hardware watchdog Intel:
https://openwrt.org/packages/pkgdata/kmod-itco-wdt

kernel entropy:
https://openwrt.org/packages/pkgdata/rng-tools

But if you cannot remove the storage from the device (or do not have an adapter to connect them to the PC), you can write OpenWrt on a USB drive (or another removable storage device), then you can then insert it in a USB port or slot. When booting select the drive where you installed OpenWrt.

I saw this but it didn't make sense to me. I was able to create a bootable USB stick and boot into Openwrt but I could not figure out what was needed to get it to run an installer or to install the OpenWrt image to the SSD. I know the SSD is /dev/sda but again I have no idea what command I need to give the prompt when in the openwrt live usb terminal to get it to install to the internal SSD.

I am pulling my hair out right now. This is so overly complicated and for no good reason. Why is there no help or man pages built into the iso for a list of available commands or something? asjfdkljflasjdadjlads;faskldjf

I am able to boot openwrt on the PC, I am able to connect an ethernet cable to a separate little laptop to log into luci, I am able to update root's password in the terminal(figured this one out by just trying random stuff with the passwd command since there is no guidance), In luci I have a wan ip, in terminal I have no wan ip. I can't use opkg to update. I can't get online I can't do anything.

This software, and all it's documentation, are so frustrating.

This doesn't sound right at all. Can you show us what you're seeing?

This is what I see.
Freshly made USB stick.
Fresh boot.
everything is plugged up where it should.
Just can't connect to the net and luci tells me I have an IP from my ISP for WAN but terminal on the router machine tells me there is no IP for WAN.

I have no idea what to do. The pages I've read tell me nothing of what I need to know.

No, the terminal output shows the configuration is set to dhcp client for the wan. That looks normal.

1 Like

https://openwrt.org/docs/guide-quick-start/start

1 Like

(https://openwrt.org/docs/guide-quick-start/start)

What am I supposed to look at here?

Does it? To me it doesn't make sense that it doesn't show me the WAN IP in the cat of the network config. I still can't use opkg to update. Everytime I try just keep retrying saying failed every time. So I can't install the required packages named in the install instructions so I can get it installed to the internal SSD.

These are the instructions I am following as they are for my particular needs and scenario.

OpenWrt on x86 hardware

https://openwrt.org/docs/guide-user/installation/openwrt_x86

Boot the live USB
Your SSD should be /dev/sda, and the USB is /dev/sdb
Connect live USB to the Internet (connect Ethernet port to your existing home network) and download OpenWrt image.
Note the OpenWrt image is not an ISO, it is a gzip file ready to write directly to the hard drive after unzipping. This can be done with the one-line command (as root)
gzip -cd <OpenWrt image file> | dd of=/dev/sda bs=4M && sync
(note, this will clobber any existing data on the disk)
Unplug the Ethernet cable until you have OpenWrt configured, so it does not interfere with your home network.
Reboot and pull the USB out when the BIOS screen appears so that it boots from the SSD instead.
OpenWrt should be running.

Wish I could. It doesn't work.

It's a .img file.

This img file was then flashed to a USB drive using Rufus.

On the OpenWrt server, it is .img.gz which means it is a gzip of the image.

You can use OpenWrt on a USB as an install live image, but you will need to reconfigure the network so that it is a LAN client instead of a server. Or mount the OpenWrt image on a system that understands ext4 (don't boot it) and save a raw copy of the img.gz somewhere in the filesystem so you can use it to write to the internal SSD.

It would be simpler to use a live of something "big Linux" so that you have features like a web browser.

7zip unzipped it. Because I needed it to be an img file of some sort to flash it to a USB and create the live USB I am using to boot into openwrt.

I did this, using gnome disks, and when it booted off the SSD I got a grub screen, no open wrt boot.

Then I read in the instructions you can take a live openwrt USB and install Open WRT to the internal drive from said USB, my SSD in thie case, by following the instructions they provided. Problem is I can't follow their instructions because I have no access to the net even though I am being provided an IP on WAN from my ISP.

You also need it to flash it to your SSD.

How would OpenWrt know your IP address to add to the configuration?

It is obtained dynamically (DHCP) from your ISP, hence the DHCP WAN config.

  • You have the IMG - which steps can't be followed?
  • Did you connect any device to LAN? (traceroute? )
1 Like

If you have a SATA to USB adapter you could remove the SSD from the Dell and use the Windows PC to write OpenWrt directly to the SSD the same as a USB.

Using OpenWrt as a live install, edit the /etc/config/network file and change the LAN protocol from static to DHCP.

config interface lan
    option device 'br-lan'
    option proto 'dhcp'

Then OpenWrt should attach to your home network as a LAN device and reach the Internet to download the image file.

Actually if you plug the OpenWrt USB into a Windows computer you should see the boot partition and there is probably enough space there to write a copy of the compressed image file. Then you can access it after booting OpenWrt on the Dell.

I know. I don't have my normal tools to do that.

Which is why I am trying to use live USB methods to do that.

I tried with Gnome Disks in pop OS and flashed the image. The problem I ran into after was the system would not boot into OpenWRT but would instead just give me grub and with no way to boot OpenWRT.

So I read a bit more and I saw you can use the OpenWrt Live USB to install this to the internal drive on the PC. Problem is when following those instructions I ran into the problem where I can't update using opkg even though that is what the instructions say I have to do prior to proceeding to any of the other steps.

No matter what I do, I can't get opkg to work.

At first I thought there was an issue in OpenWRT since I didn't see a WAN IP in cat but I could in Luci, then I learned that the WAN IP I am provided will not show up in cat when using dhcp, instead it just says dhcp. Why it doesn't show me the ip I have in that moment, I don't know, I am not a programmer/engineer.

I would think, dhcp or not, eventually an IP is provided to my router by my ISP and on my router I would assume when an IP has been assigned that it would show up when I cat the network config.

example...

config inferface 'wan'
	option device 'eth1'
	option proto 'dhcp'
	172.148.20.12 ( or something similar )

Instead it just says...

config inferface 'wan'
	option device 'eth1'
	option proto 'dhcp'

But on Luci it will actually provide the current leased IP being provided by the ISP. It was just confusing to me. Didn't make sense why it wouldn't show up in a cat of the network config. I am not an expert with linux so to me it's very unintuitive to not get an IP leased and not record that current IP being provided and display it to the user when they call the network/config using cat.

Installing OpenWRT on internal drive.

1st step - opkg update

Can't update. Even though I am being given an IP by my ISP, as shows up in Luci, I have no connection outside to the world.

I have my little Chrultrabook hooked up to LAN via a wire. No access to the www, only the luci interface. Can't install OpenWrt to the internal SSD on the Dell PC, which is what I want to do without ripping out the SSD and hook it up to another PC to image it, when I don't have the tools on hand to do that. I do own them but I don't have them right now, which is why I am using the other methods or at least trying to. I just moved.

Setup...

ISP Fiber line from outside -> ISP Fiber line to Ethernet conversion device from ISP (Fiber Modem?) -> Ethernet from ISP Fiber Modem to Router PC eth1(wan) interface -> wire from eth2 (lan) to Chrultrabook.

So even though I have a live USB with the image on it and I've booted into it, I need another copy of the img on said live USB, or on say another USB stick, to install it to the internal SSD?