# v200 GDR-8050L live iSCSI attach hygiene

v199 proved the live iSCSI PDU path can advertise the target and route dynamic
READ(10)/READ(12) responses from the ISO-backed media window.  The first Windows
attach reached SendTargets and produced HL-DT-ST DVD-ROM GDR8050L CD-ROM device
instances, but repeated connect attempts left multiple stale Windows CD-ROM
instances with `MediaLoaded=False`.

v200 does not change the proven media-window math.  It adds safer attach hygiene
and log collection around the same dynamic-media backend:

- disconnect stale sessions for the target before reconnecting;
- remove stale portals before SendTargets discovery;
- show present-only PnP CD-ROM devices separately from stale Win32_CDROMDrive
  entries;
- provide an explicit optional stale-device removal switch;
- write v200 live JSONL/response artifacts by default;
- include `gdr8050l_auth_v200_windows_iscsi_media_window_config.json` in the
  package so the start script has a complete config.

## Clean start sequence

Use one Administrator terminal for the target and one Administrator PowerShell
terminal for Windows iSCSI Initiator.  Do not start the target twice on the same
port.

First, clean old sessions/portal entries:

```powershell
Set-ExecutionPolicy -Scope Process Bypass -Force
.\gdr8050l_auth_v200_dynamic_iscsi_disconnect_windows_iscsi.ps1 -PortalAddress 192.168.0.8 -PortalPort 3260
```

If Windows still shows many stale emulator-created CD-ROM instances and you have
confirmed they are not physical drives, remove them explicitly:

```powershell
.\gdr8050l_auth_v200_dynamic_iscsi_disconnect_windows_iscsi.ps1 -PortalAddress 192.168.0.8 -PortalPort 3260 -RemoveStaleCdromDevices
```

Then start the target:

```powershell
.\gdr8050l_auth_v200_dynamic_iscsi_start.cmd `
  .\gdr8050l_auth_v200_windows_iscsi_media_window_config.json `
  "D:\vscode-workspace\xbox-dvd-tools-v2\disc_dumps\Red Faction II[TQ00501A].iso" `
  306080 `
  192.168.0.8 `
  3260
```

Then connect:

```powershell
Set-ExecutionPolicy -Scope Process Bypass -Force
.\gdr8050l_auth_v200_dynamic_iscsi_connect_windows_iscsi.ps1 -PortalAddress 192.168.0.8 -PortalPort 3260
```

## Collect logs

After a Windows attach attempt, collect the target-side rows and response files:

```powershell
.\gdr8050l_auth_v200_dynamic_iscsi_collect_logs.ps1
```

Upload `gdr8050l_auth_v200_dynamic_iscsi_live_artifacts.zip` if Windows still
shows `MediaLoaded=False` or duplicates after the cleanup pass.  The key file is
`gdr8050l_auth_v200_dynamic_iscsi_live_windows_iscsi.jsonl`; it shows exactly
which CDBs Windows sent and whether the backend returned catalog, dynamic-media,
CHECK CONDITION, or no-data responses.

## Provenance constraint

The config and audit still point to the chain-produced decrypted payload:

```text
D:\vscode-workspace\xbox-dvd-tools-v2\decrypted_payloads\GDR-8050L_0L23_5af3ae9b_firmware_4c61eb12_plaintext_7cab0f5c.bin
```

Do not use the old fallback firmware path.
