No, moving to another OS (for example Ubuntu) will not void your warranty. Your warranty covers the hardware.
The only thing is that HP Support team (official support team) may not be able to assist you with software related issues on Ubuntu. Your warranty will remain valid.
Tux greetings 🙂
Your feedback and update is highly appreciated *** Click on the button below to accept this advice as a solution if it helped you *** Don't hesitate to hit the THUMB-UP+ button below to say thanks or give like HP Expert - volunteer - not employed by HP Inc. *** I express personal opinion only. *** IT Commodity and Cyber Security professional *** Location/timezone: Europe