Talk:Ps3sed

From PS3 Developer wiki
Jump to navigation Jump to search

Need to resize GameOS region to make place for OtherOS, mine is NAND (CECHC04) actually on 4.46 Rebug, stock 60Gb HDD

Rebug Toolbox:
1. Resize VFlash to store petitboot
2. Write petitboot.bin into Vflash5
3. Boot OtherOS with all LV1 patches

Petitboot:
blackbox# telnet 10.0.1.2

#Since I've an old one I can kexec from here another one with more stuff compiled in, from usb:
root@ps3-linux:/# kexec -l /tmp/petitboot/mnt/sdd1/openwrt-ps3-petitboot-vmlinux.elf
Warning: append= option is not passed. Using the first kernel root partition
Modified cmdline:
Unable to find /proc/device-tree//chosen/linux,stdout-path, printing from purgatory is diabled
segment[0].mem:0x78f000 memsz:7962624
segment[1].mem:0xf27000 memsz:36864
segment[2].mem:0x7fff000 memsz:4096

root@ps3-linux:/# kexec -e && exit
Connection closed by foreign host.

#Reconnect:
blackbox# telnet 10.0.1.2

Dumped actual disc region info:
root@ps3-linux:/# ps3sed print_region 3
#region.id, start_block, nr_blocks, nr_acl_entries
   0                0        117210240    1		#ps3da
   1               32        113015904    8		#ps3db
   2        113015936          4194296    8		#ps3dc

root@ps3-linux:/# ps3sed print_acl_entry 3 0		#ps3da
1070000001000001                   rw

root@ps3-linux:/# ps3sed print_acl_entry 3 1		#ps3db
1070000001000001                   rw
1070000002000001                   rw
1020000003000001                   rw
               0                 none
               0                 none
               0                 none
               0                 none
               0                 none

root@ps3-linux:/# ps3sed print_acl_entry 3 2		#ps3dc
1070000001000001                   rw
1070000002000001                   rw
               0                 none
               0                 none
               0                 none
               0                 none
               0                 none
               0                 none

Now, what I've trying to do is to recreate the disc region layout of my old working 3.55 OtherOS made with whatever_half_hdd.PUP (via a patched emer_init), dumped from 3.55:

root@ps3-linux:/# /tmp/petitboot/mnt/sdd1/create_hdd_region.sh
number of storage devices 4
searching for disk storage device ...
found disk storage device
device index 3
device id 0x0000000000000003
number of regions 3
total number of blocks 117210240
last region start sector 56507984
last region sector count 4194296
number of free sectors 56507952
creating new storage region (60702288, 56507944) ...
new storage region id 0x0000000000000003

here after a reboot comes /dev/ps3dd

Here what I've done, it NOT worked, GameOS reformat HDD on ps3-boot-gameos (of course, I've touched ps3db!) I've used as info the old size, but I've mistaken about ACLs

ps3sed delete_region 3 2		#remove ps3dc
ps3sed delete_region 3 1		#remove ps3db

ps3sed create_region 3 32 56507952 0x1070000001000001
1		#ps3db resized
ps3sed create_region 3 56507984 4194296 0x1070000002000001
2		#again, same ps3dc

ps3sed print_region 3
#region.id, start_block, nr_blocks, nr_acl_entries
   0                0        117210240    1
   1               32         56507952    1
   2         56507984          4194296    1

After a petitboot reboot seems that HV fixes its HDD regions ACLs table, but however it won't work: GameOS reformats again all. Glevand told us at Gitbrew that ps3sed method was not safe under linux, later on he got region hacking fine under FreeBSD. I've tested ps3sed on linux, no go. But I've find a new way to resize GameOS!
Using my horrid hack to limit GameOS region works!
Then, all I've to do is kexec my petitboot and use again create_hdd_region script.
After a reboot comes linux region, so no more need to go lower 4.xx!