Some readers have reported seeing Error 20 when restoring with iOS 5 beta.
Mac Rumours has a discussion forum on this topic: Iphone 4 Error 20 When Restoring with ios5 Beta. It appears that this problem affects devices that have been upgraded to iOS 4.3.4 before the iOS 5 beta install.
Turn off the iPhone/iPod Touch/iPad – hold the Sleep/Wake button (top right corner) for a few seconds until the red slider appears, and then slide the slider.
Press the Home button and connect the USB cable to the iPhone/iPod Touch/iPad – the device should power on.
Continue holding the Home button until you see the "Connect to iTunes" screen, then release the Home button: