Problem installing to edgerouter lite 3

Hi,

I'm following the instructions here:
https://openwrt.org/toh/ubiquiti/edgerouter_lite and accessing via the console. no ethernet is connected.

The problem is the rootfs isn't found. This is as far as it gets:

Looking for valid bootloader image....
Jumping to start of image at address 0xbfc80000


U-Boot 1.1.1 (UBNT Build Version: e102_003_eace7) (May 27 2019 - 06:35:40)

BIST check passed.
UBNT_E100 r1:2, r2:18, f:4/71, serial #: F09FC210488E
MPR 13-00318-18
Core clock: 500 MHz, DDR clock: 266 MHz (532 Mhz data rate)
DRAM:  512 MB
Clearing DRAM....... done
ERROR: Unable to allocate linux reserved memory (addr: 0x100000, size: 0x8000000).
Flash:  4 MB
Net:   octeth0, octeth1, octeth2

USB:   (port 0) scanning bus for devices... 1 USB Devices found
       scanning bus for storage devices...
  Device 0: Vendor:  USB Prod.:  SanDisk 3.2Gen1 Rev: 1.00
            Type: Removable Hard Disk
            Capacity: 29340.0 MB = 28.6 GB (60088320 x 512)
leds_init 206                                                                                                                       0 
(Re)start USB...
USB:   (port 0) scanning bus for devices... 1 USB Devices found
       scanning bus for storage devices...
  Device 0: Vendor:  USB Prod.:  SanDisk 3.2Gen1 Rev: 1.00
            Type: Removable Hard Disk
            Capacity: 29340.0 MB = 28.6 GB (60088320 x 512)

** Unable to use usb 0:1 for fatload **
reading 

** Unable to read  
argv[2]: numcores=2
## No elf image at address 0x07d00000

it stops here.

usb stick:

# lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    1  28.7G  0 disk 
├─sda1        8:1    1   256M  0 part 
└─sda2        8:2    1  28.4G  0 part 

Command (m for help): p
Disk /dev/sda: 28.65 GiB, 30765219840 bytes, 60088320 sectors
Disk model:  SanDisk 3.2Gen1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x226deed0

Device     Boot  Start      End  Sectors  Size Id Type
/dev/sda1           32   524320   524289  256M  c W95 FAT32 (LBA)
/dev/sda2       524321 60088319 59563999 28.4G 83 Linux

I had to create the fat32 filesystem first as there were no partitions (it had openbsd in it before and I deleted those partitions first)

The fat32 filesystem was created by firstly creating a 256MB w95 fat32 partition then formatting it with mkfs.msdos. I've tried setting the fat partition bootable in fdisk to no avail. I've also tried re-doing everything but this time formatting partition2 as ext4 as per instructions.

what am i doing wrong?

This is so odd.

Before applying the openwrt, with the same USB I backed up the contents to a .img via dd. This is the mos(ly) working openbsd-based img.

Then tried as above and got the unbootable result.

So, wrote the usb openbsd-based img back to the usb stick, thinking that maybe it's the stick, maybe it's the hardware, expecting it not to boot - but it boots:

U-Boot 1.1.1 (UBNT Build Version: e102_003_eace7) (May 27 2019 - 06:35:40)

BIST check passed.
UBNT_E100 r1:2, r2:18, f:4/71, serial #: F09FC210488E
MPR 13-00318-18
Core clock: 500 MHz, DDR clock: 266 MHz (532 Mhz data rate)
DRAM:  512 MB
Clearing DRAM....... done
ERROR: Unable to allocate linux reserved memory (addr: 0x100000, size: 0x8000000).
Flash:  4 MB
Net:   octeth0, octeth1, octeth2

USB:   (port 0) scanning bus for devices... 
      USB device not responding, giving up (status=0)
1 USB Devices found
       scanning bus for storage devices...
No device found. Not initialized?
leds_init 206                                                                                                                       0 
(Re)start USB...
USB:   (port 0) scanning bus for devices... 1 USB Devices found
       scanning bus for storage devices...
  Device 0: Vendor:  USB Prod.:  SanDisk 3.2Gen1 Rev: 1.00
            Type: Removable Hard Disk
            Capacity: 29340.0 MB = 28.6 GB (60088320 x 512)
