Dad Gaming

Install Batocera on a Second SSD Without Losing Your Setup

The most common way people break a working machine is by installing something onto it. The storage layout is decided before the first boot, and the decision that matters is simple: which disk holds the operating system you already trust, and which disk holds the new one.

This guide installs Batocera onto a dedicated second SSD while leaving the existing installation untouched and bootable. The machine it is written for is the same one from the hardware guide: an HP ProDesk 600 G4 Mini with two M.2 storage slots and a 2.5-inch SATA bay, which between them hold three drives.

The procedures here are documented from the official Batocera installation documentation. They were not executed on the reference hardware, because the reference hardware was not available for this article. Where a step involves a destructive command, the verification comes first and the risk is stated explicitly.

KI-Hinweis (KI-Assistenz): Dieser Beitrag wurde von DadChecks Editorial KI-gestützt erstellt und von den automatisierten Prüfagenten der Redaktion geprüft. Keine Person hat den Beitrag selbst geschrieben oder selbst getestet. Es handelt sich um eine Recherche, nicht um einen Praxistest: Es gab keine eigene Testhardware, keine eigenen Messungen und keine eigene Kaufentscheidung.

Objective. Move a working installation onto a dedicated second SSD, without touching the first disk and without losing the old setup as a fallback. The applicable software version is Batocera.linux 43.1.

What you need, and what you need to know first

Requirements

  • A working Batocera installation or an existing operating system you are willing to fall back to.
  • A second SSD, physically installed and visible to the BIOS.
  • A USB stick (8 GB or larger) for the installer, unless you image directly from another machine.
  • The current Batocera image from the official site.

Applicable versions. Batocera releases regularly; the official documentation is the current reference for the image format and the installer behaviour. Check the version you downloaded before following any step, because the image layout and the installer menu can change between releases.

Prerequisites

  1. Back up the first disk. Not “the important files” — the whole thing. If the first disk holds anything you would miss, it needs a verified copy elsewhere before you begin. The recovery procedure at the end of this article assumes you have one.
  2. Know which physical disk is which. Physically, not by name. The identifiers Linux assigns are not stable; they depend on the order the kernel enumerates the controllers, which can change with a BIOS update or a different boot. The checklist below establishes that mapping.
  3. Write down the serial number of each drive. Both the label and the value the system reports. This never changes, and it is what the “is this the right disk” check depends on.

Storage layout

The layout this guide builds, and the reason for each part:

  ┌─────────────────────────────────────────────────────────────┐
  │  Disk 1  —  the existing system (UNCHANGED)                │
  │                                                             │
  │    Boot partition │ existing OS │ existing data             │
  │                                                             │
  │    Stays exactly as it is. This is the fallback.            │
  └─────────────────────────────────────────────────────────────┘

  ┌─────────────────────────────────────────────────────────────┐
  │  Disk 2  —  Batocera (NEW, fully written)                  │
  │                                                             │
  │    Boot partition │ Batocera system │ games partition       │
  │                                                             │
  │    The ENTIRE disk is written. Anything already on Disk 2   │
  │    is destroyed. Nothing is read from Disk 2.               │
  └─────────────────────────────────────────────────────────────┘

  ┌─────────────────────────────────────────────────────────────┐
  │  USB stick  —  installer, temporary                         │
  │                                                             │
  │    Used to write the image. Removed afterwards.             │
  └─────────────────────────────────────────────────────────────┘

Two properties of this layout are deliberate. Disk 1 is not touched at all, so the fallback is a BIOS boot-order change rather than a restore. And the partitioning of Disk 2 is done by the Batocera installer, not by you, which is what removes the need for a manual mkfs or dd in the common case.

Choosing the method: an installation decision tree

