Having Linux on so many devices is both a blessing and a curse. Sure, it is great that you can hack on things and modify them ...
If flash size readout is wrong or 0: check wiring/power or that Arduino core is configured for the correct flash size in Tools / Board settings. If the sketch shows Unknown model (enum=XX): your ...