Replicant only supports a few phones. Make sure the phone you want to install Replicant on is on the ReplicantStatus list. If it's not, you won't be able to install Replicant on your device without at least a bit of software hacking.
Some phones come with software that allows the user to flash the memory (replace the content of the memory partitions, like the system or the kernel one), but it's not always the case. Google-branded phones (Nexus One and Nexus S) come with this allowed but for some other devices, you'll certainly have to do some more operations to make this possible (it's required to flash Replicant).
Please, refer to the CyanogenMod wiki to find and follow the instructions to root the phone. Note that instructions for Replicant 2.2 correspond to CyanogenMod 6 and Replicant 2.3 correspond to CyanogenMod 7.
For instance on the HTC Dream page, you'll need to follow the instructions to root the phone and to install DangerSPL.
Note: all the radio images and bootloader images that are provided on these pages are not free software.
dream_sapphire
.Replicant 2.2 preview 0009
.For instance, if the phone is HTC Dream and the latest image Replicant 2.2 preview 0009, the base location will be: http://ftp.osuosl.org/pub/replicant/images/replicant-2.2/preview/0009/.
cd ~/Downloads
If you have downloaded the files in any other place, change ~/Downloads by the location where you downloaded the files.
sudo su
This will ask you to type your password. Note that in most cases, the letters you type won't be shown.
chmod a+x fastboot
Keep this terminal open during the next step.
./fastboot oem unlock Warning: on Nexus One, the operation voids the warranty and is irreversible. On Nexus S and Nexus S 4G, the bootloader can be locked back.
WARNING: This step will erase every data stored on the phone, make sure you copied the data if you don't want to lose it.
./fastboot flash system system.img ./fastboot flash boot boot.img ./fastboot flash userdata userdata.img
./fastboot flash recovery recovery.img
./fastboot erase cache ./fastboot reboot
Your device should reboot with Replicant running. Now you are done, Replicant is installed on your device!
Put the phone in fastboot mode (by holding the Camera button and the Power button, then following on-screen instructions), make sure it's connected to your computer, and run the following commands on your computer. You may need to use sudo.
Note, if you don't have instructions for entering fastboot mode, you may need to install DangerSPL using the CyanogenMod instructions.
Note that it will erase everything on the phone
./fastboot flash system system.img ./fastboot flash boot boot.img ./fastboot flash userdata userdata.img ./fastboot erase cache ./fastboot reboot