To move your Minecraft installation to another partition without reinstalling, follow these detailed steps. This process preserves your worlds, settings, and mods while freeing up space on your primary partition.
Prerequisites
- Target Partition: Ensure the destination partition (e.g.,
/mnt/games) has sufficient space and is formatted (e.g., ext4, NTFS).
- Mount Point: The target partition should be mounted. If not, mount it temporarily:
sudo mkdir -p /mnt/games # Create mount directory if needed
sudo mount /dev/sdXn /mnt/games # Replace sdXn with your partition identifier (e.g., sdb1)
- Minecraft Directory: Confirm the default location is
~/.minecraft (visible with ls -a ~).
Step-by-Step Instructions
1. Copy Minecraft Data to the New Partition
Use rsync to preserve permissions and ownership:
rsync -avh --progress ~/.minecraft/ /mnt/games/minecraft/
-avh: Archive mode, verbose, human-readable.
--progress: Show transfer progress.
Alternative: Use cp if rsync is unavailable:
cp -rp ~/.minecraft /mnt/games/minecraft # -rp = recursive + preserve attributes
2. Backup and Replace the Original Directory
mv ~/.minecraft ~/.minecraft.old # Rename original as backup
ln -s /mnt/games/minecraft ~/.minecraft # Create symbolic link
- The symlink (
~/.minecraft → /mnt/games/minecraft) redirects the launcher to the new location.
3. Ensure Correct Ownership
Fix permissions if Minecraft complains about file access:
sudo chown -R $USER:$USER /mnt/games/minecraft # Set ownership to your user
4. Configure Automatic Mounting (Crucial!)
Prevent the symlink from breaking on reboot by adding the partition to /etc/fstab:
sudo nano /etc/fstab
Add a line like this (adjust to your partition):
UUID=1234-ABCD /mnt/games exfat defaults,uid=1000,gid=1000 0 0
- Find your partition's UUID: Use
sudo blkid.
- Set
uid/gid: Replace 1000 with your user ID (check with id -u and id -g).
- Filesystem: Replace
exfat with your partition's FS (e.g., ext4, ntfs-3g).
Test the fstab entry:
sudo umount /mnt/games
sudo mount -a # Should remount without errors
5. Verify the Symlink
ls -l ~/.minecraft # Should show: ".minecraft -> /mnt/games/minecraft"
6. Test Minecraft
Launch the Minecraft Launcher. Your profiles, worlds, and settings should load normally. If issues arise:
- Check symlink:
ls -l ~/.minecraft.
- Verify partition mount:
mount | grep /mnt/games.
- Inspect directory ownership:
ls -ld /mnt/games/minecraft.
7. Cleanup (After Verification)
Delete the backup if everything works:
rm -rf ~/.minecraft.old
Key Notes
- Launcher-Specific Paths: Some third-party launchers (e.g., MultiMC) let you set custom paths. Adjust their settings instead of using symlinks.
- Flatpak Launchers: If using a Flatpak Minecraft Launcher, symlinks might fail. Move the entire
~/.var/app/com.mojang.Minecraft directory instead.
- NTFS Partitions: Use
ntfs-3g and add umask=000 in /etc/fstab to ensure full read/write access.
- Disk Space: Confirm space with
df -h /mnt/games.
By following this guide, you retain all Minecraft data while seamlessly relocating it to a larger partition. The symlink ensures compatibility with the default launcher, and /etc/fstab automounts the partition on boot.