setup: split off get_device_or_die helper