Hacking changing the partition order in a faster way

PsyBlade

Snake Charmer
OP
Member
Joined
Jul 30, 2009
Messages
2,204
Trophies
0
Location
Sol III
XP
458
Country
Gambia, The
some wii tools can only access the first partition on a drive
this is a problem if your partitions already are in a different order
or if you want to create an aditional partition to be first
most tools to shrink partition leave the free space after the original one too
copying all the data to change the order is possible but takes a lot of time

I would like to try a faster way

there are actually two orders to the partitions
the order in which thier content is stored in on the drive (physical)
and the order in which the pointers to this content are stored (logical)
the canonical way is to have both match

eg:
primary partition 1: 0GB - 900GB
primary partition 2: 900GB - 1000GB
primary partition 3: unused
primary partition 4: unused

the problem with this is that changing the physical order means reading 1TB and writing 1TB
using usb that takes a while
but changing the logical order is done in only 512 Bytes (!)

the idea is to stray from the canonical way and only change the logical order and leave the physical as it is
in most cases this should work and have the order appear different
only partitioning tools might get confused (really bad ones) or feel obliged to "fix" this (but good ones should ask)

eg:
primary partition 1: 900GB - 1000GB
primary partition 2: 0GB - 900GB
primary partition 3: unused
primary partition 4: unused

I would like some knowledgeable people to try this aproach and discuss their findings

I wrote a little tool to demonstrate this
if you can't make heads or tails of what to do with this keep away for now
the code appears to work but curently has almost no saveguards, is really ugly and was only barely tested
IF it works reasonably well I will apply more polish

http://www.unix-ag.uni-kl.de/~t_schmid/partorder/
 

tueidj

I R Expert
Member
Joined
Jan 8, 2009
Messages
2,569
Trophies
0
Website
Visit site
XP
999
Country
There's no reason why it shouldn't work, I've hex-edited the MBR to do something similar (inserted a FAT partition entry before a GPT to use it with a non-GPT capable device).
 

PsyBlade

Snake Charmer
OP
Member
Joined
Jul 30, 2009
Messages
2,204
Trophies
0
Location
Sol III
XP
458
Country
Gambia, The
I know that in general it works. I had partitions it the wrong order in the past (by accident).
I only "tested" it on linux, worked so flawlessly I only noticed it when fdisk suggested I fix it.
But there might be any number of programs, operating systems and standalone devices that do not like it.
 

PsyBlade

Snake Charmer
OP
Member
Joined
Jul 30, 2009
Messages
2,204
Trophies
0
Location
Sol III
XP
458
Country
Gambia, The
at this time I only (barely) tested on linux
but if you know how to do the respective steps in windows it should work there too

with python 2 installed
save it as a executable .py file
unmount all partitions on the device
run it with the device as sole argument
use "sync"
reread the partition table (eg reinsert the device)

if there is interest from more people I will probably continue working on it
 

PsyBlade

Snake Charmer
OP
Member
Joined
Jul 30, 2009
Messages
2,204
Trophies
0
Location
Sol III
XP
458
Country
Gambia, The
since I was already at some other just for fun coding give me a few hours and I see if I can get something together that someone without experience can run on windows
but don't expect to much besides being guineapigs
atm this is more to find out if it can work
 

AACThaKid

Dark Wolf is watching
Member
Joined
Jul 2, 2012
Messages
133
Trophies
1
Age
33
Location
Manchester, Ohio
Website
soundclick.com
XP
399
Country
United States
since I was already at some other just for fun coding give me a few hours and I see if I can get something together that someone without experience can run on windows
but don't expect to much besides being guineapigs
atm this is more to find out if it can work
can't wait..... i just wanna play GC games on USB, i got 8gb sdcard so i can't play much GC games, and i do NOT have the money to even go to ebay and get a bigger SD lmao

like i said i just dont know how to add it, run it or where to put the code, so please keep me in the loop lol... i run on Windows Vista 32-bit
 

PsyBlade

Snake Charmer
OP
Member
Joined
Jul 30, 2009
Messages
2,204
Trophies
0
Location
Sol III
XP
458
Country
Gambia, The
I compiled a windows version of 0.0.2
get it at http://www.unix-ag.uni-kl.de/~t_schmid/partorder/

for now its a bit complicated to use

start a windows command prompt (eg win-r:cmd)
it probably needs admin rights
change to the dir where you extracted it to(with "cd whereever")
make sure nothing else accesses the drive

run "partorder \\.\PHYSICALDRIVEn"
where n is the drive number
you should find it in where you can create partitions in windows
or by trial and error (unless you use "s" to save it writes absolutely nothing to the drive)

size is in sectors so you need to multiply by 512B or 4KiB to get the partition size (depends on drive)
type 0x07 is ntfs or exfat
type 0x0b or 0x0c should be fat16 or fat32

after you saved wait a bit then disconnect it

a backup is created in the dir, don't delete it by accident (restore will be implemented as needed)


edit:
please remember to report your experiences
I need to know what works and what not
no feedback means no development
 
  • Like
Reactions: 1 person

MassiveRican

