Skip to content

M.2 Install

elkafasa edited this page Nov 18, 2026 · 5 revisions

M.2 Install

This flow stores the OS as a single .img file on the internal NVMe storage — either the M.2 slot (if your console has one) or the internal SSD (Phat/Slim models without an M.2 slot). Keeping the OS as a file is more resilient to the PS5 touching the drive, and lets the initramfs loop-mount it at boot.

⚠️ Coexistence caveat. The official guide treats the M.2/internal SSD as Linux-exclusive. A PS5 soft format is expected to leave the Linux data partition (and therefore the .img) intact, but a repair / hard format will erase it. Back up your image. Format the drive in the PS5 before creating the Linux partition.

Tools

Build them from the repo's tools/ directory (or copy the prebuilt scripts onto a running Linux):

Tool Purpose
m2_init Writes the hidden GPT (--device, --size-gb).
ps5-osinstall Creates the data partition and copies the .img onto it (--target m2, --img, --label).
ps5-osexec kexec into a Linux root partition/label (raw-partition installs).

Steps

  1. Boot Linux from the USB image (see Installation).

  2. Copy the tools to a writable path (e.g. /tmp), make them executable.

  3. Create the hidden GPT and partition:

    sudo ./m2_init --device /dev/nvme0n1 --size-gb 128
  4. Install the image as a file:

    sudo PATH=$PWD:$PATH ./ps5-osinstall --img /mnt/usb/ps5-arch.img \
         --target m2 --device /dev/nvme0n1 --size-gb 128 --label PS5M2 --yes

    ps5-osinstall writes a ps5-os-image marker recording the target, partition label, source image, root label and install time. If the partition already exists it skips m2_init and reuses it.

  5. Reboot and send the payload. On boot the initramfs:

    • scans the internal NVMe first, then USB, for a *.img;
    • loop-mounts the image;
    • hands off to systemd, which mounts the image's own root filesystem.

    Boot files (bzImage / initrd.img / cmdline.txt) still come from the USB root.

Verifying

From the booted system:

findmnt /            # should show the loop device / image root
lsblk                # nvme0n1p1 is the data partition holding the .img

Internal SSD vs M.2

On PS5 Phat and Slim models there are two NVMe options:

Option Device Notes
Internal SSD /dev/nvme0n1 Default — always present. Same tooling as M.2.
Aftermarket M.2 /dev/nvme1n1 Added via PCIe adapter. Only available on Slim and Pro.

The M.2 tooling works identically on both. Use --device /dev/nvme0n1 for the internal SSD (most common case) or --device /dev/nvme1n1 if you have an add-on M.2 module.

Check your devices with lsblk before running m2_init.

USB-free boot (no USB at all)

Once the OS is on the internal storage, the only thing still needing a USB was the boot files (bzImage, initrd.img, cmdline.txt, vram.txt). You can move those onto the internal storage too:

  1. Download ps5-<distro>-boot.tar.gz from the release (or extract them from an OS image's boot partition).
  2. Upload them to /mnt/ext1/ via the WebUI file manager or FTP (port 21).
  3. Upload your .img to /mnt/ext1/ the same way (or run ps5-osinstall).

The payload adds /mnt/ext1 to its search paths and tries to mount the internal storage automatically at startup, so the console boots with no USB attached.

See USB-less boot for details on the full USB-less workflow.

Clone this wiki locally