The official documentation offers two paths. Picking the wrong one is how people overwrite the wrong disk.

  Do you already have a working Batocera installation?
  │
  ├─ NO  →  You need an installer.
  │        │
  │        ├─ Is the target disk attached to THIS machine?
  │        │    ├─ YES → Write the image DIRECTLY to the target disk.
  │        │    │        Use the official image-writing tool.
  │        │    │        The tool asks you to pick the target and
  │        │    │        verifies it. No manual dd required.
  │        │    │
  │        │    └─ NO  → Write the image to a USB stick here,
  │        │             carry it over, and boot the target from USB.
  │        │
  │        └─ (Either way: the target disk is fully overwritten.)
  │
  └─ YES →  You already have the tools on the machine.
           │
           ├─ Recommended for THIS guide: use the official image-writing
           │  tool on the running system, writing to the target disk.
           │  It shows the disk size and model before writing, so you can
           │  confirm the target against the serial number you wrote down.
           │
           └─ Alternative: boot the official installer from a USB stick
              and let the installer write the target disk. Use this when
              you want the installer's own partitioning.

The tree reduces to one rule: the operation that writes the image must let you see which disk you are about to overwrite, before it writes.

Identifying the disks safely

This is the part that matters most, and the part most guides skip. Linux device names are not stable identifiers. /dev/sda on one boot can be /dev/sdb on the next after a firmware change, and a machine with a SATA disk and an NVMe disk can enumerate them in either order. The rule from the specification is explicit: do not assume Linux device identifiers remain constant.

The safe disk identification checklist

Work through this list in order. Do not skip to the write step.

  1. Record the physical position. Note which drive is in the SATA bay and which is in the M.2 slot. This is the only identifier that does not change.
  2. Record the serial numbers. From the drive labels and from the system’s own disk information screen, write both down.
  3. Boot into the system you are installing from, open the disk information, and match each disk’s serial number to its physical position. This is your mapping table:

| Physical position | Serial number | Size | Device name at this moment | |—|—|—|—| | M.2 slot (first disk) | ____ | _ | _ | | SATA bay (second disk) | ____ | _ | _ |

* The device name column is a snapshot for this boot only. Never write it into a script as a fixed value.

  1. Check that the sizes differ. A target and a source of different sizes are trivially distinguishable, and the installer shows the size.
  2. Confirm the target is empty. If the disk you intend to write already holds data you need, stop. Either back it up or choose another disk.
  3. Re-verify immediately before writing. Run the identification again right before the write. The device name may have changed since step 3.

A read-only verification command

The official Linux tools for this are read-only — they list what is on a disk, they do not change it. Running them is safe:

# List every block device with its model, size and serial number.
lsblk -o NAME,MODEL,SIZE,SERIAL,TYPE,MOUNTPOINTS

# Read a disk's partition table without modifying anything.
sudo parted /dev/sda print

The second command is read-only in this form: parted <device> print reports the partition table and exits. It is included because reading the table is how you confirm that a disk is the one you think it is — an empty disk with no partitions is a strong signal that it is the target, and a disk full of partitions is a strong signal that it is not.

The lsblk output is also the safest way to build the mapping table, because it reports the serial number next to the device name.

Warning. The commands above only read. Every command in the next > section destroys data on the disk it names. Read this section twice before > you run anything in it.

Writing the image: the destructive part

The preferred path — the official image-writing tool

The official documentation describes writing the image with a dedicated tool rather than with a raw device write. The tool presents the available drives, shows the model and capacity of each, and asks you to confirm the target before it writes. Use this path. It exists precisely because the manual alternative is dangerous.

Two properties of this path are worth stating explicitly, because they are the reason it is safe:

  • The target is named by you, from a list of drives, not by a device name you typed.
  • The write happens once, after your confirmation. There is no second write to a different device.

The image itself comes from the official download. Verify the download page before you write: the image is the whole operating system, and an image from an unofficial mirror is an image you cannot audit.

The manual path — and why this guide does not automate it

