Before I start, I would like to tell you that it’s all there in this XDA post,from where I learnt how to do it and also got the necessary resources needed to do it: http://forum.xda-developers.com/showthread.php?t=2011403
Now for the process.
(Before you do all this, make sure you have a custom recovery installed, a simple search through XDA would tell you how to do it and give you the resources to do it. Also make sure you’ve atleast 3 GB free space in your tablet, after downloading the files mentioned) (Also make a complete backup of your device via recovery, this will come in handy later)
Go to the post mentioned above and download the latest versions of these(Can be found in the 2nd post): a.)Multirom b.)Modified Recovery c.)Kernel d.) Ubuntu image (Ubuntu Image can be found here: http://cdimage.ubuntu.com/daily-preinstalled/current/ - Download the largest .img.gz file available)
Copy all these to your Nexus 7. No need to remove the connection from your PC after doing this(it will come in handy later)
Reboot into recovery.
Select Install, select the Multirom zip file and flash it
Boot the device in fastboot mode (Hold Power button + Volume Up + Volume down)
In your terminal (or command prompt), navigate to the directory where you have downloaded the modified recovery, and run the following command:
fastboot flash recovery <recovery_file_name>.img
(or if you’re in linux)
sudo fastboot flash recovery <recovery_file_name>.img
After this is completed, reboot your device, Multirom will show up. Reboot into recovery
In the recovery, go to Advanced > Multirom > Add Rom (Android). Click Next. Select Backup and now select the previous backup file that you created
Click Next. Wait for the installation to complete.
Now go back,repeat the steps again, but now select Ubuntu in the Add Rom screen. Click Next. Select the Ubuntu image you downloaded earlier and let the process finish.
Reboot and and select Ubuntu in the Multirom screen
Ubuntu will now extract the files and the OS will be installed. Set it up as you would do on your desktop and you’re done. You can select which OS to boot into using the Multiroom screen. Or you can set Auto-boot in the recovery and select a default OS to boot into.
Adios amigos, that’s it, it’s as simple as that :)