# [SOLVED]Switching from intel to amd

## aditya3098

I had an intel core-i3 based system, and I setup my gentoo install using march=native and sse, sse2, ssse3 and mmx use flags(in make.conf). Now I got an AMD FX-6300 and it gave me a KP on boot (I did not use genkernel). When I booted the install cd and tried chrooting, it gave me an "illegal instruction" error. I still have my intel computer, and the hdd boots fine on it. What will I have to do to make my system compatible with the amd processor?

----------

## Aquous

Rebuild the whole system using the appropriate -march= setting. I'm sorry  :Sad: 

----------

## albright

might find some help here:

http://wiki.gentoo.org/wiki/Safe_CFLAGS#FX-XXXX

----------

## NeddySeagoon

aditya3098,

Back on the intel box, set -mtune=generic and no -march al all

Fix your USE flags so that they will work on both CPUs.

Run 

```
emerge -e @system
```

Rebuild your kernel and boot loader and reinstall the bootloader to the MBR.

When you rebuild your kernel, include all the bits and pieces for both motherboards.

Choose the generic CPU option in the kernel.

You now have a kernel, boot loader and @system, but not yet @world, that will run on AMD or Intel CPUs.

Move back to the AMD and it should boot.

On the AMD, you can go back to -march=native, fix your USE flags for your new processor, and do emerge -e @world to make the install AMD specific.

The above assumes you can boot to the command tine to do what you need. 

If you use a graphical login, you should disable it for the transisition unless you want to rebuild @world just to get something to boot on the AMD CPU.

----------

## aditya3098

Thanks everyone. It worked. I have a ALMOST fully functional system now. But that's for another 2 threads....

----------

