1

I have an embedded ARM board and am experimenting with initramfs.

Since my root filesystem is EXT4 and the EXT4 driver is built into the kernel (not compiled as a module), I can directly boot the kernel and mount the root filesystem, no initramfs required. Without initramfs, the kernel won't recognize filesystem UUIDs, of course, hence I specified root with the partition identifier PARTUUID, as described in the kernel docs. The boot argument in question looks like this: root=PARTUUID=7acc80f1-01 This works perfectly fine.

Now, when I try to boot the same kernel version with an initramfs, the system won't boot. It complains the root device cannot be found. When I change my boot arguments to use the filesystem UUID intstead of the PARTUUID, then it works again: root=UUID=c9fd552c-921c-4ddb-bb46-fe557943d311 But why is that? Why would using an initramfs lead to less boot options when the kernel supports PARTUUID natively in the first place?

I'd like to specify root in unique way that works in both setups, regardless of whether an initramfs is used or not. Device names such as /dev/sda1 are not an option as they can vary during boot (multiple disks attached).

Any clues?

Thanks and regards,

Timo

P.S: The kernel version is mainline 4.4.16. U-Boot is 2015.5. Distro is Debian 8.

Timo
  • 73
  • 8
  • Small typo: U-Boot version is 2016.5, not 2015.5. – Timo Aug 05 '16 at 09:11
  • You may [edit] your question for improving it (fix mistakes, append additional information, and so on). – Tsyvarev Aug 05 '16 at 18:49
  • `initramfs` has nothing to do with partitions. It's just an archive that is mounted as partition virtually in the kernel. – 0andriy Aug 11 '16 at 20:32
  • @AndyShevchenko: I don't really get what you're trying to say. initramfs provides early userspace to mount the root filesystem (useful for modular kernels when certain drivers are required to actually access the disk/filesystem). In that respect, it deals with devices/partitions/filesystems. But anyway, I figured out the issue myself. It's a known Debian issue, see my answer below. – Timo Aug 15 '16 at 09:20
  • initramfs is not a partition. That's my point. – 0andriy Aug 15 '16 at 11:16
  • Ok. Seems like a misunderstanding then. The issue was about mounting the *root* partition/filesystem - either directly or via an initramfs. But I never meant to imply that initramfs is a partition or that I wanted to mount the initramfs archive. – Timo Aug 15 '16 at 12:01

1 Answers1

4

Ok, I figured it out now. It's a known issue in Debian's initramfs-tools package: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=801154

The script used to mount the root filesystem by the initramfs doesn't support PARTUUID but only UUID. This has been resolved in the testing distribution, but not in current stable (Jessie).

Timo
  • 73
  • 8