Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
inbox:toh:cisco:vedge_1000 [2024/08/10 22:34] – [Installing OpenWrt] bluecmdinbox:toh:cisco:vedge_1000 [2024/08/11 12:20] – [Installing OpenWrt] bluecmd
Line 55: Line 55:
 ==== Installing OpenWrt ==== ==== Installing OpenWrt ====
  
 +=== Alternative 1: Boot installation from unlocked u-boot via TFTP ===
  
-=== Alternative 1: Boot installation from inside OEM OS (USB drive, SD card, SSH, HTTP(S)) === +  Download the ''openwrt-octeon-generic-cisco_vedge1000-initramfs-kernel.bin'' file somewhere locally and set up a TFTP server serving the file. 
- +    Example TFTP server command to serve the files in the current directory: ''sudo /usr/sbin/in.tftpd -sLv .'' 
-**Note:** OEM OS only supports mounting vfat partitions automatically +  * Calculate the CRC32 of your boot file using the following command: <code>python3 -c 'd = open("openwrt-octeon-generic-cisco_vedge1000-initramfs-kernel.bin", "rb").read(); import binascii; print("crc32 -v 0x20000000 " + hex(len(d)) + " " + hex(binascii.crc32(d))[2:].rjust(8, "0"))'</code>
- +
-  * Copy ./bin/targets/octeon/generic/openwrt-octeon-generic-cisco_vedge1000-initramfs-kernel.bin  to /boot/openwrt-install.bin +
-  * ''touch /boot/in_prod'' to unlock u-boot if required +
-  Reboot vEdge +
-  * Press ctrl-x to enter u-boot +
-  * Run the following commands: +
-    * ''usb start'' +
-    * ''ext2load usb 0:1 $loadaddr openwrt-install.bin'' +
-    * ''bootoctlinux $loadaddr endbootargs'' +
-  * Skip to the **Prepare the disk step** +
- +
-=== Alternative 2: Boot installation from unlocked u-boot via TFTP === +
- +
-  * Calculate the CRC32 of your boot file using the following command: <code>python3 -c 'd = open("openwrt-initramfs-kernel.bin", "rb").read(); import binascii; print("crc32 -v 0x20000000 " + hex(len(d)) + " " + hex(binascii.crc32(d))[2:])'</code>+
  
   * If you are not in the u-boot prompt, reboot the device and press **Ctrl-x** to enter u-boot   * If you are not in the u-boot prompt, reboot the device and press **Ctrl-x** to enter u-boot
Line 83: Line 70:
     * If the previous crc32 command does not complain, continue with the boot     * If the previous crc32 command does not complain, continue with the boot
     * ''bootoctlinux $loadaddr endbootargs''     * ''bootoctlinux $loadaddr endbootargs''
 +  * Continue with the **Prepare the disk** step
  
-Example tftp server command: ''sudo /usr/sbin/in.tftpd -sLv .''+=== Alternative 2Boot installation from inside OEM OS (USB drive, SD card, SSH, HTTP(S)) === 
 + 
 +**Note:** OEM OS only supports mounting vfat partitions automatically 
 + 
 +  * Copy ''openwrt-octeon-generic-cisco_vedge1000-initramfs-kernel.bin'' to ''/boot/openwrt-install.bin'' 
 +  * ''touch /boot/in_prod'' to unlock u-boot if required 
 +  * Reboot vEdge 
 +  * Press ctrl-x to enter u-boot 
 +  * Run the following commands: 
 +    * ''usb start'' 
 +    * ''ext2load usb 0:1 $loadaddr openwrt-install.bin'' 
 +    * ''bootoctlinux $loadaddr endbootargs'' 
 +  * Continue with the **Prepare the disk** step
  
 === Prepare the disk === === Prepare the disk ===
Line 94: Line 94:
   * Generate a new disk ID by running the following commands:   * Generate a new disk ID by running the following commands:
     * <code>     * <code>
-udhcpc -i br-lan 
-echo 'nameserver 1.1.1.1' > /etc/resolv.conf 
-opkg update 
-opkg install sfdisk 
 source /lib/upgrade/platform.sh source /lib/upgrade/platform.sh
 sfdisk --disk-id "$(platform_get_n821_disk)" 0x10"${RANDOM}" sfdisk --disk-id "$(platform_get_n821_disk)" 0x10"${RANDOM}"
Line 107: Line 103:
 You need to make the file ''openwrt-octeon-generic-cisco_vedge1000-squashfs-sysupgrade.tar'' available to the installation. You need to make the file ''openwrt-octeon-generic-cisco_vedge1000-squashfs-sysupgrade.tar'' available to the installation.
  
-== HTTP from Github ==+**Example using OpenSSH:**
  
 <code> <code>
 udhcpc -i br-lan udhcpc -i br-lan
-echo 'nameserver 8.8.8.8' > /etc/resolv.conf +# On another machinescp -openwrt-octeon-generic-cisco_vedge1000-squashfs-sysupgrade.tar root@10.x.x.x:/tmp/ 
-cd /tmp/ +sysupgrade -n /tmp/openwrt-octeon-generic-cisco_vedge1000-squashfs-sysupgrade.tar
-wget https://github.com/sonix-network/openwrt/releases/download/[..]octeon-generic-cisco_vedge1000-squashfs-sysupgrade.tar +
-sysupgrade -n /tmp/*vedge1000-squashfs-sysupgrade.tar+
 </code> </code>
  
-== USB drive ==+**Example using a USB drive:**
  
 <code> <code>
 mount /dev/sdb1 /mnt mount /dev/sdb1 /mnt
 sysupgrade -n /mnt/openwrt-octeon-generic-cisco_vedge1000-squashfs-sysupgrade.tar sysupgrade -n /mnt/openwrt-octeon-generic-cisco_vedge1000-squashfs-sysupgrade.tar
-</code> 
- 
-== OpenSSH SCP == 
- 
-<code> 
-udhcpc -i br-lan 
-# On another machine: scp -O openwrt-octeon-generic-cisco_vedge1000-squashfs-sysupgrade.tar root@10.x.x.x:/tmp/ 
-sysupgrade -n /tmp/openwrt-octeon-generic-cisco_vedge1000-squashfs-sysupgrade.tar 
 </code> </code>
  
  • Last modified: 2024/09/02 20:29
  • by bluecmd