NEW VIRGIN EEPROM + virgin STOCK HD + XBL Gamertag = XBOX Live!
or
NEW VIRGIN EEPROM + virgin upgraded HD + Non-flagged GT = XBOX Live!
As for the error 5, that means that your HDD hasn't been locked, therefor your M$ retail bios (Needed to go on XBL) can't load.
Get a virgin eeprom and flash it using configmagic Final or similar program, then lock your virgin HD using that eeprom.
If the HD is larger than stock, create a new gamertag.
Check the tutorials, but read the marriage theory 101 thread on the pinned topics before you even do anything, just to get the facts straight.
Good luck mate.
PS: You can use your friends eeprom as long as he's not using it for xbox live, or he hasn't used it on live after june/july of 2004. Failing to do so, will cause both xboxes to be banned from xbox live.
The eeprom is data contained within a chip on your Motherboard. So the HD won't have an eeprom, unless it's there from a previous backup.