reading boot
...............

2888298 bytes read
reading boot.md5

** Unable to read boot.md5 
argv[2]: numcores=2
ELF file is 64 bit
Allocating memory for ELF segment: addr: 0xffffffff82000000 (adjusted to: 0x2000000), size 0x2e5b60
Allocated memory for ELF segment: addr: 0xffffffff82000000, size 0x2e5b60
Processing PHDR 0
  Loading 274ca0 bytes at ffffffff82000000
  Clearing 70ec0 bytes at ffffffff82274ca0
## Loading Linux kernel with entry point: 0xffffffff82000000 ...
Bootloader: Done loading app on coremask: 0x3
>> OpenBSD/octeon BOOT 1.3
probing disks
available root devices: sd0
boot> 
booting sd0a:/bsd
bootmem desc 0x24108 version 3.0
avail phys mem 0x00000000001004f0 - 0x0000000001000000
avail phys mem 0x000000000180ea10 - 0x0000000001fffd30
avail phys mem 0x0000000002000000 - 0x000000000fffdc00

[etc]

maybe an earlier openwrt version will work?
the guide quotes 19.07.8 so next up is the version nearest that one

nope

U-Boot 1.1.1 (UBNT Build Version: e102_003_eace7) (May 27 2019 - 06:35:40)

BIST check passed.
UBNT_E100 r1:2, r2:18, f:4/71, serial #: F09FC210488E
MPR 13-00318-18
Core clock: 500 MHz, DDR clock: 266 MHz (532 Mhz data rate)
DRAM:  512 MB
Clearing DRAM....... done
ERROR: Unable to allocate linux reserved memory (addr: 0x100000, size: 0x8000000).
Flash:  4 MB
Net:   octeth0, octeth1, octeth2

USB:   (port 0) scanning bus for devices... 1 USB Devices found
       scanning bus for storage devices...
  Device 0: Vendor:          Prod.: UDinfo UF2 4GB   Rev: PMAP
            Type: Removable Hard Disk
            Capacity: 3824.0 MB = 3.7 GB (7831552 x 512)
leds_init 206                                                                                                                       0 
(Re)start USB...
USB:   (port 0) scanning bus for devices... 1 USB Devices found
       scanning bus for storage devices...
  Device 0: Vendor:          Prod.: UDinfo UF2 4GB   Rev: PMAP
            Type: Removable Hard Disk
            Capacity: 3824.0 MB = 3.7 GB (7831552 x 512)
reading boot

** Unable to read "boot" from usb 0:1 **
reading boot.md5

** Unable to read boot.md5 
argv[2]: numcores=2
## No elf image at address 0x07d00000
Octeon ubnt_e100# 

I haven't a clue why this is happening. This is with the original usb2 now

Flash your stock image to the 32 GB drive and confirm that it boots. Then you can write OpenWrt to it without changing the partitions.

The boot partition is a FAT filesystem with two files: the kernel binary and the md5sum. The wiki says the kernel should be named vmlinux.64 but your log suggests it is looking for a file named boot. Since this partition is a conventional FAT32 disk, it can be mounted on any PC to inspect the files.

The root partition starts out with the squashfs root ROM written on it directly (no underlying filesystem) The bootloader doesn't do anything with the root partition, the root is only an issue after the kernel has started.

Thanks for replying. It's really odd. I'll try what you suggest. It seems though that the OEM firmware wasn't on the original device. I must have it backed up somewhere.

For clarity, the first results are for 32GB usb3 + openwrt
2nd results are 32GB usb3 + restored openbsd => boots
3rd is OEM usb2 + openwrt

What I can't understand is the first output showed

** Unable to use usb 0:1 for fatload **
reading 

** Unable to read  
argv[2]: numcores=2

the 3rd output showed only

but the 2nd one - the successful openbsd boot - seemingly didn't require boot.md5, and it gave 'reading boot ..........':

Mount the drive that boots on a PC and see what files are in the boot partition.

I have one of this model on a shelf, but it is at the office.