A raw device write is possible from the command line. It is also the exact operation the editorial specification forbids automating, and the reason is not caution for its own sake: a dd to the wrong device silently destroys whatever was on it, and the device name in the command may not be the device name you meant.

This guide therefore does not provide a scripted dd. What it provides instead is the verification procedure and the risk statement, so that if you choose the manual path, you do it with the information the automated version would have demanded:

  • Identify the target by serial number, using the read-only commands above, in the same boot session as the write.
  • Confirm the target is the disk you intend to overwrite and that the other disk is the one you are keeping.
  • Understand that the write is irreversible. Everything on the target disk is destroyed, including any partition table it had. There is no undo.
  • Do not script it with a device name baked in. If you write a script that contains a literal device name, that script is wrong the next time the kernel enumerates the disks differently.

If you want the safest possible outcome and you are not certain which disk is which, use the installer from a USB stick instead. It writes the target disk from its own environment, where the drive you select is the drive you selected, and it refuses to proceed without a confirmation.

If you use a USB installer

The official installer boots from a USB stick and offers to write the internal drive. Two things to get right:

  • Select the internal target disk, not the USB stick. The installer shows both. The USB stick is usually smaller and is listed first.
  • Do not let the installer use the default boot partition location if it offers a choice. You want the boot record on the disk you are writing.

Bootloader, UEFI and BIOS boot selection

Three separate mechanisms are involved, and confusing them is the usual cause of “it installed but will not boot”.

The boot order decides which disk the machine tries. After the install, enter the BIOS/UEFI setup and check the boot order. The disk with Batocera must be ahead of the disk with the old system if you want Batocera to start by default. The old system remains reachable by moving it back to the front — that is the entire rollback mechanism, and it costs one BIOS visit.

UEFI versus legacy boot mode is a property of the machine, not of the drive. If the machine boots in UEFI mode, the Batocera install must match that mode. The official documentation covers the modes and the image variants. The practical check: enter the BIOS and look at whether the boot entries are labelled UEFI or legacy, and install the matching image. Installing the wrong variant produces a machine that sees the disk but will not boot from it.

Secure Boot is a separate gate. The official documentation states that Secure Boot must be disabled for Batocera to boot on a UEFI system. If the machine refuses to start from the new drive, this is the first thing to check.

A note on the HP ProDesk 600 G4 Mini specifically: the official choose a desktop computer page notes that the BIOS output configuration and the graphics memory setting are worth checking before an install. The BIOS is also where the boot order lives, so this is one visit to the setup screen, not two.

Partition handling

In the preferred path, the installer creates the partitions. You do not format anything by hand, and that is the point: every manual formatting step is a chance to name the wrong device.

If you use the installer’s own partitioning, the layout it produces is the one shown in the diagram at the top of this article: a boot partition, a system partition for Batocera, and a partition the game files can live on.

Two practical points about the game partition:

  • Size it for the games you actually have, not for the ones you might acquire. The storage manager documentation describes how Batocera exposes the internal partitions and how to point it at a network share.
  • Keeping the game files on a separate partition from the system means a system update does not touch them — the same reason the operating system and the games are on separate drives in the layout above.

Initial setup

The first boot is the one that fills in the basics. The official install documentation walks through it, and the sequence is:

  1. Language and timezone.
  2. Controller configuration. Connect one controller and configure it now, while you still have a keyboard. The controller documentation covers the types recognised automatically.
  3. Audio configuration.
  4. Network connection. Wired is simpler; wireless is possible.
  5. Updates. Batocera updates itself from the interface. Let the first update finish before you start adding content.

If the first boot does not reach the setup screen, the problem is almost always the boot mode or Secure Boot rather than the image. Work backwards from the BIOS.

Updating safely

Batocera updates itself, and the update mechanism is the supported path — not a manual image write over the top of an existing install.

