Index: uspace/app/mkexfat/mkexfat.c
===================================================================
--- uspace/app/mkexfat/mkexfat.c	(revision 78de7be2ab853aada1783e6b0ffc31df2ee17ba9)
+++ uspace/app/mkexfat/mkexfat.c	(revision 69f9cf5a88707116e18be597ca03b55bb3bc6d5f)
@@ -378,6 +378,6 @@
 {
 	int rc;
-	aoff64_t fat_sec = cur_cls / sizeof(uint32_t) + FAT_SECTOR_START;
 	unsigned const fat_entries = cfg->sector_size / sizeof(uint32_t);
+	aoff64_t fat_sec = cur_cls / fat_entries + FAT_SECTOR_START;
 	uint32_t *fat;
 
@@ -611,4 +611,14 @@
 	}
 
+	next_cls += div_round_up(sizeof(upcase_table), cfg.cluster_size);
+	cfg.rootdir_cluster = next_cls;
+
+	/* Allocate a cluster for the root directory entry */
+	rc = fat_allocate_clusters(service_id, &cfg, next_cls, 1);
+	if (rc != EOK) {
+		printf(NAME ": Error, failed to allocate cluster for the root dentry.\n");
+		return 2;
+	}
+
 	return 0;
 }
