Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

udev rules and scripts should be (optionally) available in early-boot #34

Open
ziggythehamster opened this issue Jan 18, 2024 · 1 comment

Comments

@ziggythehamster
Copy link
Contributor

There are situations where you require the block device mapping names to exist before you can mount the root volume in the early-boot process, and currently this package cannot be used there because it would require copying in Python.

One solution to this problem would be to rewrite the script to use nvme-cli >= 1.13, where the block device name can be grabbed with nvme amzn id-ctrl /dev/nvme0n1 | grep '^bdev' | awk '{ sub("/dev", ""); print $3 }' (sometimes the block device name begins with /dev, and this script is expected to strip that off). A more complicated Bash-only version could also be written to avoid needing to depend on grep and awk in the compact initrd/initramfs.

This solution works for EL8 and EL9 out of the box because both ship an nvme-cli that is new enough, but AL2023 and earlier ship too old of an nvme-cli for this to work. Since this repo primarily supports AL and AL does not typically support folks using non-default filesystems like ZFS, I figured contributing a PR that made this change would not be terribly useful. Since we need it (and in fact have already had this in place for years), these changes will exist, and I'm happy to strategize some way to make it work more broadly in this package (maybe different RPM specs? an RPM spec that uses macros to choose a strategy based on the OS?)

@ziggythehamster
Copy link
Contributor Author

art19#2 implements this in our fork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant