-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Search and replace GUID in initramfs script #8356
Conversation
@ghfields Do we need this change for dracut too? People can and do use dracut on Debian/Ubuntu, and it's the initramfs system used on all other major distributions... |
Codecov Report
@@ Coverage Diff @@
## master #8356 +/- ##
==========================================
- Coverage 78.77% 78.65% -0.13%
==========================================
Files 382 380 -2
Lines 117770 115731 -2039
==========================================
- Hits 92775 91028 -1747
+ Misses 24995 24703 -292
Continue to review full report at Codecov.
|
I'm unsure of the Dracut status. Not sure if it imports by GUID or if a root dataset root pool confuses its boot. I've seen initramfs and dracut changes happening in separate pull requests. I'll make sure dracut maintainers are informed about this so they can maintain parity. |
@Conan-Kudo the initial change with regression was only applied to initramfs script, so I don't think we need to change dracut (but I didn't test it). |
Can we get this PR refreshed to address the review feedback. |
Signed-off-by: Garrett Fields <ghfields@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@rlaager Could you review this one liner bugfix? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Richard Laager <rlaager@wiktel.com> Signed-off-by: Garrett Fields <ghfields@gmail.com> Closes #8356
Motivation and Context
Fix a mailing list reported regression (http://list.zfsonlinux.org/pipermail/zfs-discuss/2019-January/033049.html) following #8052 for a user who kept root pool data in the root dataset.
Description
After #8052, ZFS_BOOTFS and ZFS_RPOOL values are reconstructed following a sed command that ensures $pool is the pool name, not a GUID. This broke a user's root pool setup, who used the zfs root dataset as their root. After #8052, initramfs attempted to mount rpool/rpool, instead of just rpool. This is corrected by doing a search and replace for only the GUID value within ZFS_BOOTFS and ZFS_RPOOL instead, leaving everything else alone. As mailing responses indicate, this should not be considered a best practice for root pool layout, however it is valid and did work in the past.
How Has This Been Tested?
Installed Ubuntu 18.04.1 to root of dataset
-- Note: Ubuntu's update-grub added a trailing "/" that needed to be manually removed from kernel line
System booted as expected.
Edited the grub.cfg and replaced kernel line pool name with pool GUID
System booted as expected.
Checked for regressions by moving data from root dataset to "rpool/ROOT/ubuntu" and set the kernel line appropriately.
System booted as expected.
Edited the grub.cfg kernel line to "<GUID>/ROOT/ubuntu"
System booted as expected.
Types of changes
Checklist:
Signed-off-by
.