As above, you can create a new library or open an alternate one by holding down shift as you start iTunes. See this support article for more. Once the library is on the external drive connecting it to a rebuilt OS or a new computer is simply a matter of holding down shift.
Ideally you want the library at X:\iTunes with the media folder at X:\iTunes\iTunes Media where X is the current letter of your external drive. That way, if it has to change for some reason, e.g. what was G: is now forced down to H: then you just shift-start-iTunes again, connect to H:\iTunes\iTunes Library.itl and, in those famous words, "it just works".
If you want to tell me where your media folder is now, and the location of your library file, I can give you step-by-step instructions for making your library fully portable for the future, or you can attempt to make sense of my generic set of instructions below.
If your external media folder is called \iTunes\iTunes Media then process is relatively easy. Copy the contents of the iTunes folder on your internal disk into \iTunes on the external, then hold down shift as you start iTunes and choose the iTunes library on your external drive.
If you external media folder has a different path or name then a few more steps are involved.
- Consolidate your library before you start just in case the are any files outside of the designated iTunes Media folder.
- Copy the contents of the iTunes folder into the parent folder of the media folder.
- Connect iTunes to the library on the external with the shift-start-iTunes method.
- Close iTunes and rename the media folder as iTunes Media, then start iTunes, check a track or two, then close it again. (Skip this stage if the folder already has the correct name)
- Rename/move the parent folder as \iTunes (or create a new folder at \iTunes and move the iTunes library files, Album Artwork & iTunes Media folders into it) then reconnect iTunes to the library with the shift-start-iTunes method.
If you should now start iTunes without the external drive connected, iTunes will warn you that it cannot find the library and prompt you to choose or create one. Simply cancel, connect the drive, and restart.
tt2