You generally don't need to edit the boot.img to root your phone.
What's your phone model, so we can give you the instructions?
Edit: To root a Galaxy Nexus, first you have to unlock the bootloader, which is really easy since the GNex is a dev phone, just google how to unlock the bootloader, and follow the instructions. I recommend droid-lifes tutorial, but anyone should do. Then all that's left is the rooting.
- First you have to download this zip file
- Then unzip the file anywhere on you computer, like C:\gnex\
- Install the Samsung drivers that are in the zip
- After you have installed the drivers, turn the phone of and connect the USB to your computer and phone.
- Open a command prompt from the start menu, then move to the directory you unzipped the file to (e.x. cd C:\gnex)
- Now you have to boot your phone into fastboot mode, by pressing and holding both the volume-UP and volume-DOWN buttons and then press the power button.
- Next, type
fastboot devices
into the command prompt you opened earlier, and check that your phone is in the list.
- Now we have to soft-boot an insecure boot image by typing
fastboot boot boot.img
into the command prompt
- When the phone has rebooted, open settings, and go to
Settings -> Applications -> Development
and check in the USB debbuging
option.
Now execute all of these following commands, after each other, in the command prompt:
- adb root
- adb remount
- adb push su /system/bin
- adb push Superuser.apk /system/app
- adb shell chmod 06755 /system/bin/su
- adb shell chmod 06755 /system/app/Superuser.apk
Now your device should be rooted and ready.