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 [2022/07/23 00:05] – [Upgrading/downgrading Batocera] amended example to current standard atariupgrade_manually [2025/04/11 16:58] (current) – Removes old URLs lbrpdx
Line 20: Line 20:
  
 <code> <code>
-batocera-upgrade https://batocera.org/upgrades/x86_64/stable/last+batocera-upgrade https://mirrors.o2switch.fr/batocera/x86_64/stable/last
 </code> </code>
  
-Or to downgrade to a specific [[:current_and_previous_releases#current_builds_older_releases_and_betas|older version]]:+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> <code>
-batocera-upgrade https://mirrors.o2switch.fr/batocera/x86_64/stable/last/archives/20200310/+batocera-upgrade https://mirrors.o2switch.fr/batocera/x86_64/stable/36/
 </code> </code>
 +
 +In Batocera **39** and higher, you can manually download the boot.tar.xz file to /userdata/system/upgrade.
 +Then type <code>batocera-upgrade manual</code>
 +
 +<WRAP center round info>
 +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 33: Line 41:
 <code> <code>
 Starting the upgrade... Starting the upgrade...
-url: https://updates.batocera.org/x86_64/stable/last/boot.tar.xz+url: https://mirrors.o2switch.fr/batocera/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>
-/recalbox/scripts/recalbox-upgrade.sh https://batocera.org/upgrades/x86_64/stable/last+/recalbox/scripts/recalbox-upgrade.sh https://mirrors.o2switch.fr/batocera/x86_64/stable/last
 </code> </code>
  
Line 49: Line 57:
  
 ==== Upgrade from a local boot.tar.xz file ==== ==== Upgrade from a local boot.tar.xz file ====
 +
 +<WRAP center round alert>
 +In Batocera **v38** (FIXME confirm versions) and higher, the following procedure will wipe your userdata if the ''autoresize=true'' flag is uncommented in ''batocera-boot.config''. You have been warned...
 +</WRAP>
  
 To upgrade/downgrade manually from a downloaded ''boot.tar.xz'' file: To upgrade/downgrade manually from a downloaded ''boot.tar.xz'' file:
Line 55: Line 67:
   - 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.
   - 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 [[:edit_boot_partition#plugging_it_into_another_machine|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.+  - Before booting Batocera, restore your boot configuration files to avoid your userdata partition from being wiped.
  
 ===== What the batocera-upgrade command does ===== ===== What the batocera-upgrade command does =====
Line 90: Line 102:
  
 To work around there not being enough free space in the **boot** partition, you can do any **one** of the following: To work around there not being enough free space in the **boot** partition, you can do any **one** of the following:
 +
 +=== 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).
 +
 +=== 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]].
 +
 +=== 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 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 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.
  
 === 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)) +    - Permanently 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)). <WRAP center round important> 
-    - Extract the ''boot.tar'' file to the root of that partition+Ensure that you are actually deleting the file and not just sending it to the recycle bin of your OS. This can be done in most operating systems by holding ''[Shift]'' and then tapping ''[Del]'' with the file selected. Check that the remaining free space on the drive lowers to confirm this. 
 +</WRAP>\\ {{:screenshot_20240726_200459.png?direct&620|Dialogue showing the permanent delete confirmation window, showing 3 GB is free on the Batocera drive.}} 
 +    - Extract the ''boot.tar'' file to the root of that partition, excluding the ''batocera-boot.conf'' file.\\ {{:screenshot_20240726_214002.png?direct&720|The tar file is open, with all files in it but batocera-boot.conf selected. The remaining free space on the drive is now 7 GB.}} {{:screenshot_20240726_215006.png?direct&760|}} <WRAP center round tip> 
 +You can confirm the transfer completed successfully by the presence of the ''batocera.update'' file in the ''boot'' folder of the drive.\\ {{:screenshot_20240726_215100.png?direct&400|}} 
 +</WRAP>
     - 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 109: Line 137:
     - Run the following command to delete the ''batocera'' file and immediately upgrade: <code>rm -i /boot/boot/batocera && batocera-upgrade</code> Confirm the file you want to delete. <WRAP center round info>     - Run the following command to delete the ''batocera'' file and immediately upgrade: <code>rm -i /boot/boot/batocera && batocera-upgrade</code> Confirm the file you want to delete. <WRAP center round info>
 You should then get an output that looks like this: <code>Starting the upgrade... You should then get an output that looks like this: <code>Starting the upgrade...
-url: https://updates.batocera.org/x86_64/beta/last/boot.tar.xz+url: https://mirrors.o2switch.fr/batocera/x86_64/beta/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</code> m/upgrade/boot.tar.xz     0%[                              ]   9.55M  1.82MB/   eta 19m 42s</code>
Line 116: Line 144:
 If Batocera fails to boot, you can restore the backup you made in step 2 and then remove it with (replacing the first path if you used a different location for your backup): <code>cp /userdata/system/batocera-backup /boot/boot/batocera && rm /userdata/system/batocera-backup</code> If Batocera fails to boot, you can restore the backup you made in step 2 and then remove it with (replacing the first path if you used a different location for your backup): <code>cp /userdata/system/batocera-backup /boot/boot/batocera && rm /userdata/system/batocera-backup</code>
 </WRAP> </WRAP>
- 
-=== 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). 
- 
-=== 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]]. 
- 
-=== 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. 
  
  • upgrade_manually.1658534717.txt.gz
  • Last modified: 4 years ago
  • by atari