Bootloading ATMEGA328-PU not working

A few days ago I got a ATmega 328 MCU (Not p-pu) online that have a built-in optiboot for uno 16mhz. But I need it to run 3.3v so I tried rewriting it's bootloader but it failed. It says

avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.

I tried changing the signature of the avrdude.conf (both of them) but it still gives me the same error.... Is there any way to make it work so I can rewrite a bootloader (8Mhz built-in crystal)?

I'm using Arduino Uno as ISP

Since the m328 has been setup to use external 16MHz crystal, you need to set it up with one before you can re-program it to use the internal 8MHz clock.

Or another option is if you use an ArduinoISP version that can generate an external clock signal on a digital pin to connect to the XTAL1 pin on the m328. Check this page, Gammon Forum : Electronics : Microprocessors : Atmega bootloader programmer, see the bottom of the page about Alternate clock source.

From the page you gave me, it says the pin generate 8Mhz clock signal, which is not enough. But it gave me an idea. I tried putting a jumper from the arduino's XTAL1 pin to the XTAL1 pin on the MCU that is being programmed and the Blink sketch inside is working. I then try bootloading it and it works...... So thank you for your suggestion that gave me an idea.....

Yes, that would work too. But for ISP programming the 8MHz external would have still worked, since it is the same fuse settings as the 16MHz external.