3

I have read that the XBox One formats external hard drives in NTFS format. My understanding from reading pages such as this one is that NTFS support should work "out of the box". However, when I plug the drive into my Linux machine, nothing gets mounted. In dmesg I see that the device was recognized, but fdisk claims there is no partition table. I have read about a Windows utility that is needed (on Windows, at least) to modify the MBR of the drive to switch it between "XBox Mode" and "PC Mode" so my suspicion is that a similar thing needs to be done in Linux - but I can't find any documentation on exactly what it is doing. Alternately, maybe NTFS simply isn't working out of the box - I don't see ntfs under /proc/filesystems, for instance, and a naive attempt to "modprobe ntfs-3g" failed to find anything.

I'm running (L)Ubuntu 18.04.3 LTS.

Michael
  • 1,195

1 Answers1

6

I just looked at the bytes on the drive and it seems like Microsoft has deliberately erased the MBR on the drive to make our lives harder.


Option 1 (preferred): Sharing the drive between Linux and Xbox

If you don't want to modify the MBR, you can access the partition directly instead. This requires some trickery!

First make sure you do a full shutdown of the Xbox first or it will show up as an unclean filesystem. That means shutting down from the menu, not just tapping the power button.

Find the byte offset of the NTFS partition within the drive. Edit the drive= code below with your drive disk name. You can find your disk name by running sudo fdisk -lu

drive=/dev/???
offset=`sudo head -c 4k $drive | grep -aobuP '\x00\x00\x00NTFS' | sed 's/\:.*//'`
echo "offset=$offset"

Now, assuming you have a mount folder like /mnt/xbox, you can mount the partition directly like so:

sudo mkdir -p /mnt/xbox
sudo mount $drive -o offset=$offset /mnt/xbox

or get fancy with better options for NTFS performance:

sudo mount $drive -t ntfs -o offset=$offset,windows_names,big_writes,streams_interface=windows,inherit /mnt/xbox

Option 2 (risky): Fix the MBR to make the drive readable by Linux.

Before we begin, backup the MBR so it can restored:

dd if=your.drive.here bs=512 count=1 of=xbox.mbr.backup.bin

Then install lilo to fix the MBR

sudo apt install lilo
lilo -M your.drive.here mbr

Warning: The drive will remain unreadable by the Xbox until you restore the MBR back to its previous state. (Use dd to copy the backup file onto the drive)

As far as I can tell, this is the same thing that the Windows Equivalent app of this is doing (modifying the MBR) and it seems to work for them, but YMMV.