[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#801154: [debian] initramfs-tools: add PARTUUID to resolve_device



Adding more details, for context:

bbb with: U-Boot 2015.10-rc4 + single ext4 gpt partition + without
PARTUUID patch:

Begin: Running /scripts/local-premount ... done.
Begin: Checking root file system ... fsck from util-linux 2.25.2
rootfs: clean, 14370/972944 files, 173063/3889275 blocks
done.
mount: mounting PARTUUID=63a4b660-79ee-4fc5-a51f-65a7ffc27c5c on /root
failed: No such file or directory
done.
Target filesystem doesn't have requested /sbin/init.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... mount: mounting /dev on
/root/dev failed: No such file or directory
done.
No init found. Try passing init= bootarg.
modprobe: module i8042 not found in modules.dep
modprobe: module ehci-orion not found in modules.dep
modprobe: module uhci-hcd not found in modules.dep
modprobe: module ohci-hcd not found in modules.dep


BusyBox v1.22.1 (Debian 1:1.22.0-9+deb8u1) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/bin/sh: can't access tty; job control turned off
(initramfs) cat /proc/cmdline
console=ttyO0,115200n8
root=PARTUUID=63a4b660-79ee-4fc5-a51f-65a7ffc27c5c ro rootfstype=ext4
rootwait

Note: udev only creates "partuuid" for gpt partitions:

/dev/disk/by-partuuid/<uuid>

So this fix will work for any omap4+ bootrom
(omap4/omap5/am33x/am4x/am5x device) with a gpt partition.

But while testing this late last night on imx6 devices yesterday i
noticed they won't boot with a gpt partition. (most imx6 devices have
multiple mmcblk devices so the partuuid=<uuid> passing would be
beneficial)

So we'd also need to fix systemd/udev and drop the "gpt" requirement...

non-gpt-partition:
PARTUUID=0009729a-01

gpt-partition:
PARTUUID=63a4b660-79ee-4fc5-a51f-65a7ffc27c5c

https://github.com/systemd/systemd/blob/master/rules/60-persistent-storage.rules#L76-L77

# by-partlabel/by-partuuid links (partition metadata)
ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_UUID}=="?*",
SYMLINK+="disk/by-partuuid/$env{ID_PART_ENTRY_UUID}"

Otherwise we'd need to somehow convert PARTUUID=<uuid> to
UUID=<uuid_other> in the initramfs for none-gpt partitions...

As a quick hack i was thinking "UUID=$(blkid | grep <non-gpt-uuid> |
awk <x>)" in scripts/function but that looked ugly...

Regards,

-- 
Robert Nelson
https://rcn-ee.com/


Reply to: