Updating an existing PirateBox to a newer version on the MR3020 is somewhat different than making a clean install. It is very similar, but one must pay attention to some details that can slow down the process.
The version 0.5.1 comes with the lighttpd web sever that allows an easy design of an user interface that is presented to users. The web pages ("UI" in this case) can be simply created using html and CSS and easily uploaded to the PirateBox whereas with previous versions there was only a limited area for changes.
What you will need
Known I guess from the previous installation process, but just for the sake of completeness:
- MR3020 with previous PB installation (obviously...)
- 1 x Ethernet cable
- 1 x USB flash drive for the MR3020 (external HDD etc also fine)
- Linux based computer
- Home router with Internet access
- The IP address of your home router
- The root password of your MR3020 (this was set when you installed PB for the first time, find it)
Also you will need some knowledge about the "vi" editor, if you have not used it too much before here is a quick guide with the functions you will need:
- i - Enter edit mode
- ESC - Exit current mode, e.g. exit edit mode
- :q! - Quit without saving the changes
- ZZ - Save changes & quit
OpenWRT is already installed so those first steps can be ignored here, only the PirateBox package needs to be removed and updated with a new one. Note that you will need Internet connection and hence direct access to your home router for this, off-line installation does not work! (The package downloaded later on is a script package that downloads other packages and configures them, hence Internet access is necessary)
Set a fixed IP address to you PC in the same subnet as your PirateBox, assuming it has the IP 192.168.1.1 set your PC to 192.168.1.xxx
You can set a fixed IP by going to "Edit Connections/Wired/Edit", refer to the image below (I renamed my wired connection to "Cable", this is only personal preference).
Connect your computer with the ethernet cable to your MR3020 and SSH into your PirateBox on the address 192.168.1.1 (providing you didn't change this after the previous install). In Ubuntu you will need root access to ssh, so
sudo ssh firstname.lastname@example.org
After providing your root password and the root password to your router you should now be presented the OpenWRT screen:
Now edit the network file and check that your settings are OK there. You have to make sure that your MR3020 is on the same subnet as your home router. Now at this point it is likely that your home router will be the dominant, hence check your home router. (Example: if your home router is 192.168.0.1 then you will have to set the MR3020 to 192.168.0.xxx and reboot it for the changes to take effect. "Option gateway" is the home router)
Also an important aspect that if the last 2 DNS entries were removed from the bottom of the file (for most users it has caused redirect errors and hence was often removed) then these need to be put back for the duration of the update. These are necessary to connect to the Internet later on.
And make it look similar:
Where 192.168.1.1 is the IP address of the MR3020, 192.168.1.254 is the address of the home router and 18.104.22.168 is a google public DNS.
I assume that if the first time you managed to connect to the Internet and install a previous version of the PB your firewall settings are OK. Again just to make sure it is fine, refer to the image below
If all these settings are OK disconnect you PC and connect your PB to your home router via ethernet cable. Connect to it through wi-fi and SSH into it just like before.Firstly PirateBox needs to be stopped and the old image removed, type
opkg remove piratebox
Now just to make sure you are connected to the Internet, ping google.com
ping -c 5 google.com
If you are getting a response it's OK. if not, then you are not reaching the Internet for some reason, in this case go back a few steps and make sure that your settings are OK. (primarily IP subnet and DNS entries in /etc/config/network)
Step 7.The last step now is to install the new PirateBox image:
opkg install piratebox *
"wget" will download the new PB package and opkg will install it (yes you need the * at the end of the command). Wait until it finishes, reboot when prompted and you are done.