diff --git a/fs.c b/fs.c
index 24f6f7537478aa1e7c4a6de0934e801d1f59ff23..63e3e40ddadbe7c389635fcfb86c33bc3d9d3f0e 100644
--- a/fs.c
+++ b/fs.c
@@ -582,7 +582,7 @@ _namei(char *path, int parent, char *name)
   struct inode *ip, *next;
 
   if(*path == '/')
-    ip = iget(ROOTDEV, 1);
+    ip = iget(ROOTDEV, ROOTINO);
   else
     ip = idup(cp->cwd);
 
diff --git a/fs.h b/fs.h
index e1cc7a288c16e13a681fa09d2b949da920fffd3b..a7d93b4a6054d81dfb5456d057529e3dcb2533fa 100644
--- a/fs.h
+++ b/fs.h
@@ -5,6 +5,7 @@
 // Block 1 is super block.
 // Inodes start at block 2.
 
+#define ROOTINO 1  // root i-number
 #define BSIZE 512  // block size
 
 // File system super block
diff --git a/mkfs.c b/mkfs.c
index 4614f992915bb084ce95851ec79073399aee0900..3046f9bfca64ffd913a3b461d2e49cb8c55dce6f 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -92,7 +92,7 @@ main(int argc, char *argv[])
   wsect(1, &sb);
 
   rootino = ialloc(T_DIR);
-  assert(rootino == 1);
+  assert(rootino == ROOTINO);
 
   bzero(&de, sizeof(de));
   de.inum = xshort(rootino);