Three rules that keep updates boring:

  • Update from the interface, not by re-imaging. Re-imaging loses a configuration you had not backed up.
  • Keep the first disk bootable. If the updates ever go wrong, the old system is still there and still boots. This is the point of the layout.
  • Back up the configuration before a major change. The storage manager documentation describes where Batocera keeps its configuration and how to copy it. Copy it to the first disk or a USB stick before you start changing things.

Post-install verification

Run this list before you declare success. It takes two minutes and catches almost everything.

# Check How Pass condition
1 The new disk holds Batocera Boot it from the BIOS boot menu The Batocera front-end appears
2 The old disk is intact Boot it from the BIOS boot menu The old system starts exactly as before
3 The install is on the intended disk Compare the boot device in the BIOS with your mapping table It matches
4 Serial numbers match Re-run the read-only listing The disks are the ones you recorded
5 The controller works Move it in the front-end The on-screen pointer moves
6 The game partition is visible Check the storage settings The partition appears with the expected size
7 Updates work Run one update from the interface It completes without error
8 The fallback still works Change the boot order back and forth Both disks boot reliably

Check 8 is the one people skip. The old system is a real fallback; if you have never booted it after the install, you do not know it still works.

Recovery procedure

If the new install does not boot, the old one still does — the property this layout was built for.

Step 1 — do not write anything. The most common way to turn a boot problem into a data-loss problem is to re-image the drive “to see if that helps”. If the old disk is untouched, there is no hurry.

Step 2 — boot the old disk from the BIOS boot menu. This is independent of the installed boot order and works even if the boot order is wrong.

Step 3 — diagnose against the list of causes:

Symptom Likely cause What to check
Nothing happens, no boot device The boot order still points at the old disk Move the Batocera disk first in the BIOS
“No bootable device” on the new disk Legacy image installed on a UEFI machine, or the reverse Match the image variant to the boot mode
The BIOS does not list the new disk The drive is not seated or not detected Power down and reseat; check the BIOS storage options
Boot menu shows both, both fail Secure Boot is enabled Disable Secure Boot
The installer would not write The target was not the disk you thought Go back to the identification checklist

Step 4 — if the new disk is the problem, the old disk is unaffected. Reboot into the old system, check the first disk’s data is intact, and decide whether to reinstall.

Step 5 — restore the boot order once the new disk boots reliably. Leave the old disk in the boot menu as a fallback entry rather than removing it.

What recovery looks like if you chose not to back up

If you skipped the backup and the first disk is damaged, nothing in this article brings it back. That is the argument for the backup step, and why it is first in the prerequisites rather than an afterthought.

Troubleshooting

The installer asks for a target disk and you cannot tell which one is which. Stop. Do not guess. Run lsblk -o NAME,MODEL,SIZE,SERIAL,TYPE,MOUNTPOINTS and match the model and serial against the drive you physically replaced. A disk identifier that does not match the disk in your hand is the one condition under which you must cancel. The official image-writing tool asks you to pick the target and verifies it; the manual method does not, which is why this guide does not script it.

The machine still boots into the old installation. The BIOS boot order still points at the first disk. Enter the boot menu on the next start and select the new drive, then make it the first entry once the new installation is confirmed. Leave the old disk in the boot menu as a fallback.

Windows cannot see the new Batocera installation. That is expected. The SHARE partition is normally invisible to Windows and the boot partition is not a Windows filesystem. Verify from Batocera itself.

The SHARE partition is tiny after the install. It expands on first boot to consume the unallocated space. Give the machine a full first boot before judging the size, and do not interrupt it.

Limitations

  • Not executed on the reference hardware. These are documented procedures from the official documentation, not a transcript of a session on a ProDesk 600 G4 Mini.
  • Device names are never fixed here, on purpose. A guide that hardcodes /dev/sda is telling you about the machine it was written on, not yours.
  • The image layout can change between Batocera releases. Check the documentation for the version you downloaded.
  • The host-machine disk procedure was not run. Nothing in this article deletes or formats anything on the machine that published it, or on any machine belonging to the author.

References