» WIT: Wiimms ISO Tools » wwt: Wiimms WBFS Tool » wwt verify

# wwt verify

Verify all discs of WBFS (calculate and compare SHA1 checksums) to find bad dumps.

## 1. Syntax

    wwt VERIFY [id6]...

## 2. Options

Options
Option | Param | Description
--- | --- | ---
`-T` | `--titles` | file | Read file for disc titles. -T/ disables automatic search for title files.
| `--utf-8` |  | Enables UTF-8 support for filenames (default).
| `--no-utf-8` |  | Disables UTF-8 support for filenames.
| `--lang` | lang | Define the language for titles.
`-a` | `--auto` |  | Search for WBFS partitions using '/proc/partitions' or searching hard disks in '/dev/'.
`-A` | `--all` |  | Use all WBFS partitions found.
`-p` | `--part` | part | Define a primary WBFS file or partition. Multiple usage possible.
| `--no-check` |  | Disable automatic check of WBFS before modifications.
`-x` | `--exclude` | id | A comma separated list with ID4 and ID6 values is expected. '.' is a wildcard for exact 1 character and '+' is a wildcard for any number characters. If the parameter begins with a '@' the given file is read and each line is scanned for one ID. Images with the given ID are excluded from operation. Each use of this option expands the exclude list. See --include-first for precedence issues.
`-X` | `--exclude-path` | file_or_dir | Scan the ID of the source and add it to the exclude list. If the source is a directory then scan all images of the directory. Images with the given ID are excluded from operation. Each use of this option expands the exclude list. See --include-first for precedence issues.
`-n` | `--include` | id | A comma separated list with ID values is expected. '.' is a wildcard for exact 1 character and '+' is a wildcard for any number characters. If the parameter begins with a '@' the given file is read and each line is scanned for one ID. Only images with the given ID are included into the operation. Each use of this option expands the include list. See --include-first for precedence issues.
`-N` | `--include-path` | file_or_dir | Scan the ID of the source and add it to the include list. If the source is a directory then scan all images of the directory. Only images with the given ID are included into the operation. Each use of this option expands the include list. See --include-first for precedence issues.
| `--include-first` |  | The options --include, --include-path, --exclude and --exclude-path decide which discs are included into the operation. If neither include nor exclude options are used, than all disc are included into the operation. If only include options are used, than only the specified discs are operated. If only exclude options are used, than all all discs but not the excluded are operated. If include and exclude options are used together and --include-first is not set, than all discs are operated that are specified by any include option and not by any exclude option. If --include-first is set, than all discs are ignored that are specified by any exclude option and not by any include option.
`-1` | `--one-job` |  | Execute only the first job and exit. This is a shortcut for »--job-limit 1«.
| `--job-limit` | num | Execute only the first 'num' jobs and exit. If done without errors the exit status is OK (zero).
`-q` | `--quiet` |  | Be quiet and print only error messages.
`-v` | `--verbose` |  | Show a runtime summary for each job. If set twice enable progress information. If set three times the progress information is more detailed.
`-P` | `--progress` |  | Print progress counter. If --verbose is set at least twice, printing is enabled too. If progress is enabled, the default of --dsync is changed.
| `--scan-progress` |  | Print a message for each found image while scanning the file system.
`-L` | `--logging` |  | This debug option enables the logging of internal memory maps. If set twice second level memory maps are printed too.
| `--limit` | num | Maximal printed errors of each partition. A zero means unlimited. The default is 10.
`-t` | `--test` |  | Run in test mode, modify nothing. >>> USE THIS OPTION IF UNSURE! <<<
| `--psel` | list | This option set the scrubbing mode and defines, which disc partitions are handled. It expects a comma separated list of keywords, numbers and names; all together called parameter. All parameters are case insensitive and non ambiguous abbreviations of keywords are allowed. Each parameter becomes a rule and each rule is appended to a rule list. Rules prefixed by a minus sign are DENY rules. Rules prefixed by a plus sign or without a prefix are ALLOW rules. Each partition is compared with each rule until a rule matches the partition. If a match it found, the partition is enabled for a ALLOW rule or disabled for a DENY rule. The allowed keywords are: DATA, UPDATE, CHANNEL, PTAB0 .. PTAB3, ID, ALL, WHOLE and RAW. The following input formats are accepted too: ptype, #index, #<index, #<=index, #>index, #>=index and #tab_index.part_index.
| `--raw` |  | Abbreviation of »--psel RAW«.
| `--ignore-files` | ruleset | This option defines filter rules to ignore real files of the FST of the DATA partition. Fake signing is not necessary, but the partition becomes invalid, because the content of some files is not copied. If such file is accessed the Wii will halt immediately, because the verification of the checksum calculation fails. The processing order of file options is: »--rm-files --zero-files --ignore-files«.
`-U` | `--unique` |  | Eliminate multiple ID6 from the source list.
`-i` | `--ignore` |  | Ignore non existing discs without any warning.
`-R` | `--remove` |  | Remove bad discs from WBFS.
| `--no-free` |  | The discs are only dropped (slot is marked free), but the correspondent blocks are not freed. You should run CHECK or REPAIR to repair the WBFS after using this option.
`-l` | `--long` |  | On error print an additional line to localize the exact position where the error is found. If set twice a hex dump of the hash values is printed too.
| `--technical` |  | Force a technical output instead of user friendly text. --tech is a short cut for --technical.

## 3. Description

### 3.1 Introduction

Every 1024 bytes of user data in every Wii partition has its own SHA1 checksum (called 'H0'). There are also H1 (hash of 31*H0), H2 (hash of 8*H1), H3 (hash of 8*H2) and for the whole partition one H4 (hash of all H3) checksums. To validate a partition it is enought to calculate the checksums and compare them with the stored sums. For a scrubbed image it is enough to compare the checksums of the used sectors. »wit VERIFY« and »wwt VERIFY« do exactly this.

To validate a disc the tool must do 64 AES-128-CBC decryptions and 1029 SHA1 calculations for each MiB of data. This slow down the operation rapidly and verifying is much slower then copying.

→ See command »wit VERIFY« for output and status details.

### 3.2 Options

If the option --remove is set, invalid discs (bad dumps) are removed from WBFS. If the option --no-free is set too then the disc is only marked as removed. The allocated blocks are not freed. After using --no-free you should use »wwt CHECK --rapair=fbt« to repair the free blocks table.

Before verifying the WBFS a check (see »wwt CHECK«) is done. If there are any problematic errors detected the WBFS is ignored. If the option --force is set, the test is done but the result is ignored. The option --no-check disables this automatic check.

### 3.3 See also

»wit VERIFY« »wit DIFF« »wwt CHECK«

## 4. Usual error/exit codes:

        0 == OK        : All done without errors.
        DIFFER         : At least one checksum error found.
        SYNTAX ERROR   : At least one syntax error in command line found.
        READ ERROR     : Error while reading a file.
        CANT OPEN      : Can't open file.