-
Notifications
You must be signed in to change notification settings - Fork 166
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
Wait for root device inside the initrd script for ISO images #4605
Conversation
Marked as Draft for now because it needs more test... |
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.
So basically, rootdelay=10
really means, "if you could not find the root filesystem, wait 1 second, try again, repeat up to 10 (i.e. rootdelay
) times.
That looks like it should work.
Small cleanliness nit. Would it work if, instead of the heredoc and EOF, we did:
blkid | while read -r line; do
?
@deitch , I agree this form is cleaner but then |
ae7e60e
to
3b8fd07
Compare
When installing EVE on devices with Virtual Media CD/DVD-ROM emulation it can take a few seconds to kernel to detect the installer media device. This is an issue when booting from an ISO because GRUB will boot kernel + initrd, but when initrd script tries to find the installer media's filesystem, the Virtual CD/DVD-ROM can be not yet available. This commit implements a retry mechanism in order to wait for the root device for up to 10 seconds. Signed-off-by: Renê de Souza Pinto <[email protected]>
3b8fd07
to
14d202e
Compare
Reworked this PR:
Tested with QEMU + HP device (through iLO5) |
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.
Fine to merge if tested =)
And I'm still curious, why rootdelay
did not work on the Kernel level...
Because we are using ramdisk in this case (ramdisk is the initial root device), which is already available in memory (so we don't need to wait), that's what was trying to explain... the issue was happening inside the initrd script, when we try to switch root to the installer root device, that cannot be available at the moment (doesn't exist), that's why we need to wait... |
Ah, got it! Thanks! |
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
@rene, do we have any Tests that can check it? Or may we skip the tests? |
Description
When installing EVE on devices with Virtual Media CD/DVD-ROM emulation it can take a few seconds to kernel to detect the installer media device. This is an issue when booting from an ISO because GRUB will boot kernel + initrd, but when initrd script tries to find the installer media's filesystem, the Virtual CD/DVD-ROM can be not yet available. This PR implements a retry mechanism inside the initrd script in order to wait for the root device.