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
upgrade_manually [2021/12/06 07:30] – removed unnecessary step atariupgrade_manually [2023/11/18 23:56] (current) – [Upgrading/downgrading Batocera] Adjust wording, fix typos maximumentropy
Line 17: Line 17:
 ===== Upgrading/downgrading Batocera ===== ===== Upgrading/downgrading Batocera =====
  
-In Batocera **5.23** and higher, it is advised to upgrade/downgrade using the ''batocera-upgrade'' command [[access_the_batocera_via_ssh|via SSH]]. Grab the URL of the version you want to upgrade/downgrade to and run ''%%batocera-upgrade [URL]%%''. For example, to upgrade to the latest stable for x86_64:+In Batocera **5.23** and higher, it is advised to upgrade/downgrade using the ''batocera-upgrade'' command [[access_the_batocera_via_ssh|via SSH]]. Grab the [[:current_and_previous_releases|URL of the version you want]] to upgrade/downgrade to and run ''%%batocera-upgrade [URL]%%''. For example, to upgrade to the latest stable for x86_64:
  
 <code> <code>
 batocera-upgrade https://batocera.org/upgrades/x86_64/stable/last batocera-upgrade https://batocera.org/upgrades/x86_64/stable/last
 </code> </code>
 +
 +Or to downgrade to a specific [[:current_and_previous_releases#current_builds_older_releases_and_betas|older version]], like in the example below to downgrade to Batocera 36 for PC x86_64. Don't copy that command on another architecture like a Raspberry Pi, you need to adapt the URL to it.
 +
 +<code>
 +batocera-upgrade https://mirrors.o2switch.fr/batocera/x86_64/stable/last/archives/36/
 +</code>
 +
 +<WRAP center round info 60%>
 +The command ''%%cat /boot/boot/batocera.board%%'' can be used to display the arch that should be used.  For example, on a PC this will display x86_64.
 +</WRAP>
 +
  
 You should then see output similar to this: You should then see output similar to this:
Line 29: Line 40:
 url: https://updates.batocera.org/x86_64/stable/last/boot.tar.xz url: https://updates.batocera.org/x86_64/stable/last/boot.tar.xz
 need to download 1876mb need to download 1876mb
-m/upgrade/boot.tar.xz     0%[                              ]   9.55M  1.82MB/   eta 19m 42s+/userdata/system/upgrade/boot.tar.xz     0%[                              ]   9.55M  1.82MB/   eta 19m 42s
 </code> </code>
  
-For Batocera 5.**7** to 5.**22**, the command (for PC x86_64, please adapt to the right architecture) would instead be:+For very old versions, from Batocera 5.**7** to 5.**22**, the command (for PC x86_64, please adapt to the right architecture) would instead be:
  
 <code> <code>
Line 42: Line 53:
 On the next reboot of Batocera, it will instead use the upgraded version. If the automatic upgrade tool is not suitable for your purpose, then you can manually upgrade/downgrade as specified below instead. On the next reboot of Batocera, it will instead use the upgraded version. If the automatic upgrade tool is not suitable for your purpose, then you can manually upgrade/downgrade as specified below instead.
  
-To upgrade/downgrade manually: +==== Upgrade from a local boot.tar.xz file ==== 
-  - Download the ''boot.tar.xz'' file of the version you want. The official ones are available at http://batocera.org/upgrades (for older versions use https://mirrors.o2switch.fr/batocera/, navigate to your architecture and go to /stable/last/archives/). [[:current_and_previous_releases#current_builds|Here's a list of architectures and links to their builds.]]+ 
 +To upgrade/downgrade manually from a downloaded ''boot.tar.xz'' file
 +  - Download the ''boot.tar.xz'' file of the version you want. The official ones are available at https://mirrors.o2switch.fr/batocera/ (for older versions, navigate to your architecture and go to /stable/last/archives/). [[:current_and_previous_releases#current_builds|Here's a list of architectures and links to their builds.]] 
 +  - Backup your boot configuration files (''batocera-boot.conf'' and ''config.txt'') from the Batocera machine (if you have edited them and require the edits to boot properly) to a safe location.
   - Unzip the ''boot.tar.xz'' file (it's just like a ''.zip'', you can use 7-zip on Windows) to get the ''boot.tar'' file.   - Unzip the ''boot.tar.xz'' file (it's just like a ''.zip'', you can use 7-zip on Windows) to get the ''boot.tar'' file.
-  - Backup your boot configuration files (if you have edited them and require the edits to boot properly) to a safe location. +  - Unzip the ''boot.tar'' file into the root of your Batocera drive's [[:edit_boot_partition|boot partition]] (this is the default partition you see when inserting the drive into Windows) and overwrite the existing files. You may have to [[:edit_boot_partition#plugging_it_into_another_machine|assign a drive letter under Windows Disk Management]] to see it in the file explorer.
-  - Unzip the ''boot.tar'' file into the root of your Batocera drive's [[:edit_boot_partition|boot partition]] (This is the default partition you see when inserting the drive into Windows) and overwrite the existing files. You may have to assign a drive letter under Windows Disk Management to see it in the file explorer.+
   - Restore your boot configuration files if you wish to do so.   - Restore your boot configuration files if you wish to do so.
  
Line 55: Line 68:
   - Check the md5sum of the file to ensure that it was downloaded correctly (this may take a bit of time, depending on the speed of your drive)   - Check the md5sum of the file to ensure that it was downloaded correctly (this may take a bit of time, depending on the speed of your drive)
   - After validation, remount the boot partition in rewritable mode   - After validation, remount the boot partition in rewritable mode
-  - Back up your boot config files+  - Back up your boot config files: ''/boot/batocera-boot.conf'' to ''/boot/batocera-boot.conf.upgrade'' and ''/boot/config.txt'' to ''/boot/config.txt.upgrade''
   - Unzip the contents of ''/userdata/system/upgrade/boot.tar.xz'' to ''/boot/''   - Unzip the contents of ''/userdata/system/upgrade/boot.tar.xz'' to ''/boot/''
-  - Restore your boot config files+  - Restore your boot config files: ''/boot/batocera-boot.conf.upgrade'' to ''/boot/batocera-boot.conf'' and ''/boot/config.txt.upgrade'' to ''/boot/config.txt''
   - Do a "final cleanup"   - Do a "final cleanup"
   - Remove ''/userdata/system/upgrade/boot.tar.xz''   - Remove ''/userdata/system/upgrade/boot.tar.xz''
Line 71: Line 84:
 To work around there not being enough free space in the **userdata** partition, you can do any of the following: To work around there not being enough free space in the **userdata** partition, you can do any of the following:
   * Temporarily remove some of your ROMs, BIOS, and other userdata to make enough free space to download the ''boot.tar.xz'' file.   * Temporarily remove some of your ROMs, BIOS, and other userdata to make enough free space to download the ''boot.tar.xz'' file.
-  * Download the ''boot.tar.xz'' from [[:current_and_previous_releases#current_builds|the server]] for the intended Batocera version onto another computer, connect the Batocera drive to it, and extract the contents of ''boot.tar.xz'' directly to the boot partition of Batocera.+  * Download the ''boot.tar.xz'' from [[:current_and_previous_releases#current_builds|the server]] for the intended Batocera version onto another computer, connect the Batocera drive to it, and extract the contents of ''boot.tar'' directly to the boot partition of Batocera.
  
 ==== Boot partition ==== ==== Boot partition ====
Line 84: Line 97:
  
 === Use another computer === === Use another computer ===
 +
 Use another computer to extract the update files onto the Batocera drive. Be aware that by doing this you would have to do this manual workaround every time you need to update. Use another computer to extract the update files onto the Batocera drive. Be aware that by doing this you would have to do this manual workaround every time you need to update.
     - Insert your drive into another computer     - Insert your drive into another computer
     - Back up the contents of the FAT32 boot partition of the Batocera drive (Windows should only be able to see this partition and nothing else by default) to another location     - Back up the contents of the FAT32 boot partition of the Batocera drive (Windows should only be able to see this partition and nothing else by default) to another location
     - Delete the ''/boot/batocera'' file from the Batocera drive (it is just called ''batocera'' without a file-extension and is about 2 GB large (smaller in older versions))     - Delete the ''/boot/batocera'' file from the Batocera drive (it is just called ''batocera'' without a file-extension and is about 2 GB large (smaller in older versions))
-    - Extract the ''boot.tar.xz'' file to the root of that partition+    - Extract the ''boot.tar'' file to the root of that partition
     - Replug the Batocera back into your Batocera machine and boot Batocera. <WRAP center round tip>     - Replug the Batocera back into your Batocera machine and boot Batocera. <WRAP center round tip>
 If Batocera fails to boot, you can restore the data you backed up in step 2. If Batocera fails to boot, you can restore the data you backed up in step 2.
Line 94: Line 108:
  
 === Remove the old version first === === Remove the old version first ===
 +
 Remove the old version of Batocera //before// overwriting it with the update. Be aware that by doing this you would have to do this manual workaround every time you need to update. Remove the old version of Batocera //before// overwriting it with the update. Be aware that by doing this you would have to do this manual workaround every time you need to update.
     - Boot into Batocera, [[:access_the_batocera_via_ssh|SSH into it]] or use the file manager's xterm and run the following: <code>mount -o remount,rw /boot</code>     - Boot into Batocera, [[:access_the_batocera_via_ssh|SSH into it]] or use the file manager's xterm and run the following: <code>mount -o remount,rw /boot</code>
Line 108: Line 123:
  
 === Flash a spare drive === === Flash a spare drive ===
 +
 [[:install_batocera|Flash]] a spare USB/portable hard-drive with a new copy of Batocera and boot into that, copy all your ''/userdata/'' (everything in Share) from your old Batocera drive to your spare USB/portable hard-drive and then reflash the old Batocera drive with a new version of Batocera (or just continue to use your spare USB/portable hard-drive). [[:install_batocera|Flash]] a spare USB/portable hard-drive with a new copy of Batocera and boot into that, copy all your ''/userdata/'' (everything in Share) from your old Batocera drive to your spare USB/portable hard-drive and then reflash the old Batocera drive with a new version of Batocera (or just continue to use your spare USB/portable hard-drive).
  
 === Reflash the drive === === Reflash the drive ===
 +
 Backup your ''/userdata/'' to another device (you may lose file attributes by doing this, causing problems with WINE/Cemu) and [[:install_batocera|reflash Batocera]]. Backup your ''/userdata/'' to another device (you may lose file attributes by doing this, causing problems with WINE/Cemu) and [[:install_batocera|reflash Batocera]].
  
 === Manually extend the boot partition === === Manually extend the boot partition ===
 +
 Extend the boot partition of your drive using an advanced tool like [[https://gparted.org/|gparted]] or [[wp>GNOME_Disks|GNOME Disks (a.k.a. gnome-disk-utility)]]. <wrap em>This will likely destroy your userdata partition</wrap>, so back up all your ROMs, saves, configs, etc. first. This is not the recommended method, as it may cause irreversible damage to your drive and it may damage the MBR/GPT table, causing the drive to become unbootable. Consider the other options first or just staying on your current version of Batocera. Batocera **v30** requires at least 6 GB total assigned to the boot partition and 2 GB free space in the userdata partition to be able to use the built-in updater. Extend the boot partition of your drive using an advanced tool like [[https://gparted.org/|gparted]] or [[wp>GNOME_Disks|GNOME Disks (a.k.a. gnome-disk-utility)]]. <wrap em>This will likely destroy your userdata partition</wrap>, so back up all your ROMs, saves, configs, etc. first. This is not the recommended method, as it may cause irreversible damage to your drive and it may damage the MBR/GPT table, causing the drive to become unbootable. Consider the other options first or just staying on your current version of Batocera. Batocera **v30** requires at least 6 GB total assigned to the boot partition and 2 GB free space in the userdata partition to be able to use the built-in updater.
  
  • upgrade_manually.1638772224.txt.gz
  • Last modified: 2 years ago
  • by atari