Hacking Help trying to fix a bad nand backup

Masterface7

New Member
OP
Newbie
Joined
Jan 30, 2008
Messages
4
Trophies
0
XP
107
Country
United States
This is kind of long because i am trying to explain everything i have done. I have backed up and restored my nand a few times in the past to go from playing with homebrew to clean switch for updates, with no problems. This time however i get the "size of the sd card backup does not match emmc selected part size" error so something must have gone wrong when i was trying to create the backup even though i dont remember getting any errors. I'm on on hekate 4.2 and i SD files 9.0.4. Switch firmware 6.0.

For starters I have restored the boot 0 and boot 1 i made at the same time as the rawnand.bin, both the boot 0 and boot 1 are 4,194,304 bytes and after flashing them the switch still works perfectly fine. Next up my rawnand.bin is 28,116,647,936 byte, which i think is too small. I made a backup of my current nand, which i will refer to as my dirty nand since it is filled with homebrew and a few nsps, and it is 31,268,536,320 bytes.

So far i have my biskeydump file. I was able to open the nand using HacDiskMount. The original nand, which i will refer to as clean nand, opened and i got this from the log

[15:09:10:964248] [info] Trying to read partition table from C:/../rawnand.bin
[15:09:11:096136] [info] Loaded primary GPT, checking secondary from offset 31268535808
[15:09:11:099593] warning] Not enough bytes reading secondary GPT header from offset 31268535808
[15:09:11:100190] [info] Using primary GPT as backup is bad

I mounted my user data and it mounted to my computer fine. When i tried to dump the user partition it errored though. I dumped all the other partitions from the clean nand fine and their sizes all line up with my working nand and what switchbrew says.

Should i replace my user partition on the too small nand with the user partition from my dirty nand that is the correct size? Also I'm not sure how running homebrew and installing nsps leaves traces so would using the user partition from my hacked nand be a fruitless endeavor anyway or is most of the traces left on the system partition. I plan to either delete everything on the user partition using hacdisckmount or format the user partition in windows since it is fat32, before i restore from file. Lastly is there some kind of stock switch image that i could pull partitions from instead of my dirty nand? I guess lastly since it is a fat32 partition could i just make a fresh one so it couldnt have any traces of running cfw stuff.

edit:
So i did try putting the user partition from the dirty nand into the clean nand. When i opened the combined nand with hacdiskmount i still get the same warning as above. The new file is 30,727,471,104 bytes. The problem is all the partitions are the correct size according to switchbrew and comparing them to my dirty nand, which doesn't error. So i am not sure where the remaining size is being lost.

I guess other thing i could do is restore my clean system partition to my dirty nand (and of course deleting everything off the user partition too.) I have just about no idea about how that affects the telemetry nintendo would get.

Anyway I would love any help or thoughts people might have to help me get out of my predicament, please and thank you.
 
Last edited by Masterface7,

Crusatyr

Well-Known Member
Member
Joined
Jul 31, 2016
Messages
197
Trophies
0
XP
901
Country
United States
I don't know if you'd have to replace the user partition on the dirty one, could you use a hex editor and copy/paste the data from your current nand to the one that's short?
 

Masterface7

New Member
OP
Newbie
Joined
Jan 30, 2008
Messages
4
Trophies
0
XP
107
Country
United States
thanks for the idea, i am not super familiar with hex editing stuff i did just look at them both in a hex editor and they ended on the same offset. I feel the risk of my making a brick is a little to high if i start copying data over where they differ.
I think i am going to go with starting with my dirty nand, restoring every partition from the clean nand except the user then formatting the dirty user in windows. I flashed that to my switch and it works and the 1 problematic error is gone. No reason to go online yet though since 6.2 is still a roadblock. Last thing i'll probably do before i flash it one more time is go in and manually delete all the saves on the system except [8]000000000000[120] because i that somewhere on gbatemp in a process of trying to manually initializing. I am not sure what they all are since i did ues checkpoint to delete my saves earlier too.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://www.youtube.com/watch?v=COua5q4CByg