简体   繁体   中英

Why can't I specify my rootfs with PARTUUID when I use initramfs?

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM