[ISSUE]: Mkpart marks partition name as invalid parameter if provided size was larger than 512
israpps opened this issue · 5 comments
Checks
- I have checked existing issues for duplicates and found none
Describe the issue
Examples:
ok
mkpart PP.OPL 128
ok
mkpart PP.OPL 256
ok
mkpart PP.OPL 512
fails
mkpart PP.OPL 1024
Console model
SCPH-39001 + SCPH-10281 (anyway, this is useless, since since problem happens on PC
@israpps could you confirm that this bug also persists in the beta version?
@israpps could you confirm that this bug also persists in the beta version?
pfsshell for POSIX systems
https://github.com/ps2homebrew/pfsshell
This program uses pfs, apa, iomanX,
code from ps2sdk (https://github.com/ps2dev/ps2sdk)
Type "help" for a list of commands.
> device \\.\PHYSICALDRIVE1
hdd: PS2 APA Driver v2.5 (c) 2003 Vector
hdd: max open = 1, 3 buffers
hdd: 09:55:22 11/20/2021
hdd: disk0: 0x039ce27c sectors, max 0x00200000
hdd: checking log...
hdd: drive status 0, format version 00000002
hdd: version 0000 driver start.
pfs Playstation Filesystem Driver v2.2
ps2fs: (c) 2003 Sjeep, Vector and Florin Sasu
pfs Max mount: 1, Max open: 1, Number of buffers: 10
pfs version 0000 driver start.
# ls
__mbr
PP.SLUS-20827..MANHUNT*
PP.SLPM-66675..KINGDOM_HEARTS_I*
PP.SLUS-20875..PREDATOR___CONCR*
PP.SLES-55204..CRASH___MIND_OVE*
PP.SLES-55579..BAKUGAN_BATTLE_B*
PP.SLUS-20147..ALIENS_VS_PREDAT*
# mkpart PP.OPL 1024
iomanx_open -2
1024: invalid partition size.
(!) Exit code is -1.
#
just realized that you use wrong syntax:
just type help
in pfsshell:
# help
~Command List~
lcd [path] - print/change the local working directory
device <device> - use this PS2 HDD;
initialize - blank and create APA/PFS on a new PS2 HDD (destructive);
mkpart <part_name> <size> - create a new PFS formatted partition;
Size must end with M or G literal (like 384M or 3G);
Evidence:
fsutil file createnew test.img 10737418240
File D:\temp\test\test.img is created
.\pfsshell.exe
pfsshell for POSIX systems
https://github.com/ps2homebrew/pfsshell
This program uses pfs, apa, iomanX,
code from ps2sdk (https://github.com/ps2dev/ps2sdk)
Type "help" for a list of commands.
> device test.img
hdd: PS2 APA Driver v2.5 (c) 2003 Vector
hdd: max open = 1, 3 buffers
hdd: 01:00:06 02/11/2022
hdd: disk0: 0x013fffff sectors, max 0x00200000
hdd: checking log...
hdd: drive status 1, format version 00000000
hdd: version 0000 driver start.
pfs Playstation Filesystem Driver v2.2
ps2fs: (c) 2003 Sjeep, Vector and Florin Sasu
pfs Max mount: 1, Max open: 1, Number of buffers: 10
pfs version 0000 driver start.
# initialize yes
pfs: Format: log.number = 8224, log.count = 16
pfs: Format sub: sub = 0, sector start = 8208, sector end = 8211
pfs: Format: log.number = 8224, log.count = 16
pfs: Format sub: sub = 0, sector start = 8208, sector end = 8215
pfs: Format: log.number = 8224, log.count = 16
pfs: Format sub: sub = 0, sector start = 8208, sector end = 8223
pfs: Format: log.number = 8240, log.count = 16
pfs: Format sub: sub = 0, sector start = 8208, sector end = 8239
#
# ls -l
0x0001 128MB 2022-02-11 01:02 __mbr
0x0100 128MB 2022-02-11 01:02 __net/
0x0100 256MB 2022-02-11 01:02 __system/
0x0100 512MB 2022-02-11 01:02 __sysconf/
0x0100 1024MB 2022-02-11 01:02 __common/
# mkpart PP.OPL 1024M
Main partition of 1G created.
pfs: Format: log.number = 8240, log.count = 16
pfs: Format sub: sub = 0, sector start = 8208, sector end = 8239
# mkpart PP.TEST 2G
Main partition of 1G created.
Sub partition of 1G created.
pfs: Format: log.number = 8240, log.count = 16
pfs: Format sub: sub = 0, sector start = 8208, sector end = 8239
pfs: Format sub: sub = 1, sector start = 16, sector end = 47
# ls -l
0x0001 128MB 2022-02-11 01:02 __mbr
0x0100 128MB 2022-02-11 01:02 __net/
0x0100 256MB 2022-02-11 01:02 __system/
0x0100 512MB 2022-02-11 01:02 __sysconf/
0x0100 1024MB 2022-02-11 01:02 __common/
0x0100 1024MB 2022-02-11 01:03 PP.OPL/
0x0100 1024MB 2022-02-11 01:04 PP.TEST/
0x0100 1024MB 2022-02-11 01:04 PP.TEST@
Hi, I need to create a POPSTARTER partition named __.POPS on an internal HDD which for whatever reason I can't seem to do from the PS2 itself. I could do a quick test to see if this works. If I understand correctly, I would do it like this?
mkpart __.POPS 20G PFS
to create a 20 GB partition of the PFS filesystem named __.POPS , is that correct? Do I even need the PFS at the end though?
Now, where will it get the space from for this? Will it resize the other partitions that have available space to make room? And what happens if I later on decide I want a larger partition? Is there a "resizepart" command? and is there a command to copy a partition from one drive to another if I want to back things up before trying?