1
votes

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.

1
Small typo: U-Boot version is 2016.5, not 2015.5.Timo
You may edit your question for improving it (fix mistakes, append additional information, and so on).Tsyvarev
initramfs has nothing to do with partitions. It's just an archive that is mounted as partition virtually in the kernel.0andriy
@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
initramfs is not a partition. That's my point.0andriy

1 Answers

4
votes

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).