dig . ns > root.hint
but this may gives an error if your dns-path isn't alive. In that case explicitly specify a nameserver:
dig @<yourDNS> . ns > root.hint
For best results use your providers DNS server.