Difference between revisions of "Updating"

From OpenPLi Wiki
Jump to: navigation, search
(Best option to update)
(Flash recommend)
 
(11 intermediate revisions by the same user not shown)
Line 4: Line 4:
  
 
=='''Internet connection'''==
 
=='''Internet connection'''==
If you want to update your receiver it has to be connected to the internet. Go to '''Main menu -> Setup''' and press Update, then after a few seconds (depending on your network speed or internet speed) in this case it reports that there are 3 packages that can be updated.  
+
If you want to update OpenPLi your receiver has to be connected to the internet. Go to '''Main menu -> Setup''' and press '''Software update''', then after a few seconds (depending on your internet speed) in this case it reports that there are 3 packages that can be updated.  
  
 
[[File:Updating-001.jpg|centre|750px]]<br>
 
[[File:Updating-001.jpg|centre|750px]]<br>
Line 21: Line 21:
  
 
=='''Best option to update'''==
 
=='''Best option to update'''==
The recommend option to update is "Update and reboot (recommended", this option will update OpenPLi and after this has been done automatically reboot your receiver, so all updated files are installed.
+
The recommended option to update is "Update and reboot (recommended)", this option will update OpenPLi and after this has been done automatically reboot your receiver, so all updated files are installed.
 
[[File:Updating-003.jpg|centre|750px]]<br>
 
[[File:Updating-003.jpg|centre|750px]]<br>
  
 
=='''Flash recommend'''==
 
=='''Flash recommend'''==
Once in a while there maybe many packages to update, it can be more than a few 100, then it will recommend you to flash instead of update. You can of course ignore the option to flash and choose "Update and reboot (recommended)", but it can take a long time for the process to complete.
+
Once in a while there maybe many packages to update, it can be more than a few 100, then "system" will recommend you to flash instead of update. You can of course ignore it and choose "Update and reboot (recommended)", but it can take a long time for the process to complete and the process might fail and crash. The reason for this depends on the box, on the packages, and the quality of them.
  
If you choose to flash, preferably using the [[Installation#Flash_from_the_Menu_.28FlashImage_support.29|'''menu''']] and choosing the backup option, then everything is restored after the flash. When there is no Hard disk present use an USB stick.
+
===More in-dept explanation why we advise to flash===
 +
Opkg (the package manager that manages the updates) processes downloads and installs in parallel, so the box needs enough free flash to accommodate those files. And there shouldn't be any inter package dependencies that interfere.
 +
 
 +
The biggest issue is that opkg performs an upgrade by doing an uninstall followed by an install, and if it is a bulk upgrade, multiple packages get uninstalled before being installed again. A big issue for example is busybox itself. If you remove that, you remove most of the Linux commands as well, which may cause subsequent pre- or post inst- and rm scripts to fail.
 +
 
 +
If you run an upgrade on the command line, you can usually work around this by running the upgrade again, until there is nothing left to upgrade.
 +
But if you run the upgrade from the image, it won't do that, it will reboot after the first run, with the change the box won't boot up again if part of the upgrade failed.
 +
 
 +
In comparison a desktop OS doesn't have these issues. Plenty of space, no issues with busybox commands, and if the distro uses rpm, there is no uninstall/install cycle, as it supports incremental upgrades.
 +
 
 +
=='''How to flash'''==
 +
If you choose to flash, the preferred method is through the [[Installation#Flash_from_the_Menu_.28FlashImage_support.29|'''menu''']] and choosing the backup option, then everything is restored after the flash. When there is no Hard disk present use an USB stick.

Latest revision as of 12:04, 21 June 2022

Intro

OpenPLi is constantly updated by the developers, so it is prudent to update it from time to time and this can be easily done from the menu.


Internet connection

If you want to update OpenPLi your receiver has to be connected to the internet. Go to Main menu -> Setup and press Software update, then after a few seconds (depending on your internet speed) in this case it reports that there are 3 packages that can be updated.

Updating-001.jpg

Updating-002.jpg

Updating-003.jpg

What is updatet

When you press "Show packages to be updated" you will see which packages are updated, in this case 3.

Updating-004.jpg


If you want more information you call check "Show latest commits", which will show you what the developers have done.

Updating-005.jpg

Best option to update

The recommended option to update is "Update and reboot (recommended)", this option will update OpenPLi and after this has been done automatically reboot your receiver, so all updated files are installed.

Updating-003.jpg

Flash recommend

Once in a while there maybe many packages to update, it can be more than a few 100, then "system" will recommend you to flash instead of update. You can of course ignore it and choose "Update and reboot (recommended)", but it can take a long time for the process to complete and the process might fail and crash. The reason for this depends on the box, on the packages, and the quality of them.

More in-dept explanation why we advise to flash

Opkg (the package manager that manages the updates) processes downloads and installs in parallel, so the box needs enough free flash to accommodate those files. And there shouldn't be any inter package dependencies that interfere.

The biggest issue is that opkg performs an upgrade by doing an uninstall followed by an install, and if it is a bulk upgrade, multiple packages get uninstalled before being installed again. A big issue for example is busybox itself. If you remove that, you remove most of the Linux commands as well, which may cause subsequent pre- or post inst- and rm scripts to fail.

If you run an upgrade on the command line, you can usually work around this by running the upgrade again, until there is nothing left to upgrade. But if you run the upgrade from the image, it won't do that, it will reboot after the first run, with the change the box won't boot up again if part of the upgrade failed.

In comparison a desktop OS doesn't have these issues. Plenty of space, no issues with busybox commands, and if the distro uses rpm, there is no uninstall/install cycle, as it supports incremental upgrades.

How to flash

If you choose to flash, the preferred method is through the menu and choosing the backup option, then everything is restored after the flash. When there is no Hard disk present use an USB stick.