The whole source is 1.4G, of which you’ll only need 16M, so you may just want to use the sources installed by the IDE. On Ubuntu, see /usr/share/arduino. I recommend making a copy as you’ll need to make some changes. Change to the ./hardware/arduino/bootloaders/optiboot directory...
I thought I'd bricked one of my Arduino Pro Minis (5V/16 MHz), but I was able to re-program the bootloader using these instructions. I avoided having to use the solderless breadboard by using M-F jumpers, male side on the Uno and female side on the Pro Mini, on which I'd instal...