Will I lose root access if I upgrade my S5 from KitKat to Lollipop? If so, why?
Since the question has mentioned any update method, I've mentioned some possible cases:
Updating via OTA (from the phone itself using the stock updater): In this case you are certainly gonna lose root.
Why? OTA updates uses a stock ROM (
.zip) which will wipe the system partition with every thing in it including
Updating via Kies: You are certainly gonna lose root.
Why? Same as OTA, Kies will flash a stock firmware including the system partition and the kernel too.
Updating using Odin PC and a stock untouched firmware: You will lose root.
Why? Same explanation as for Samsung Kies.
Updating using Odin PC and a pre-rooted firmware: Root access will be granted for the newer version, and you will certainly not lose root access.
Why? Well as the firmware is pre-rooted you will flash new firmware and root at the same time.
Updating using a stock firmware via Odin mobile: Now this app has an option called "ever root". Check it before flashing the firmware to root at the same time when flashing because if you do this you will not lose root, while if you don't you will lose root.
Those are the methods I know but they don't account as all the methods available.