Installing OpenWRT in a X86 System in a partition, having both WIN11 and OpenWRT

Nor will I, until I try.

To be honest, I'm expecting it to fail in the same way, but I'll be pleasantly surprised if it works.

lets cross our fingers :crossed_fingers:t3:

Sí, hagámoslo.

Sorry but with the "raw" .img...

If you can tell me some packets to install and i can do some work for you...

sorry for that spanish translate, sometimes i dont know the meaning of some words :rofl:

1 Like

Anything which looks like it might be relevant for the RTL8821CE. It's going to be a case of trial-and-error.

not CE but:

could be valid? ill try

I tried that one with 22.03.5, and it didn't work, but there's no harm at all in trying it for yourself. You might find something I missed.

And besides, what's the worst that can happen? If you completely break your router, you just have to reinstall OpenWRT again. And by now you know how to do so, so it's all good practice.

totally right mate

About that packages... them broke all connections to internet, dont know why but... ping 8.8.8.8 told me Network unreachable

Edit: Hard to remove those packages and its dependencies..., cant do it via luci and commands sent me some errors. I'll be back to the last version i think

For what it's worth, I replaced the image on my T8 with the squashfs image, instead of the ext4 image. That way, if I totally screw something up, I can just issue firstboot and everything reverts back to defaults, without having to re-flash the image to the SSD.

I say, I say, I say... what has two thumbs and can tether his T8 to his iPhone via USB for Internet access, and is using that very same tethered connection to type this reply?

:+1: This guy :+1:

Start by reading https://openwrt.org/docs/guide-user/network/wan/smartphone.usb.tethering

Then, using your skill and judgement, work out what you can omit from the instructions. Turns it it's very simple to get tethering to work with an iPhone, more simple than I was expecting.

The section "Additional steps for iOS devices" contains the information you need about what you need to install. The word "Additional" is misleading; it implies you also have to install the other Android-related stuff, but you don't.

For reference, my iPhone is an SE 2022, running iOS 16.5.1.

I followed the iOS devices steps, then enabled the hotspot on my iPhone, and plugged the USB cable into the T8.

Before installing the packages, this was the output of ip link:

root@OpenWrt:~# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br-lan state UP qlen 1000
    link/ether 68:1d:ef:33:58:10 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP qlen 1000
    link/ether 68:1d:ef:33:58:11 brd ff:ff:ff:ff:ff:ff
4: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 68:1d:ef:33:58:10 brd ff:ff:ff:ff:ff:ff

After installing the packages and connecting the USB cable, this was the output:

root@OpenWrt:~# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br-lan state UP qlen 1000
    link/ether 68:1d:ef:33:58:10 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP qlen 1000
    link/ether 68:1d:ef:33:58:11 brd ff:ff:ff:ff:ff:ff
4: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 68:1d:ef:33:58:10 brd ff:ff:ff:ff:ff:ff
5: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP qlen 1000
    link/ether 82:04:5f:2b:d6:25 brd ff:ff:ff:ff:ff:ff

You can see the new eth2 interface.

I edited /etc/config/network to change the wan device from eth1 to eth2, then restarted the network: /etc/init.d/network restart

When I did, the T8 dropped the eth1 connection and picked up an IP address on eth2, issued by the iPhone:

eth1      Link encap:Ethernet  HWaddr 68:1D:EF:33:58:11
          inet6 addr: fe80::6a1d:efff:fe33:5811/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:2496 (2.4 KiB)

eth2      Link encap:Ethernet  HWaddr 82:04:5F:2B:D6:25
          inet addr:172.20.10.4  Bcast:172.20.10.15  Mask:255.255.255.240
          inet6 addr: fe80::8004:5fff:fe2b:d625/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:848 errors:0 dropped:0 overruns:0 frame:0
          TX packets:727 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:426814 (416.8 KiB)  TX bytes:177443 (173.2 KiB)

So there you go. You can tether your T8 to your iPhone with a USB cable, and doing so is pretty straightforward.

Note: I got this working on iOS 16.5.1; I have no idea what challenges you might face with other iOS versions.

Done. See Installing OpenWRT in a X86 System in a partition, having both WIN11 and OpenWRT - #151 by iplaywithtoys

Boot it from a flash drive ?

1 Like

You are a beast mate... honoring your name :smirk: :sunglasses:

1 Like

i meant, save a backup, and then restore it. but was a mistake because i had read something of generic-ext4-combined-efi.img.gz cannot do a backup reset. but it just was a factory reset.

Is it worth? I mean with that img you can expand the disk as u want?

Should i install generic-squashfs-combined-efi.img.gz just for adding that function

Why wipe it in the 1st place :slight_smile:

I followed the x86 installation instructions exactly as before. The only change was to the image I wrote to the SSD with dd: the squashfs image instead of the ext4 image.

The partition expansion instructions worked exactly the same as before; I have an overlay of almost 256GB.

Note: the reason I deliberately chose the squashfs image was because it's impossible - or really, really, really hard - to break it irretrievably, and I was going to be making lots of configuration changes with a very real chance that I could lock myself out of the device due to a mistake.

With the squashfs image, no matter what configuration changes I make, and even if I lock myself out of SSH and HTTP, if I have a keyboard and monitor I can reset to defaults with firstboot.

It's not that squashfs is better or ext4 is worse, it's that I know what I'm like and I know my limitations, so I picked the option which was safest for me.

i think i dont understand the difference between ext4 img and squashfs img :sweat_smile:

and had read

squashfs = read-only installation of OpenWRT, with all modifications made in an overlay. Mess things up so bad you're stuck and can't remember what you did? Clear out the overlay and start again.

ext4 = read-write installation of OpenWRT, with all modifications made directly to the installation. Mess things up? Then you need to be able to remember what you did and reverse your changes.

Each approach has its use cases, and there are more nuances than indicated here. But that's a basic overview of the differences.