1 Like

Hi,

OK this is the original usb2

[40340.096211] usb 1-9: new high-speed USB device number 4 using xhci_hcd
[40340.275316] usb 1-9: New USB device found, idVendor=13fe, idProduct=4200, bcdDevice= 1.00
[40340.275318] usb 1-9: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[40340.275320] usb 1-9: Product: UDinfo UF2 4GB
[40340.275320] usb 1-9: Manufacturer:         
[40340.275321] usb 1-9: SerialNumber: 07036AD073040B35
[40340.285346] usb-storage 1-9:1.0: USB Mass Storage device detected
[40340.285618] scsi host10: usb-storage 1-9:1.0
[40341.293199] scsi 10:0:0:0: Direct-Access              UDinfo UF2 4GB   PMAP PQ: 0 ANSI: 6
[40341.293607] scsi 10:0:0:0: Attached scsi generic sg0 type 0
[40342.222094] sd 10:0:0:0: [sda] 7831552 512-byte logical blocks: (4.01 GB/3.73 GiB)
[40342.222881] sd 10:0:0:0: [sda] Write Protect is off
[40342.222883] sd 10:0:0:0: [sda] Mode Sense: 23 00 00 00
[40342.223666] sd 10:0:0:0: [sda] No Caching mode page found
[40342.223669] sd 10:0:0:0: [sda] Assuming drive cache: write through
[40342.239732]  sda: sda1 sda2
[40342.280943] sd 10:0:0:0: [sda] Attached SCSI removable disk
$ mkdir msdos
$ doas mount /dev/sda1 msdos
$ ls -lah msdos
total 6.7M
drwxr-xr-x 2 root  512 Jan  1  1970 ./
drwxr-xr-x 3 john 4.0K Feb 10 22:18 ../
-rwxr-xr-x 1 root 6.7M Feb 10 11:10 vmlinux.64*
-rwxr-xr-x 1 root   33 Feb 10 11:11 vmlinux.64.md5*

I can't seem to mount /dev/sda2. I'm more *BSD experienced than *linux though.
Should I be able to mount it?

Check the drive that is a copy of the image of the OEM firmware-- the one that boots.

Mounting the root partition probably requires an explicit -t squashfs but that's not important right now.

1 Like

That's the thing. I can't find the backup I made of edgeos. It's been openbsd for about 5 years. The original 4GB key now has openwrt on it, but it can't boot.

At this moment, this is only openbsd on 32GB key.

Ok. TYVM for looking at this btw.

How have you found the performance of this hardware on openwrt?
What kind of connection do you use it with?
I think the chipset is heavily optimised for network stuff. It appears v weak for OS stuff.

Yes, mount that one to see if the kernel file is named vmlinux.64 or something else like boot. The bootloader is looking for one file on the USB which it will load to RAM, verify the MD5, and start executing.

If you do find the bootable kernel is not named vmlinux.64, it would make sense to change the name of the kernel file on OpenWrt to whatever the bootloader does look for then see if it will boot.

This hardware is not fast. Tons of memory but not fast. Perhaps suitable for 100 Mb ISP conservatively. I don't think OpenWrt uses any of the hardware network accelerators the chip has.

1 Like

yes! the file is called 'boot'. There is no md5 to check

% file boot
boot: ELF 64-bit MSB executable, MIPS, MIPS64 rel2 version 1 (SYSV), statically linked, not stripped

I know what to do now to make it boot TYVM :smiley:

I agree. I'm p. sure openbsd hasn't got the magic sauce accelerators either.
I guess the edgeros software has? Might put that on if I can find it.
I do not like the webby interface.

I'll see if it boots openwrt and run a few tests when I can take the connection down.
In the longer run, for the connection, the erl3 is going to be replaced with something that can handle everything full fibre can throw at it:

  1. openwrt on a fritzbox 7230 XI
  2. an old pc with 2x 1GB NICs (but need to see how much power it uses, might be huge)
  3. just buy a mid-range router like a draytek 2630 wired. I think that does PD-DHCPv6
    Maybe need to go for something with 2x2.5GBps NICs

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