m/n/installer: wait for ESP block device to show up

In real-world hardware disks do not always show up before the kernel
launches the init process. Wait up to 30s for the ESP to show up before
aborting because of that.

Change-Id: I3f7972e699a06d6f9d0333fe0ae3355ae3ce9c73
Reviewed-on: https://review.monogon.dev/c/monogon/+/513
Reviewed-by: Mateusz Zalega <mateusz@monogon.tech>
diff --git a/metropolis/pkg/sysfs/block.go b/metropolis/pkg/sysfs/block.go
index f253777..9f9ebf8 100644
--- a/metropolis/pkg/sysfs/block.go
+++ b/metropolis/pkg/sysfs/block.go
@@ -20,6 +20,7 @@
 package sysfs
 
 import (
+	"errors"
 	"fmt"
 	"os"
 	"path/filepath"
@@ -55,6 +56,8 @@
 	return m, nil
 }
 
+var ErrDevNotFound = errors.New("device not found")
+
 // DeviceByPartUUID returns a block device name, given its corresponding
 // partition UUID.
 func DeviceByPartUUID(uuid string) (string, error) {
@@ -65,7 +68,7 @@
 	if bdev, ok := pm[strings.ToLower(uuid)]; ok {
 		return bdev, nil
 	}
-	return "", fmt.Errorf("couldn't find a block device matching the partition UUID %q", uuid)
+	return "", ErrDevNotFound
 }
 
 // ParentBlockDevice transforms the block device name of a partition, eg