Re-flash the boot loader on the ATMega328-p (Due) present on the Uno board

There appears to be a lot of successful ways to burn boot loaders on a second ATMega328p using the Uno/Due and other boards and the Arduino IDE.
Arduino IDE + Uno/Due boot loaded ATMega328p ---> Burn a boot loader on a 'second' ATMega328p

Not sure if there is any way to modify the boot loader present on the ATMega328p on the Uno/Due board using the Aruino IDE only.
Arduino IDE ---> Modify the Uno/Due boot loaded ATMega328p present on the board to start using a different boot loader
Specifically, I have a Uno board with a Due boot loaded ATMega328p-pu IC that I am trying to reflash to use the Optiboot boot loader(to enable running at 8 Mhz).

Hi

You need another ATMega328P. A chip can't flash a bootloader to itself. You can then flash the 8MHz bootloader to the new chip then replace that into your Uno board, however as I understand it the chip will still run at 16MHz if the bootloader/fuse settings are using an external clock because the Oscillator on the Uno will still be running at 16MHz and then it may not program correctly and timings will be off. It should work if using the internal clock.

You are really safer getting another chip and using it on a breadboard to try out, you don't want something to break on the Uno board as then you may be stuck.

Regards

Phil