[Bug 2068077] Re: initramfs-tools can't identify root filesystem type

Benjamin Drung 2068077 at bugs.launchpad.net
Wed Jun 5 08:59:29 UTC 2024


Thank you for taking the time to report this bug and helping to make
Ubuntu better. I failed to reproduce the issue. I took a jammy VM and
added a label to the boot device:

```
sudo tune2fs -L somelabel /dev/vda3
```

Configured fstab to look for the label:

```
$ grep -w / /etc/fstab | grep -v ^#
LABEL=somelabel /               ext4    errors=remount-ro 0       1
```

and successfully updated the initrd:

```
$ sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.img-6.5.0-35-generic
```

I checked the call from `resolve_device`:

```
$ blkid -l  -t LABEL=somelabel -o device
/dev/vda3
```

Can you let mkinitramfs run with `set -x` to get some log messages?

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

Title:
  initramfs-tools can't identify root filesystem type

Status in initramfs-tools package in Ubuntu:
  New

Bug description:
  When I attempt to regenerate an initramfs for a new root filsystem,
  update-initramfs is unable to identify the filesystem type of this
  initramfs.

  ```
  # update-initramfs -u
  update-initramfs: Generating /boot/initrd.img-5.15.0-1059-kvm
  W: Couldn't identify type of root file system for fsck hook
  W: mkconf: MD subsystem is not loaded, thus I cannot scan for arrays.
  W: mdadm: failed to auto-generate temporary mdadm.conf file.
  ```

  the mounted filesystem:
  ```
  # cat /proc/mounts | grep xfs
  /dev/sda1 / xfs rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
  ```

  fstab:
  ```
  # cat /etc/fstab | grep xfs
  LABEL=cloudimg-rootfs	/	 xfs    defaults	0 1
  ```

  cmdline:
  ```
  BOOT_IMAGE=/boot/vmlinuz-5.15.0-1059-kvm root=PARTUUID=575c9681-fb9d-457c-a3b5-407dda61a919 ro console=tty1 console=ttyS0 panic=-1
  ```

  
  The failure is in hooks/fsck when it calls resolve_device(). The function returns 1 and echos nothing because it has a LABEL, not a UUID or PARTUUID.

  ProblemType: Bug
  DistroRelease: Ubuntu 22.04
  Package: initramfs-tools 0.140ubuntu13.4
  ProcVersionSignature: Ubuntu 5.15.0-1059.64-kvm 5.15.149
  Uname: Linux 5.15.0-1059-kvm x86_64
  ApportVersion: 2.20.11-0ubuntu82.5
  Architecture: amd64
  CasperMD5CheckResult: unknown
  Date: Wed Jun  5 01:25:29 2024
  PackageArchitecture: all
  ProcEnviron:
   TERM=vt220
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=C.UTF-8
   SHELL=/bin/bash
  SourcePackage: initramfs-tools
  UpgradeStatus: No upgrade log present (probably fresh install)

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




More information about the foundations-bugs mailing list