Install OpenWrt x86 on existing System

Hello,
I have to install OpenWrt as a additional system on a existing one, but can't get it work.
I was using this image:
https://downloads.openwrt.org/snapshots/targets/x86/64/openwrt-x86-64-generic-ext4-combined-efi.img.gz

The first, original system is an ipfire with 3 partitions.
sda1 = /boot
sda2 = /boot/efi
sda4 = swap
sda6 = /

First I have resized sda6 to get space for an additional partition sda7 and created an ext4 filesystem on the new partition.
Then I downloaded the OpenWrt image to my linux system.
After unzipping it, I have created a loop device per partition,

# losetup -P -f --show o....img
# mkdir /mnt/owrt
# mount /dev/loop1p2 /mnt/owrt
# mkdir /mnt/owrt/boot
# mount /dev/loop1p1 /mnt/owrt/boot

Then I added an additional entry to the existing ipfire grub.cfg, like the original openwrt entry.
The only thing I canged was the root entry and of course the PARTUUID with the one from the just created partition sda7

menuentry "OpenWrt" {
        set root='(hd0,7)'
	linux /boot/vmlinuz root=PARTUUID=.... rootwait   console=tty0 console=ttyS0,115200n8 noinitrd
}

The last step was copying the content of previous mounted partition via rsync like this:

rsync -aAvx root@192.168.1.100:/mnt/owrt/* /mnt/sda7/

When starting the new system, I got the grub menu entry and can select "OpenWrt".
The system starts up and then it stops.

The only thing I can do is to press "Ctrl+Alt+Del".
What I'm doing wrong?

Henning

The line "Waiting for root device ..." should push you in the right direction. I don't know how the boot process is handled by OpenWrt x86. For my non-x86 device it looks like:
rootfstype=squashfs,ext4 rootwait noinitrd root=/dev/mmcblk0p5. I would try to pass the rootdevice without uuid and add the rootfstype.

Usually you hit Enter. That's when you'll get shown the OpenWrt prompt.

it's not too intuitive, but if you can issue the three fingered salute, your keyboard works, so just hitting Enter should as well.

1 Like

Thank you for your support. I don't know what is going on, but the "Waiting for root device" hint shows the right direction.
I realized that I could change the root entry in the grub.conf to something. Every time the same massage :frowning:
Checked the PARTUUID triple times, but could not find an error.
At least I have repeated the whole procedure, but with another SSD.
This time OpenWrt boots up as normal.
Now I will recheck the procedure with the original SSD.

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