Suggestion:

```
diff --git a/hooks/fsck b/hooks/fsck
index f6348e81..5e5b6aae 100755
--- a/hooks/fsck
+++ b/hooks/fsck
@@ -44,6 +44,7 @@ _read_fstab_entry () {
 # Find a specific fstab entry and print its type (if found, and pass != 0)
 # $1=mountpoint
 get_fsck_type_fstab () {
+       local device
        eval "$(_read_fstab_entry "$1")"
 
        # Not found by default.
@@ -51,9 +52,9 @@ get_fsck_type_fstab () {
                # Ignore filesystem type for /, as it is not available and
                # therefore never used at boot time
                if [ "${MNT_DIR}" = "/" ] || [ "${MNT_TYPE}" = "auto" ]; then
-                       MNT_FSNAME="$(resolve_device "${MNT_FSNAME}")"
-                       if ! get_fstype "${MNT_FSNAME}"; then
-                               echo "W: Couldn't identify type of $2 file 
system for fsck hook" >&2
+                       device="$(resolve_device "${MNT_FSNAME}")"
+                       if ! get_fstype "${device}"; then
+                               echo "W: Couldn't identify type of $2 file 
system '$MNT_FSNAME' for fsck hook" >&2
                        fi
                else
                        echo "${MNT_TYPE}"
```

This would change the error message to:

```
$ sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.img-6.8.0-22-generic
W: Couldn't identify type of root file system 'LABEL=foo' for fsck hook
```

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2068077

Title:
  initramfs-tools reports "can't identify type of root filesystem" when
  label is missing

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/2068077/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to