arch-install-scripts icon indicating copy to clipboard operation
arch-install-scripts copied to clipboard

add blkid method for uuid

Open ElFronthe opened this issue 2 years ago • 6 comments

Hello, using this script, we periodically encountered the problem that "uuid" was not defined on some sections. In the process of studying the problem, it became clear that partition have uuid, but lsblk cannot determine it and gives an empty string. At the same time, BLKID handles uuid detection, I suggest adding BLKID as a fallback way to get uuid to minimize situations when uuid is present but cannot be detected.

ElFronthe avatar Oct 03 '22 06:10 ElFronthe

Did you run genfstab inside arch-chroot?

Foxboron avatar Oct 03 '22 09:10 Foxboron

We use this script not only for installing archlinux we install ubuntu debian centos hosts with arch style installation, so we run this script inside custom livecd with rocky linux 8 not in chroot. we test this changes and problem goes away. image situation when no uuid displays look like this, sda2 have ext4 fs and mounted with mount /dev/sda2 /mnt/boot command.

ElFronthe avatar Oct 03 '22 09:10 ElFronthe

You can use uuid=$(blkid -s UUID -o value "$1" 2>/dev/null) to get UUID, which I believe is simpler and more readable. Also, maybe use [[ ]] instead since it's used all other places?

YHNdnzj avatar Oct 03 '22 15:10 YHNdnzj

thanks for the clarifications on the blkid syntax, your example is much more concise.

ElFronthe avatar Oct 04 '22 11:10 ElFronthe

However, using mount --make-private instead of a tmpfs for /run as suggested in https://github.com/archlinux/arch-install-scripts/issues/24 might be a better fix for this problem. Could you please test that with /run/udev present in chroot, lsblk can get the uuids as well?

thanks for the clarifications on the blkid syntax, your example is much more concise.

— Reply to this email directly, view it on GitHub https://github.com/archlinux/arch-install-scripts/pull/26#issuecomment-1266857638, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG6E7V4XHE3GGMKB5P6RABTWBQJVZANCNFSM6AAAAAAQ3JIBMY . You are receiving this because you commented.Message ID: @.***>

YHNdnzj avatar Oct 08 '22 16:10 YHNdnzj

I will try to get this bug again. It happen not on all hardware.

ElFronthe avatar Oct 10 '22 15:10 ElFronthe

Closing in favour of the --make-private implementation.

https://github.com/archlinux/arch-install-scripts/pull/52

Foxboron avatar Mar 26 '23 18:03 Foxboron