Use Arduino Yun Shield as ISP for bootloaded ATMega328-PU
It's highly unlikely you will be able to do it from the IDE. Instead you will have to do it from the Yun's command line (SSH) using avrdude and the linuxgpio driver, or the handy run-avrdude script.

$ sudo run-avrdude bootloader.hex


where bootloader.hex is the bootloader file found somewhere in the IDE that you need to copy over to the Yun with scp.

You may find you need to tweak the fuse settings in the script to get the bootloader to work. I am not familiar with AVR fuses, but IIRC there is one that tells it to run the bootloader instead of the sketch. Just copy the values out of the boards.txt in the IDE and place them into a copy of /usr/bin/run-avrdude in your home directory.