+ else if (is_dir_etc &&
+ is_dir_bin &&
+ guestfs_is_file (g, "/etc/fstab") > 0 &&
+ guestfs_is_file (g, "/etc/release") > 0) {
+ /* Ignore /dev/sda1 which is a shadow of the real root filesystem
+ * that is probably /dev/sda5 (see:
+ * http://www.freebsd.org/doc/handbook/disk-organization.html)
+ */
+ if (match (g, device, re_first_partition))
+ return 0;
+
+ fs->is_root = 1;
+ fs->content = FS_CONTENT_NETBSD_ROOT;
+ fs->format = OS_FORMAT_INSTALLED;
+ if (guestfs___check_netbsd_root (g, fs) == -1)
+ return -1;
+ }
+ /* Hurd root? */
+ else if (guestfs_is_file (g, "/hurd/console") > 0 &&
+ guestfs_is_file (g, "/hurd/hello") > 0 &&
+ guestfs_is_file (g, "/hurd/null") > 0) {
+ fs->is_root = 1;
+ fs->content = FS_CONTENT_HURD_ROOT;
+ fs->format = OS_FORMAT_INSTALLED; /* XXX could be more specific */
+ if (guestfs___check_hurd_root (g, fs) == -1)
+ return -1;
+ }