I tried to install Debian 9 with a bootable USB. But almost at the end of the installation I encountered an error saying, "Debootstrap error. Failed to determine the codename for the release". It occurred during the "Install the system" step. And by the way I didn't choose any mirror because I was getting an error something like, this mirror isn't found or suitable for every mirror I choose.
i think that the installer doesn't know to identify that it is being installed via usb.So you have to manually mount the usb to /cdrom.You can do this by hitting alt-f2 and then mount /dev/sdc1 /cdrom then press alt-f1 to get back to the install.
The device for the usb drive may vary. For myexample it was /dev/sdc1.