These instructions are based on this blogpost by Anton Semjonov and this video by Animortis Productions. Please follow the link if you want more details, they go into much more detail about each step, whereas this document is more focused on being a concise cheat sheet. Let's go.
Boot the Ubuntu installation medium. When asked, choose the "Try Ubuntu" option and open a terminal.
Switch to root, otherwise you'll have to type sudo
all the time:
sudo su -