USB Loader GX/Nintendont: Partition Problems

Discussion in 'Wii - Backup Loaders' started by sillyokid, Jun 25, 2015.

  1. sillyokid
    OP

    sillyokid Newbie

    Newcomer
    1
    0
    Jun 25, 2015
    United States
    Hello all

    I recently decided to get a new USB 3.0 500GB HDD for my wii and switch over to Nintendont from Devolution. After formatting my drive to FAT32 and copying over my Gamecube games into the usb:/games folder (File structure is correct), they are not loaded at all. USB Loader gives me a primary partition error, and Devolution does not read my drive at all. My old HDD with the same file structure loads fine.

    Here is a screenshot of my HDD in disk manager (No other partitions at all):
    [​IMG]

    Any idea how to fix this?
     
  2. GreyWolf

    GreyWolf GBAtemp Psycho!

    Member
    4,165
    802
    Mar 2, 2015
    United States
    The partition doesn't show as being active. Try right-clicking on it and select "Mark partition as active" in the context menu and see if that does anything.
     
  3. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    18,572
    8,919
    Oct 27, 2002
    France
    Engine room, learning
    Active has nothing to do with the Wii or the consoles.
    Active is a status used by computer to know which partition to use to boot the OS.

    Don't bother with the active state to fix anything related to the Wii.


    The disk seems fine.
    only one partition, it's a "primary" partition, it's FAT32 so it should be fine.

    Could you paste the "Exact" warning message?
    I created different messages based on different issues the user can have. with the correct message I will be able to know where it breaks.
    also, be sure yo use latest USBLoaderGX (1239 from internal updater or 1246 in my signature)
     
  4. GreyWolf

    GreyWolf GBAtemp Psycho!

    Member
    4,165
    802
    Mar 2, 2015
    United States
    The "active" status of a partition is stored in the MBR, though. Even *nix clones use it. One partition per drive can be marked as active.

    The question is whether the Wii libfat uses it or Nintendont does. :) I mentioned it because I've seen people say in the past that making their GC partition active fixed it.


    EDIT: The libfat in Nintendon't is at least checking that flag:
    Code:
    // Check if FAT mirroring is enabled
    if (!(sectorBuffer[BPB_FAT32_extFlags] & 0x80)) {
    // Use the active FAT
    partition->fat.fatStart = partition->fat.fatStart + ( partition->fat.sectorsPerFat * (sectorBuffer[BPB_FAT32_extFlags] & 0x0F));
    }
    
     
    Last edited by GreyWolf, Jun 26, 2015
  5. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    18,572
    8,919
    Oct 27, 2002
    France
    Engine room, learning
    that's something else here.
    This "active" is not the activated primary partition in the MBR but the activated copy of the "File allocation table" in the currently mounted FAT32 partition.
    see that it's not "== 0x80" but "& 0x80"

    FAT partition has multiple copies of the file allocation table to prevent corruptions. this code just checks and selects the active "File table" (not partition).

    http://www.ntfs.com/fat-mirrow.htm


    "When Disabled (bit 0x0080 set)", it's the contrary with Active partition : MBR sector 0 with primary partition set to 0x80 means partition is active, here the FAT's partition first sector with "bit 0x80" (it's a flag 1000 1000) means the FAT mirroring is disabled.
    if mirroring was enabled, all copy of the table were identical, if not then there's an active File table and a copy (backup) File table.
    That's what your pasted code is doing:
    if(first table is not 0x80) then use the active table backup located at sector size * number of the active table.
    table number is stored in the first less significant 8 bits of the flags 1000 1000 (9th table).

    (thanks, I'm learning at the same time :P)


    Edit:
    BPB_ExtFlags specification:
    Code:
    offset : 0x40
    size : 2
    This field is only defined for FAT32 media and does not exist on FAT12 and FAT16 media.
    Bits 0-3	-- Zero-based number of active FAT. Only valid if mirroring is disabled.
    Bits 4-6	-- Reserved.
    Bit    7  	-- 0 means the FAT is mirrored at runtime into all FATs.
    	        -- 1 means only one FAT is active; it is the one referenced in bits 0-3.
    Bits 8-15 	-- Reserved.