You need to have some things prepared first:
- your original hard-drive from where you will read all the bits (you have this one, obviously);
- a separate hard-drive where you will write the backup - this one needs to be already partitioned & formatted and must have ENOUGH free space to host your backup file (if your original hard-drive has 80 GB, you must have at least 80 GB free on a partition of the backup hard-drive to create the backup);
- a Linux LiveCD/LiveDVD/LiveUSB to boot from - it must have the "dd" utility. I guess using the CD/DVD/USB you already used to install Ubuntu should be ok.
1) make sure both hard-drives are connected to the computer you will be using;
2) boot from the LiveCD/LiveDVD/LiveUSB and check what drive is what - let's say from now on that original drive is sda and backup drive is sdb. Let's also say the backup drive has only 1 partition, sdb1.
3) make sure nothing from sda is mounted;
4) make sure the backup partition (/dev/sdb1) is mounted (let's say to /media/sdb1);
5) you need to run from a terminal the "dd" command like this (it means: "copy bit-by-bit the whole sda hard-drive to file backup.img in /media/sdb1 using a block-size of 1 MB"):
dd if=/dev/sda of=/media/sdb1/backup.img bs=1M
Please know that, depending on your original drive size, step 5) will take less or more (or a lot of) time.
Good luck and let us know what happens!
Note: you can always restore from the backup file by using:
dd if=/media/sdb1/backup.img of=/dev/sda bs=1M
Again, please make sure to check what drive is what - sdb is the backup drive, sda is the drive where the backup will be restored.