Mounting HDD on PC
Jump to navigation
Jump to search
Introduction
- The goal is to mount PS3 HDD on PC Linux and make changes to it.
- Use device mapper for transparent encryption/decryption.
Device Mapper
- A really cool feature of Linux 2.6/3.
- The device mapper is stackable.
dm-bswap16
- Swaps bytes in each 16-bit word.
- It is necessray for HDD/VFLASH encryption/decryption.
GIT repo: http://gitorious.ps3dev.net/ps3linux/dm-bswap16
Test
modprobe loop modprobe dm_mod insmod ./dm-bswap16.ko dd if=/dev/zero of=test.bin bs=1K count=100 losetup /dev/loop0 ./test.bin echo "0 200 bswap16 /dev/loop0" | sudo dmsetup create test echo "00 01 00 01 00 01" | xxd -r -p > /dev/mapper/test hexdump -C /dev/mapper/test 00000000 00 01 00 01 00 01 00 00 00 00 00 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00019000 hexdump -C /home/glevand/test.bin 00000000 01 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00019000