diff --git a/x86_64/partitions.asm b/x86_64/partitions.asm
index 4fbede1edf06ae466d5ae0d7a29a54b02683e402..1d9da3572b5f13fc1b231752059abbca453967da 100644
--- a/x86_64/partitions.asm
+++ b/x86_64/partitions.asm
@@ -11,7 +11,6 @@ endstruc
 ; The partition has to be one of the primary MBR partitions.
 ; OUT
 ;   eax - start_lba
-;   edx - sector count
 ; CLOBBER
 ;   ebx
 find_redoxfs_partition:
@@ -26,7 +25,6 @@ find_redoxfs_partition:
     jmp .notfound
 .found:
     mov eax, [partitions + mbr_partition_rec + mbr_partition_rec.lba_start]
-    mov edx, [partitions + mbr_partition_rec + mbr_partition_rec.sector_count]
     ret
 .notfound:
     mov si, .no_partition_found_msg
diff --git a/x86_64/redoxfs.asm b/x86_64/redoxfs.asm
index 43809498d6dcec3bdaf7b7dd6501a0ee15a378a8..3326bfd7d7b0e53a1018cd1448ab181af7deba8d 100644
--- a/x86_64/redoxfs.asm
+++ b/x86_64/redoxfs.asm
@@ -41,10 +41,8 @@ endstruc
 
 ; IN
 ; eax - the first sector of the filesystem
-; edx - the amount of sectors in the filesystem
 redoxfs:
         mov [.first_sector], eax
-        mov [.sector_count], ebx
         call redoxfs.open
         test eax, eax
         jz .good_header
@@ -79,7 +77,6 @@ redoxfs:
         times BLOCK_SIZE db 0
 
     .first_sector: dd 0
-    .sector_count: dd 0
 
     .env:
         db "REDOXFS_BLOCK="
diff --git a/x86_64/startup-common.asm b/x86_64/startup-common.asm
index 147001dd0822c54f3409f5dea3b1cf2f441f23e0..787370e96caf1195399d6d8a4f3f4858942d1f40 100644
--- a/x86_64/startup-common.asm
+++ b/x86_64/startup-common.asm
@@ -28,7 +28,6 @@ startup:
 
         %ifdef FILESYSTEM
             mov eax, (filesystem - boot) / 512
-            mov ebx, (filesystem.end - filesystem) / 512
         %else
             call find_redoxfs_partition
         %endif