You can write the installer image to a hd and boot from it. If you edit the kernel command line options on the boot menu and add toram
then it will load entirely into ram and leave the disk unmounted so you can reformat and install the system there.
Assuming /dev/sdb
is the drive you want to use ( wipe out ):
sudo dd if=ubuntu.iso of=/dev/sdb