Tutorial: RedNAND - How to have 64K Allocation Units (Sector Size) with RedNAND on Windows

Discussion in '3DS - Tutorials' started by driverdis, Apr 8, 2016.

  1. driverdis
    OP

    driverdis I am Justice

    Member
    2,286
    840
    Sep 21, 2011
    United States
    1.048596β
    EDIT: Guide is depreciated : Later releases of EmuNAND9 support 64K formatting of SD cards 16GB and larger.
    Feel free to use this guide for 64K on SD cards smaller than 16GB if you want, although getting a larger SD card is the better solution.
    NOTE: windows 7 will still show the size on disk as 32K, thanks @d0k3 for pointing this out

    For this guide, I am going to have you Hex Edit the SD Card for 64K Allocation Units (Sector Size)

    If you have Windows, this is necessary as RedNAND uses some MBR "tricks" to get the SD Card to show up with RedNAND being on the first partition.
    when you format the partition EmuNAND9 created, it breaks the ability to copy files to the SD Card and will show up as unformatted. When you format, you have a little over a gigabyte available as you just formatted your RedNAND partition. (DO NOT EVER DO THIS, the guide makes sure you do not do this)

    This guide will get Windows to be able to read your SD Card again and have 64k Allocation Units (Sector Size) while keeping a working RedNAND.


    If you use Linux or a Mac, you do not need follow this guide unless you are going to use a Windows computer at any time to access your files.
    -------------------------------------------
    What you need
    1. a Windows computer (XP or Higher)
    2. HxD Hex Editor https://mh-nexus.de/en/downloads.php
    3. An SD Card with A RedNAND created with EmuNAND9
    4. EaseUs Partition Manager http://www.partition-tool.com/personal.htm
    ------------------------------------------

    Right now, Your SD Card has a RedNAND on it alongside a working FAT32 Partition where you can put your files.

    First, Make sure to download and install HxD Hex Editor and EaseUS Partiton Manager. feel free to uninstall these when you are done with the guide if you want.

    Once they are installed, you will want to open HxD. (right click on the icon and Run As Administrator (if on Windows Vista,7,8,8.1,or 10) [Needed to directly access the SD Card]

    Once HxD is open, go to the Extras bar and click "Open disk..."
    Click on the disk your SD Card is at under Physcial disks and uncheck Readonly
    The physical disks listing is in the same order as the logical disks if you need help finding the the SD Card.
    DiskSelect.jpg
    Now press OK
    You will now see your SD Card, a good way to tell is that the first part says "GATEWAYNAND", if not, you selected the wrong disk.
    First, copy all data until you see NCSD (should be length: 300 according the the bottom bar)
    Copythis.jpg Press CTRL+C to copy this info
    Now press CTRL+N to create a New File (you will switch to the blank file after pressing this)
    Now press CTRL+V to paste. Press yes to the file size change popup
    you should notice all the data is red, this is because the info was pasted but not saved
    Now press CTRL+S to save the file. save this where you want and name it whatever you want.
    The data will turn black now.

    go back to the Removable Disk tab and press CTRL+F4 to close it. only the new tab with the pasted data will remain.
    ----------------------------
    Open EaseUS Partition Manager now
    right click in on the SD Card partition now and click format partition
    FormatPart.jpg

    Make sure the Cluster Size is set to 64KB. Press OK to format.
    FormatPart2.jpg
    this is then added to a queue to process. Press the apply checkmark at the upper left to apply the changes.

    Once this is done, close EaseUS Partition Manager.
    If you get any prompts from Windows to format afterward, DO NOT FORMAT

    Go back to HxD and Open the SD Card again as you did earlier and select the same physical disk as before
    NOTE: IF the drive does not show up, close HxD and open it again. to reopen the tab we had open before, click file and go to recent files, it will be there.

    go the the tab we left open earlier and press Press CTRL+A to select all the data, now press CTRL+C to copy the data

    it should look like this right now
    Copythis2.jpg

    Now go back to the Removable Disk Tab and click the blank space before 47 at the top, it should be flashing before the 4 in 47

    Press CTRL+V to paste Data, the window should look like this now
    Pastethis.jpg

    Now press CTRL+S to save, you will get this warning, press "Yes" anyway
    warning.jpg

    Afterward, you will notice that you can access your SD Card again. to confirm that you are 64k, create a blank text file and save one letter in it (I chose "a"). right click on the text file and click properties, it should look like this.
    Yes-it-worked.jpg

    Size on disk is now 64.0KB, this confirms you are now 64K!

    You are done now, congratulations
    [​IMG]
     
    Last edited by driverdis, Apr 20, 2016


  2. democracy

    democracy GBAtemp Advanced Fan

    Member
    778
    256
    Jul 3, 2009
    United States
    Worked like a charm! Thanks! I was using a different partition manager before that was cause of the issue I was having.

    I'm still going to continue on without an emunand though for the time being but this is good intel :)

    Cheers!
     
    Last edited by democracy, Apr 8, 2016
  3. leonmagnus99

    leonmagnus99 GBAtemp Addict

    Member
    2,252
    543
    Apr 2, 2013
    Seinegald
    good thread , will bookmark it just in case i switch back to using emuNAND. (currently using updated sysNAND)

    btw. what is the difference between 32 vs 64 kb allocation size? i believe all my mSD's are formatted with 32kb.
     
  4. driverdis
    OP

    driverdis I am Justice

    Member
    2,286
    840
    Sep 21, 2011
    United States
    1.048596β
    the main difference is that the 3DS boots slightly faster and stuff launches slightly faster than 32kb and under formatted SD/MicroSD cards.

    since you are on SysNAND only, you can copy all your data off your SD card, format it for 64KB, then copy all the data back.
     
    leonmagnus99 likes this.
  5. leonmagnus99

    leonmagnus99 GBAtemp Addict

    Member
    2,252
    543
    Apr 2, 2013
    Seinegald
    is it like really worth it .. ? is 64 also the recommended ? :) i would like to do that .. because i recently ran into some issue with my og 3ds mSD (4gig class4).
    the issue was an error has occurred please power off your 3ds and turn it on again< and it sticked like permanently , on updated sysNAND.

    and it is also 32 kb allocation size, and my n3dsxl (mSD 64 gig class10) and other ogXL (32 gig class10) are also formatted at 32 kb allocation size.

    and both my ogxl and n3dsXL are on updated sysNAND, i would not want the error poppin up on my other systems !

    so is the 64kb allocation really highly recommended for better mSD stability also ?
     
  6. driverdis
    OP

    driverdis I am Justice

    Member
    2,286
    840
    Sep 21, 2011
    United States
    1.048596β
    64KB should not affect stability in any way.
    The SD card itself will affect stability, if you are having issues with the error occurred message, it is probably the SD Card and I would use a different one.
     
    leonmagnus99 likes this.
  7. leonmagnus99

    leonmagnus99 GBAtemp Addict

    Member
    2,252
    543
    Apr 2, 2013
    Seinegald
    awesome, i think that way too bro !

    because i never had a permanent 'error occurred turn off your 3ds and turn it on again' issue on my other 3ds'es (on my ogXL/n3dsXL both have class10 mSD's) that problem persisted until i restored my old emuNAND backup and then i went back to the swap proccess to use updated sysNAND aurei cfw.

    i believe so too, so it was most likely my mSD (4gb class4) that caused the issue.. you know because i really didnt install anything weird on my console, just few gba games were on my home screen..

    and the error came up after i launched my blue gw card and bam error popped, and then i rebooted and tried to open another app(bbm) to install something, then i got the error again and that problem became permanent, was forced to restore emuNAND.
     
    Last edited by leonmagnus99, Apr 12, 2016
  8. Filo97

    Filo97 Zelda's totally my sister! Not lying!

    Member
    3,581
    1,168
    Oct 8, 2015
    Italy
    Hyrule Castle
    if i follow this tutorial, my sd will have what advantages?
     
  9. jurassicplayer

    jurassicplayer Completionist Themer

    Member
    4,347
    485
    Mar 7, 2009
    United States
    Pantsuland
    A really shitty rundown of different allocation units:
    Bigger allocation units means that things will be read in larger chunks which means less chunks to read in total for large files. That is kind of why it makes things "faster".
    If there were a problem with this, it's in regards to any file that "wastes" a chunk. If you made a 1 byte text file, that file would be allocated to a whole chunk despite having nothing in it. Similarly, if a lot of your files don't fit well into chunks (I'm talking about the "end" of the file), then you could potentially be wasting a lot of space by using a larger allocation unit. It's the reason why Windows displays "Size:" and "Size on disk:". Size on disk is referring to the allocation unit.

    tl;dr: Larger allocation unit, wastes file space, games and other large files load slightly faster. Lower allocation unit, wastes less space, games load slightly slower.
     
    Just Passing By likes this.
  10. democracy

    democracy GBAtemp Advanced Fan

    Member
    778
    256
    Jul 3, 2009
    United States
    I'm of the opinion, if you have a 64gig card and alot of games installed then you should go to 64kb allocation, it's all around a bit smoother, bit faster OS experience.
     
  11. democracy

    democracy GBAtemp Advanced Fan

    Member
    778
    256
    Jul 3, 2009
    United States
    Yup those are the facts but the reality is on a 128 gig card, 32kb = about 200mb wasted space and 64kb = 400mb wasted space. I am very happy to waste 400mb of space on a 128g card for an overall better experience :)
     
    Last edited by democracy, Apr 13, 2016
  12. Zan'

    Zan' 2F88744FEED717856386400A44BBA4B9CA62E76A32C715D4F

    Member
    385
    159
    Oct 8, 2015
    Wouldn't it be possible to get this formatted with an edited version of EMUNAND9 by @d0k3 ?
    EMUNAND9 can format the SD card and it should be possible to edit the chunk size in the Code.
    Maybe @d0k3 can add a feature that let's you choose the chunk size?
    That would seem a lot easier to me than having to manually save parts of the Disk Image and then use another formatter to format the SD card.
    And it would possibly also allow Emunand Users to have bigger allocation units.
     
    Last edited by Zan', Apr 17, 2016
  13. d0k3

    d0k3 3DS Homebrew Legend

    Member
    2,535
    2,483
    Dec 3, 2004
    Gambia, The
    Cluster sizes are handled by the FATFS library, which is a pain in the ass to edit (meaning: it is very easy to break something without even noticing), so, no it is not that easy.

    @driverdis: This looks like you used an older version of EmuNAND9 - newer releases create a special hidden partition (visible in Easeus Partition Manager) for the EmuNAND / RedNAND. The step with the saving / writing back of the header may be uneeded. The GATEWAYNAND magic number is only required by Gateway card, which no one uses now.

    Anyways, I'll be looking if incorporating this in EmuNAND9 is possible. Starting at which FAT partition size would you recommend 64kB Cluster Sizes?
     
  14. Zan'

    Zan' 2F88744FEED717856386400A44BBA4B9CA62E76A32C715D4F

    Member
    385
    159
    Oct 8, 2015
    Alright. Thanks for your reply.
    I guess 64GB+ Cards are big enough to not care about the little "wasted space" with 64KB clusters.
    If you would add this to EmuNAND9, would it be a lot harder to just ask the user which clustersize they preferred and have 32KB as default?
     
  15. d0k3

    d0k3 3DS Homebrew Legend

    Member
    2,535
    2,483
    Dec 3, 2004
    Gambia, The
    It would, and it is very easy to break something editing FATFS. Even worse, problems caused this way may turn up only in specific cases at a later point. So, no, out of question.
     
  16. driverdis
    OP

    driverdis I am Justice

    Member
    2,286
    840
    Sep 21, 2011
    United States
    1.048596β
    I would set it for ~32GB and up partition size. I have had no issues with 32GB and 64GB SD cards using 64kB Cluster Sizes. I only use 32GB and 64GB MicroSDs for my 3DS consoles so I have no idea how smaller partitions will behave using 64kB Cluster Sizes.
     
  17. Zan'

    Zan' 2F88744FEED717856386400A44BBA4B9CA62E76A32C715D4F

    Member
    385
    159
    Oct 8, 2015
    Seems like @d0k3 added the 64kb clustersize for 16GB+ SD cards in EmuNAND9.
    And it seems to work properly.
     
  18. d0k3

    d0k3 3DS Homebrew Legend

    Member
    2,535
    2,483
    Dec 3, 2004
    Gambia, The
    It does. Release coming up.
     
    democracy, Zan' and driverdis like this.
  19. driverdis
    OP

    driverdis I am Justice

    Member
    2,286
    840
    Sep 21, 2011
    United States
    1.048596β
    Thanks, I updated my guide to reflect this
     
    Zan' likes this.
  20. d0k3

    d0k3 3DS Homebrew Legend

    Member
    2,535
    2,483
    Dec 3, 2004
    Gambia, The
    Yeah, sorry for implementing this shortly after the guide came up. BTW, I did notice, Win 7 still has slight trouble with FAT32 64k (it's not standard, you know). If you create a 1 byte file, Win 7 will still display it as using 32k on the disk.