Cant boot installed openwrt from disk Fujitsu S940 (x86)

I have strange problem, I can not boot openwrt system from disk. Disk is shown in bios, but not under boot options. I tried to use the same disk but from usb adapter connected to usb socket and computer normally boots up. Does any have any idea what can ba the cause?

What exact image are you trying, and how (exactly) did you write it - to which disk.

I used this image ->
I wrote it on sata drive via usb adapter using rufus.
As I said when I plugged it to my device and boot from usb openwrt starts normally. But when I mount the same disk directly on device it will not boot.
I also tried installation via debian live usb accoring to this instruction -> but the same happens it is nott booting.

For that to work, UEFI must be enabled in the 'BIOS' and secure boot disabled, I don't know what's the situation of the s940 in this regard. You can also try the non-EFI (legacy CSM/ BIOS) variant of OpenWrt instead.

Please try (either ext4 or squashfs, your choice):

gunzip first, and write to the raw disk (I'm not really sure if rufus is the best option for this).

This unit only supports UEFI, secure boot was disabled.

Then it's not an Openwrt issue, but hw related.

Nope, definitely not. I installed windows 10 on the same disk and had no problem booting it from mounted disk...

Try doing it via a flash drive with OpenWRT.

Wget the same image to /tmp, then dd it to /dev/whatever

did it before, disk not showing in boot options.

I doubt it only supports UEFI, but if it does, just DD copying the image to the HD would not magically create a uefi bootloader entry on the bios settings.
You would need to add it manually, using efibootmgr, a UEFI shell, or some other program that can manipulate the firmware nvram settings.
You can read more here for general UEFI bootloader reference:
(section 4.3.1 specifically about efibootmgr)
If your are not familiar with that it might be easier to enable legacy boot support in your bios settings if it's available, it could be something named CSM or Compatibility Support Module, you would need to research it on your bios manual if it's available.

1 Like

I'm leaning this way too, if Win boots, and Linux doesn't (not only openwrt), it's probably related to the bios settings....

OpenWrt relies on the removable media path for booting ftom UEFI, it does not set EFI boot entries itself. That means some kind of basic cooperation from the UEFI firmware is needed to find the EFI system partition and to consider it as viable option.

in a (unlikely) worst case scenario, boot grub from the flash drive, the rest from the SSD.

Thanks for hints, I will try suggested sulutions :slightly_smiling_face:
I searched BIOS dozens of times to see if there is legacy boot option - there isnt.
I also watched review of this unit (this is in polish) -> but this guy cleary said, no support for legacy boot.

as long as you manage to get grub on to the drive, and booting, the rest can be easily solved.

you just won't be able to use the combined images provided by openwrt.

On windows, use win32 disk imager to write the image to the disk. Rufus can't do what you want.

Ok, so I am in the point where I have installed openwrt on disk and have live usb of refind and this duet is working, however I would like to have both installed on a disk. What would be the idea, create two partitions and using "dd" install images on those partitions?

This should not be this complicated. I thought the S940 was kind of popular here and other people were conventionally running with a direct image copy.

What I usually do with an X86 having an internal disk is boot up OpenWrt on a USB then use it to write to the internal disk which is still installed in the X86 machine.
Download a copy of the distribution image and stream it onto the disk (make sure of the letter of the target disk):
gzip -cd <FILENAME> | dd of=/dev/sda bs=4M
Or if you're feeling really bold:
wget -O - <URL> | gzip -cd | dd of=/dev/sda bs=4M
This will of course clobber the existing partition table and render all existing data on the disk unreachable.

You could try installing Refind on openwrt img partition, never tried it for openwrt but for other x86 systems it can work just fine coexisting with other boot loaders on the same EFI system partition.
For this you would need to loop mount the the openwrt disk image, then mount the first partition, and then follow Refind manual installation instructions.
To boot Refind using the removable media path that is taken by grubs bootx64.efi you would need to rename this file perhaps to grubx64.efi

I was able to install refind next to openwrt, but unfortunatelly strange things are happening.. ;/
After having success with refind, I just shutdown computer and placed on the shelf where is should stay, wired everything and boot up... Then I realised after everything worked fine after reboot it there is no internet... Once again I get this device to find out where is the problem, when booting device refind just vanished and it is not booting ;/ I repeated installation process and the same thing happens. I am really pissed off, what a garbage is this device...;/