Problem installing OpenWRT in a x86 PC partition

Hello guys,

Im trying to install OpenWRT in a x86 PC. I have a 256GB disk with a partition of 5GB created (i want to install OpenWRT in that partition). Thing is... im using dd to copy the .img to /dev/sda1 but dd throw me the error "No left space on device" but i know OpenWRT is not that large.

Im using a extracted OpenWRT image and .img file but both fail to install.

I cannot access to PC via ssh or scp, it throw me Timeout error so is hard to upload commands like lsblk

Any help please?

Put OpenWrt on a bootable USB and boot from it. Make sure the X86_64 UEFI can be set to boot from USB.

Then you can use OpenWrt on the USB to put an X86_64 image on the internal drive. Alternatively, you can continue to boot OpenWrt from the USB drive alone.
2 wiki articles to look at:

(https://openwrt.org/docs/guide-user/installation/openwrt_x86)
And
(https://openwrt.org/docs/guide-developer/uefi-bootable-image)

Follow the first link to expand the partitions. There is a stand-alone process and an automated one.

1 Like

Already did that, doesnt work...

What partition should i dd?

`The x86 image is using the following partition layout (as seen from inside of the device):

  1. /dev/sda1 is a 16MB ext4 /boot partition where GRUB and the kernel are stored.

  2. /dev/sda2 is a 104MB partition containing the squashfs root filesystem and a read-write f2fs filesystem OR the ext4 root filesystem`

You can only write the image to a drive, not a partition.

1 Like

ok, i have 16M partition from bootable USB in /dev/sdb1 and 104M one in /dev/sdb2

should i dd if=/dev/sdb1 of=/dev/sda or dd if=/dev/sdb2 of=/dev/sda?

Boot OpenWrt from the USB. From the USB you will write the x86 image to your internal drive. On your internal drive you will find the same 16MB sda1 paritition and a a 104MB sda2 partition.

Then you follow the wiki to expand the sda. This will expand to the full capacity of the drive. ie. 256GB. Then you can use parted, fdisk, gparted . . .to add extra partitions.

did this but while booting OpenWRT without USB the command line shows this error:
"couldn't find an input interrupt endpoint"
and it doesnt let me neither reboot..

should i do sda1 and sda2 partitions manually?

ok i had an illumination. i used

wget https://mirror-03.infra.openwrt.org/releases/23.05.2/targets/x86/64/openwrt-23.05.2-x86-64-generic-ext4-combined-efi.img.gz

Saved on /tmp, i extracted it with gunzip openwrt-23.05.2-x86-64-generic-ext4-combined-efi.img.gz

and then did

dd if=openwrt-23.05.2-x86-64-generic-ext4-combined-efi.img.gz of=/dev/sda

It worked, now im up with no USB plugged but... i still havent access with ssh or luci

How can i change the IP address of br-lan?
I remember the command uci set network.addr but i dont know how to use it very well

I don’t understand this. You’re up with no terminal access or gui. I have to assume you have an HDMI display and a USB keyboard plugged in, so what do you see on the display?

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