GBATemp's Unofficial Vigilante
Member
Joined
Aug 2, 2011
Messages
2,454
Trophies
1
Location
Creeping in the Shadows
XP
1,190
Country
This sounds good and useful, unfortunately I don't have a drive I can sacrifice if anything goes wrong lol. I'll see if I can get a hold of a spare drive and test it out! I'll talk to my bud tonight and post my findings here.
 

bleucheese7

New Member
Newbie
Joined
Jul 16, 2009
Messages
3
Trophies
0
XP
68
Country
United States
Hi, i was following this guide, http://gbatemp.net/topic/329628-how-to-play-gamecube-games-off-a-usb-hdd/, and ran into the black screen problem since i had 3 partitions on my hard drive. I was able to fix my problem by changing which partition is primary and which partitions are logical. I was able to use EaseUS to convert my Gamecube game partition to primary and my other two partitions, including my Wii game partition, to logical. I've tested it once, but both gamecube and wii games seem to be working. Hope this helps.
 
  • Like
Reactions: 1 person

reprep

Well-Known Member
Member
Joined
Jul 5, 2012
Messages
939
Trophies
1
Website
melankolisavar.blogspot.com
XP
1,037
Country
Just tried this program but unfortunately i am unsuccessful. My hdd has 2 partitions.1st is NTFS and 2nd is FAT and there is some unallocated space too. The program shows the partitions in the correct order (and shows 2 more partitions with 0 bytes), i switched the FAT and NTFS one, as FAT32 will be the first one. But gamecube games still didn't work on wii.

I also tried bleucheese7's method, and it did exactly the same this program does. Meaning it made my FAT partition show as the first one (i confirmed this by running this partition order changer program again.) Again it didn't work.

I assume my hdd has something to do with it. It is a 1.5 tb 3.5 inch Seagate which i don't remember the exact model though it is an old one.
EDIT: Ooops, sorry. I forgot to force interlace on usbloader gx. That is why both 2 games i tried blackscreened on me. After turning this option on, it works wonders.I can confirm both methods work equally same and does the same thing ultimately. Change the order of first 2 partitions.It is easier to use bleucheese7's method. The logical partitions are placed on 5th and later partion numbers. So this makes my NTSC partition come later than my FAT partiton (flagged as primary and active partition) and solve our problem.
 

nashismo

Well-Known Member
Member
Joined
Jun 5, 2013
Messages
520
Trophies
1
Age
43
Location
Home sweet Home (Mi casita)
XP
1,269
Country
Chile
I will also confirm that using EaseUS, I have managed to swap partition order. My Wii partition was NTFS and was the first and was named H:. My second partition was I: and FAT32. Both were primary according to EaseUS.
What I did first was changing the drive letter using EaseUS, now my NTFS partition was I: and my fat was H:. Then I changed, also using EaseUS, the NTFS partition to logical.

Now everything is working great! Cheers.
 

PirateHD

Member
Newcomer
Joined
May 30, 2013
Messages
18
Trophies
0
Age
37
XP
122
Country
United States
I have a WD 1.5 TB drive with 3 Partitions, NTFS, FAT32 & WBFS in that order. Found USB Loader GX was not playing the GameCube games from my FAT32 partition, it was detecting it as USB2. I used EaseUS to convert the first NTFS Partition to Logical, now the Wii is detecting the FAT32 drive as USB1 and am able to play GC games. Thanks.

EDIT: Not sure if its related or not...but after I disconnected my external drive and rebooted the PC I got error "BootMGR Missing" & couldn't boot into Windows, couldn't repair it with the windows repair disk so I had to reinstall my OS.
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,649
Country
France
What I did first was changing the drive letter using EaseUS, now my NTFS partition was I: and my fat was H:.
Drive letters are only used inside Windows OS as naming convention for microsoft's program. it doesn't affect other operating system or the Wii, and it doesn't change the physical partition order on the drive.
Then I changed, also using EaseUS, the NTFS partition to logical.
DIOS MIOS (Lite) is loading the first primary partition of the drive, so making the first partition an extended one, the second partition became the first Primary partition on your drive.

I thought USBLoaderGX would still detect the FAT32 as USB2. I'm curious about this.
Maybe the primary to extended conversion swapped the order the partitions are defined in the table?
 

PsyBlade

Snake Charmer
OP
Member
Joined
Jul 30, 2009
Messages
2,204
Trophies
0
Location
Sol III
XP
458
Country
Gambia, The
Maybe the primary to extended conversion swapped the order the partitions are defined in the table?
Very likely that this was done. E.g. old windows versions assumed that order and would not work otherwise.
No one knows what else adopted that behaviour.

Best practice is to have the 4 entries in the order:
1. 1-4 primaries
2. 0-1 extended
3. 0-3 unused

Anything else is rather hit and miss.

(Got a config once that, while working perfectly normal otherwise, would cause windows disk management to display 4 primaries followed by one extended.
Which is of course not possible.)
 
  • Like
Reactions: Cyan

MacGuffin3

Member
Newcomer
Joined
Jul 15, 2013
Messages
21
Trophies
0
Age
50
XP
52
Country
United States
My first partition is WBFS and Easus and Windows see it as 'unformatted' there is no option to change it to logical. Looks like I'm out of luck unless I buy a new HDD and partition it in the reverse order and then copy everything over.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    BakerMan @ BakerMan: morning fellas, it's my birthday