OpenWrT Installation - micahgrinnell/CC-Capstone-Project GitHub Wiki

How to install OpenWRT

This page will briefly guide you on how to download and install OpenWRT onto your Protectli networking device. The process may vary from case to case depending on the software version, devices being used, and resources available. In this example, the tools at my disposal are:

  • 16GB USB drive
  • 4 Port Protectli Device
  • Internet connection
  • Personal computer

Process

  1. Burn Ubuntu onto a USB drive
    • I downloaded the latest version (20.0.4.2) of Ubuntu at this website.
    • Similar to the other installation guides, we are using Rufus to burn the Ubuntu image
  2. Boot from USB drive on Protectli device
    • By interrupting the boot process with either F2 or F11 and selecting the USB drive
  3. Select 'Try Ubuntu'
    • Wait for the desktop to load
    • Ensure the device is connected to the internet
  4. Download OpenWRT onto the device
    • Either download it from https://downloads.openwrt.org/releases/19.07.7/targets/x86/64/ on Firefox and select 'combined-ext4.img.gz'
    • Or use this command in a terminal: wget https://downloads.openwrt.org/releases/19.07.7/targets/x86/64/openwrt-19.07.7-x86-64-combined-ext4.img.gz
    • Move the file to the desired installation directory (I created a directory called OpenWRT in my home directory)
  5. Unzip OpenWRT
    • Open a terminal in the same directory as the OpenWRT zipped file
    • Unzip with gunzip filename
  6. Look at the names of the drives on the Protectli device with lsblk
  7. Typically the main drive for installation is 'sda' on Ubuntu devices
  8. Write the OpenWRT image to the disk
    • sudo dd if=openwrt-19.07.4-x86-64-combined-ext4.img of=/dev/sda
    • Reboot upon successful operation and remove USB
  9. The device should boot into OpenWRT
    • Once it does hit enter and reset the root password with passwd
  10. Plug USB drive back in and boot into it
  • Select 'Try Ubuntu' again
  • Wait for the desktop to load
  1. Open a terminal to resize partition
  • Enter sudo fdisk /dev/sda
  • Once the fdisk prompt is displayed enter 'p'
  • Write down the Start and End sectors for sda2
  • Enter 'd' and then '2', this should delete Partition 2
  • Enter 'n' then 'p' and then '2' creating a new partition
  • Upon the 'First sector' prompt enter the value saved earlier (should be similar to 33792)
  • Hit enter to use the default value for 'Last sector' prompt
  • Select 'No' when asked about removing the signature
  • Enter 'w' to write the changes to the disk
  1. In the same terminal resize the file system
  • Enter sudo resize2fs /dev/sda2
  • If prompted to run 'e2fsck' enter that command first sudo e2fsck -f /dev/sda2
  • Then try the first command
  1. Reboot device and remove USB drive
  • The device should now boot to OpenWRT
  1. Hit enter to get to the command line and run these:
  • opkg update
  • opkg install luci-ssl
  • That will install the web GUI (documentation)
⚠️ **GitHub.com Fallback** ⚠️