Hacking Question Difficulty shrinking NAND size with compression

cleeezzz

Member
OP
Newcomer
Joined
Dec 9, 2018
Messages
10
Trophies
0
Age
32
XP
220
Country
United States
I backed up my switch on 4.1.0 many months ago and it compressed to about 10GB. I was attempting to shrink it by using HacDiscMount (following a similar route to Raj's updating without burning fuses guide) to delete my user content and system. I realized that I had to wipe each partition as well since the data does not get zero'd out (leading to good compression). I have tried using windows format (slow, not quick format) and used HxD to examine the USER and SYSTEM partition, they both seem fully zero'd out except the headers that windows adds for formatting. Doing a compression at this point was even worse than before, I could not finish the actual compression since I ran out of hard drive space but it was way larger than expected since it should be fully wiped, (expecting 500mb from other reports). When I examine the whole rawnand.bin with HxD, it is filled with data and only a small portion of it is zero'd out which is odd since USER is the biggest partition and it was confirmed to be zero when it was mounted. What am I doing wrong?
 
Last edited by cleeezzz,

aut0mat3d

Well-Known Member
Member
Joined
Mar 15, 2017
Messages
212
Trophies
0
XP
568
Country
Australia
Nothing.
Content on NAND is encrypted, and when Horizon OS writes Files they will take Space.
Deleting Files will let the encrypted Sectors stay on the Filesystem marked as free, but encrypted nowadays which let
your compressed Backup grow...
 

shchmue

Developer
Developer
Joined
Dec 23, 2013
Messages
791
Trophies
1
XP
2,367
Country
United States
I backed up my switch on 4.1.0 many months ago and it compressed to about 10GB. I was attempting to shrink it by using HacDiscMount (following a similar route to Raj's updating without burning fuses guide) to delete my user content and system. I realized that I had to wipe each partition as well since the data does not get zero'd out (leading to good compression). I have tried using windows format (slow, not quick format) and used HxD to examine the USER and SYSTEM partition, they both seem fully zero'd out except the headers that windows adds for formatting. Doing a compression at this point was even worse than before, I could not finish the actual compression since I ran out of hard drive space but it was way larger than expected since it should be fully wiped, (expecting 500mb from other reports). When I examine the whole rawnand.bin with HxD, it is filled with data and only a small portion of it is zero'd out which is odd since USER is the biggest partition and it was confirmed to be zero when it was mounted. What am I doing wrong?
you're writing zeroes unencrypted. only a small portion was zeroes because only small nand areas are unencrypted.
 
  • Like
Reactions: aut0mat3d

cleeezzz

Member
OP
Newcomer
Joined
Dec 9, 2018
Messages
10
Trophies
0
Age
32
XP
220
Country
United States
Yeah, I found this comment on Reddit. My backup compressed to 310mb now, I will test if the backup boots tomorrow.

Step 0: THIS COULD CORRUPT YOUR BACKUP IF SOMETHING GOES WRONG, MAKE SURE YOU HAVE AT LEAST PRODINFO, BOOT0 AND YOUR GAME SAVES. I am not an expert, so your run this guide at YOUR OWN RISK!
Step 1: Dump all your BIS keys with biskeydump and save them somewhere safe. You will need them.
Step 2: Open your nand backup in hacdiskmount.
Step 3: Double-click on the user partition and input your bis keys, test and save them.
Step 4: Mount the User partition after you input the keys. Copy all the files inside to a folder.
Step 5: Copy everything into a folder. It should not take too much space, as all games should be deleted.
Step 6: Unmount the disk and remove your bis keys.
Step 7: Mount the disk without the BIS keys, do a full format or diskpart clean all
Step 8: Put the BIS keys back, DO NOT CLICK TEST, and mount it again and do QUICK FORMAT, fat32 16k allocation size, and put your files back. Unmount.
Step 9: Zip the backup and it should compress much better.
 
Last edited by cleeezzz,

cleeezzz

Member
OP
Newcomer
Joined
Dec 9, 2018
Messages
10
Trophies
0
Age
32
XP
220
Country
United States
For anyone who finds this thread later, I have confirmed that the backup boots, it gets stuck on black screen after Nintendo logo but I remembered that you MUST boot initially with the specifically modified hekate_ipl found in raj's updating firmware without burning fuses guide.
 

LegendOfAB

Member
Newcomer
Joined
Mar 14, 2014
Messages
11
Trophies
0
Age
25
XP
176
Country
United States
it gets stuck on black screen after Nintendo logo but I remembered that you MUST boot initially with the specifically modified hekate_ipl found in raj's updating firmware without burning fuses guide.

Does anyone know why this is and if it is still required?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    AncientBoi @ AncientBoi: :shy::blush::D +1