The alternative I can think of is don't restart your system right after editing the hosts file.
Instead, restart the network service:
/etc/init.d/network restart
should do the trick in terms of getting your hosts file to behave properly. I've not heard of the file reverting upon a reboot, unless the system is re-writing it upon startup.
Oh--wait a second.
You're running Ubuntu off of your USB stick, right? The /etc directory exists solely in RAM--not on your stick. What you are editing is a temporary copy of the hosts file--not the one installed by the rescue stick.
So--I'm not an expert here, though I've done this once or twice. Look for a directory called something like "/mnt/sysimage/etc" or similar. The file you want to edit will be in there.
Type in the following:
find / -iname /etc/hosts
and see if that returns anything other than /etc/hosts.
Your comment on /etc existing solely in ram is interesting. For one I wonder how I would know that. But even if that is the case, it doesn't explain why the copy of the hosts file I put on the desktop disappeared.
I find it hard to believe that just anyone could just follow the article instructions. I actually used UNIX a bit, back in the pre WWW days; and I have quite a bit of PC and embedded experience. (In fact, I was quite familiar with all the chips IBM decided to use in the original PC.)
My intent is to start over downloading a new clean system, knowing what I have learned and see whether anything improves.
ML/NJ