diff --git a/boot/piboot/piboot.go b/boot/piboot/piboot.go
index 6ae72ac1fd01bd30dfbd55ee27665f4c49e4bb2f..6f21a8ea591605aa534e1d82bb9768d3cd489980 100644
--- a/boot/piboot/piboot.go
+++ b/boot/piboot/piboot.go
@@ -22,7 +22,6 @@ package piboot
 import (
 	"errors"
 	"fmt"
-	"io/fs"
 	"os"
 	"os/exec"
 	"path/filepath"
@@ -315,7 +314,7 @@ func (pi *PiBoot) PreInstallHandler(ctx *installhandler.HandlerContext) (err err
 	tsPath := filepath.Join(pi.procMountPoint, relTsPath)
 
 	firmwareBuildTs, err := pieeprom.BuildTimestamp(tsPath)
-	if err != nil && !errors.Is(err, fs.ErrNotExist) {
+	if err != nil && !errors.Is(err, os.ErrNotExist) {
 		return err
 	}
 
diff --git a/pieeprom/pieeprom_test.go b/pieeprom/pieeprom_test.go
index ad25430e14b779d06576d354dbd0393a751dd8bd..f5e572e3461781b49909a1d22d94bb5bc98f31f4 100644
--- a/pieeprom/pieeprom_test.go
+++ b/pieeprom/pieeprom_test.go
@@ -5,8 +5,8 @@ package pieeprom_test
 
 import (
 	"errors"
-	"io/fs"
 	"io/ioutil"
+	"os"
 	"path/filepath"
 	"testing"
 	"time"
@@ -29,7 +29,7 @@ func (s *eepromSuite) TestBuildTimestamp(c *C) {
 
 	// This is what happens on devices without the EEPROM-based firmware.
 	c.Assert(err, NotNil)
-	c.Check(errors.Is(err, fs.ErrNotExist), Equals, true)
+	c.Check(errors.Is(err, os.ErrNotExist), Equals, true)
 	c.Check(ts.IsZero(), Equals, true)
 
 	// Data obtained from a system with firmware programmed with pieeprom-2021-04-29.bin.