Using a backup/restore point of your USB Linux install
Once you have installed Linux and configured it the way you want, (added Retroarch playlists, setup Kodi, added conky settings, changed language settings, etc) it's very important to back up your install. Every version of PS4 Linux is a house of cards which is set up in a particular way to run on your PS4 and if you are new to using it, chances are you're going to have to reinstall and reconfigure it at least once before you're happy with it. For example, a common mistake is "sudo pacman -Syu" in Manjaro or installing updates when prompted in the OS itself. This is going to install incompatible drivers with the PS4 and break your install. Having this backup also takes away the feeling of walking on thin ice when you are getting an understanding of what PS4 Linux can and can't do and trying new things.
Rather than going through the timely process of reinstalling Linux and setting up your configuration again, you can restore a backup with a few clicks on your Windows machine and save a lot of time. You might even want to backup a fresh install if you wish.
I welcome people making tutorials on setting up PS4 Linux to include this thread as an additional step. It saves a lot of heartache and stress.
You will need:
- The USB storage containing your Linux install
- A Windows PC*
- External storage (optional)
- win32diskimager (https://sourceforge.net/projects/win32diskimager/files/Archive/)
*Must have the same amount of free space as the capacity of the USB storage with your Linux install on it.
Making a Backup
1. Install win32diskimager
The URL is included above. Either keep it installed, keep the install file or make note of that URL. You'll need it to recover backups.
2. Run win32diskimager
3. Insert your USB storage containing your Linux install to your PC
The drop down box under "Device" should now display the drive allocation of your USB storage
4. Specify the location of your backup
Click on the blue folder icon under "Image File" then click through the file explorer and put it somewhere safe. Under filename, enter "backup.img" (you must include the .img extension manually)
5. Click "Read"
This will take a while. The file size of the backup file will be the same as the capacity of the USB storage.
6. (Optional) Move backup.img to another external storage device
You can rename the file as you see fit too.
Now if you install the wrong drivers or change something that breaks your install, you can restore your backup without having to reinstall. This backs up all of the partitions which are both visible and invisible to Windows. You can follow these next steps to restore your backup if needed.
Restoring a Backup
1. Make sure the backup file is on your PC
2. Run win32diskimager
3. Connect your desired USB storage to boot Linux from to your PC
It's safest to use the same USB storage rather than a similar one of the same size. Storage devices don't always display the storage space they advertise and if you use a larger storage, it can mess with your Linux partition.
When the USB storage is detected, the drop down box under "Device" should now display the drive allocation of your USB storage. Make sure no other USB storage is connected to your PC at this time. You don't want to write the .img file to the wrong drive.
4. Open the backup.img file in win32diskimager
Click the blue folder icon under "Image File" and locate your backup file on your PC.
5. Click "Write"
This will also take some time. I have a 128gb USB 3.0 stick and it takes about 30 minutes. Once win32diskimager says it is done, you can safely disconnect the device from your PC.
6. Connect the USB storage to your PlayStation 4
You can now boot Linux as you normally would with your restored backup.
Rather than going through the timely process of reinstalling Linux and setting up your configuration again, you can restore a backup with a few clicks on your Windows machine and save a lot of time. You might even want to backup a fresh install if you wish.
I welcome people making tutorials on setting up PS4 Linux to include this thread as an additional step. It saves a lot of heartache and stress.
You will need:
- The USB storage containing your Linux install
- A Windows PC*
- External storage (optional)
- win32diskimager (https://sourceforge.net/projects/win32diskimager/files/Archive/)
*Must have the same amount of free space as the capacity of the USB storage with your Linux install on it.
Making a Backup
1. Install win32diskimager
The URL is included above. Either keep it installed, keep the install file or make note of that URL. You'll need it to recover backups.
2. Run win32diskimager
3. Insert your USB storage containing your Linux install to your PC
The drop down box under "Device" should now display the drive allocation of your USB storage
4. Specify the location of your backup
Click on the blue folder icon under "Image File" then click through the file explorer and put it somewhere safe. Under filename, enter "backup.img" (you must include the .img extension manually)
5. Click "Read"
This will take a while. The file size of the backup file will be the same as the capacity of the USB storage.
6. (Optional) Move backup.img to another external storage device
You can rename the file as you see fit too.
Now if you install the wrong drivers or change something that breaks your install, you can restore your backup without having to reinstall. This backs up all of the partitions which are both visible and invisible to Windows. You can follow these next steps to restore your backup if needed.
Restoring a Backup
1. Make sure the backup file is on your PC
2. Run win32diskimager
3. Connect your desired USB storage to boot Linux from to your PC
It's safest to use the same USB storage rather than a similar one of the same size. Storage devices don't always display the storage space they advertise and if you use a larger storage, it can mess with your Linux partition.
When the USB storage is detected, the drop down box under "Device" should now display the drive allocation of your USB storage. Make sure no other USB storage is connected to your PC at this time. You don't want to write the .img file to the wrong drive.
4. Open the backup.img file in win32diskimager
Click the blue folder icon under "Image File" and locate your backup file on your PC.
5. Click "Write"
This will also take some time. I have a 128gb USB 3.0 stick and it takes about 30 minutes. Once win32diskimager says it is done, you can safely disconnect the device from your PC.
6. Connect the USB storage to your PlayStation 4
You can now boot Linux as you normally would with your restored backup.