Hello,
I ran into the issue to mount the USB drive with the sysupgrade image for running sysupgrade.
I have
- a Ubiquiti EdgeRouter 4
- a Cisco Console cable
- SanDisk Cruzer Glide16GB USB3 dive formated as FAT32
Following the steps in a) abd b)
a)https://openwrt.org/toh/ubiquiti/edgerouter
b) https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=dd651e54cc5eadba480a56a7d2c18471e560f491
I did
Easy installation via Serial and USB
Get the appropriate RJ45 Console Port cable (see below for details)
Create a USB Drive with a single FAT32 partition (32MB should be adequate).
Download octeon-er-initramfs-kernel.bin from either current or snapshot release onto the USB Drive – You can rename the file to initramfs-kernel.bin
Download octeon-er-squashfs-sysupgrade.tar from either current or snapshot release onto the USB Drive - You can rename the file to sysupgrade.tar
Note: I did the rename's.
Connect the Console Cable
Start a Terminal-Client (8N1 115200 Baud), for example by running screen /dev/ttyUSB0 115200
Note:
-
I used putty - worked fine
-
I connected as "ubnt" user and did a "reboot" command and then did hold the enter key while the device was rebooting.
Immediately hold down the enter key on your keyboard.
This should halt the boot process and give you a Bootloader-Prompt Octeon ubnt_e200# (If the device continues to boot try again).
Yup - got this
Read the initramfs-kernel.bin file from USB into RAM as below:
Octeon ubnt_e200# usb start
(Re)start USB...
USB: USB EHCI 1.00
scanning bus for devices... 2 USB Device(s) found
scanning bus for storage devices... 1 Storage Device(s) found
Octeon ubnt_e200# usb part 0
Partition Map for USB device 0 -- Partition Type: DOS
Partition Start Sector Num Sectors Type
1 2048 15824896 b
Octeon ubnt_e200# fatload usb 0:1 0x20000000 initramfs-kernel.bin
reading initramfs-kernel.bin
14688528 bytes read
Octeon ubnt_e200# bootoctlinux 0 numcores=2 endbootargs mem=0
Did "bootoctlinux 0 numcores=4 endbootargs mem=0"
A minimal OpenWrt environment will boot from RAM. Wait until the boot finishes and hit Enter. It should appear similar to below:
BusyBox v1.30.1 () built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt 19.07.4, r11208-ce6496d796
-----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
Yup, got this.
Now I did:
- boot process should finish and you will be greeted with console after pressing enter
- create directory to mount usb flash drive to by typing:
mkdir /tmp/sda - mount flash drive to that directory by typing:
mount /dev/sda1 /tmp/sda
- create directory to mount usb flash drive to by typing:
NOW here is the problem: the mount command couldn't find the "/dev/sda1" device.
My assumption is, that the name of my USB drive is different from "/dev/sda1".
How can I find the name of my USB drive?
Or do I use the wrong USB drive? But why can I read "initramfs-kernel.bin" from it and can boot from it?
Any ideas/suggestion are appreciated!
Thanks very much!
Gunter