[Samsung Galaxy Nexus] efrant:
Ok, this is the minimum you need to do:

Download/extract the needed files:

1) Install the Samsung driver from here;

2) Extract the files in the GN-Root file from here to a folder on your computer;

3) Download the Superuser-3.0.7-efghi-signed.zip file from here to your computer, rename it su.zip (for convenience) and transfer it your /sdcard on your device;

Unlock your bootloader

1) Open a command prompt (running as administrator) in that same folder;

2) Reboot your device into fastboot mode by holding down volume up and volume down, and pressing the power button;

3) Type fastboot devices to make sure the drivers are installed properly and your computer sees your device;

4) Type fastboot oem unlock in the command prompt.

5) Look at the screen on your device and it will ask you if you want to proceed with unlocking your bootloader. Before proceeding, note that this step (#5) will wipe ALL of your data, including anything in the /sdcard folder. Click on yes.

Now your bootloader is unlocked. <-- This has nothing to do with stock or not stock.

Now, I will give you three methods to get root. Choose one:

Method 1: Using CWM

1) Reboot your device in fastboot mode

2) In the same command prompt, type fastboot boot recovery-clockwork-5.5.0.2-maguro.img. This will boot CWM, but not flash it to your device;

3) On your device (which should be booted into CWM), look for an option like "flash zip from sdcard" or something like that (I can't remember what the exact wording is, and I don't feel like rebooting my device right now... :) );

4) Use the volume up/down keys to find the su.zip file and select it. It should install. If not, go back one level, and look for an option called "mount", and mount the /system partition. Then flash the zip.

5) Reboot. Now you have a fully stock device that is rooted and has an unlocked bootloader. You will receive all the OTA updates, and they will automatically install. You can always relock your bootloader if you want, HOWEVER, I don't recommend it, as if you need to do anything else and unlock it again, it will wipe ALL of your data again. There is no need to have a locked bootloader.

Method 2: Manually root

This method has a few more steps, by you will understand a bit more about what is involved with rooting.

1) You need to make sure that USB debugging is checked under Developer Options in settings;

2) Boot your device in fastboot mode;

3) In the same command prompt window, type fastboot boot boot.img to boot an insecure boot image (i.e., one that gives your root access by default).

4) Wait for your device to boot up;

5) Type adb devices to make sure the drivers are installed properly and your computer sees your device;

6) Type adb remount to mount the /system partition as r/w;

7) Type adb push su /system/su to push the su binary to the correct location;

8) Type adb push Superuser.apk /system/app/Superuser.apk to push the Superuser app to the correct location;

9) Type adb shell chmod 0755 /system/su to change the permissions on the su binary;

10) Type adb shell chmod 0755 /system/app/Superuser.apk to change the permissions on the Superuser app;

11) Type adb reboot to reboot. Done.

Method 3: Modaco's Superboot

Kind of a one-step method (although I like to do things manually myself).

1) Download Paul's Superboot image found here and extract the files to a directory on your computer;

2) Reboot into fastboot mode;

3) Double-click on install-superboot-windows.bat

4) Wait. It should reboot your device in 5-10 mins.

In all of these methods, you are left with a completely stock ROM (aside from the two files required for root) and a stock recovery.

---------- Post added at 03:23 PM ---------- Previous post was at 03:21 PM ----------

Although you do not need to install a custom recovery, you can just boot it, and leave your stock recovery in place if you so desire.