Improve check for rootfs device prefix, and private ip test