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

./install.sh install fails to install kernel randomly #644

Open
Slaviusz opened this issue Nov 9, 2022 · 9 comments
Open

./install.sh install fails to install kernel randomly #644

Slaviusz opened this issue Nov 9, 2022 · 9 comments
Labels
bug Something isn't working

Comments

@Slaviusz
Copy link
Contributor

Slaviusz commented Nov 9, 2022

OS: Gentoo amd64

Using the ./install.sh install command randomly results in not isntalling the kernel after compilation. To me it happens roughly 1/8 times. No error is written to the console. Repeated run with no change results in kernel being installed correctly.

I'll try to investigate further.

...
 -> The installation process will run the following commands:
    # copy the patched and compiled sources to /usr/src/linux-6.1.0-rc4-tkg-bore-llvm
    sudo make modules_install
    sudo make install
    sudo dracut --force --hostonly --zstd --kver 6.1.0-rc4-tkg-bore-llvm
    sudo grub-mkconfig -o /boot/grub/grub.cfg
 -> Note: Uninstalling requires manual intervention, use './install.sh uninstall-help' for more information.
Continue ? Y/[n]: Y
 -> exit cleanup done
@seankhl
Copy link

seankhl commented Nov 12, 2022

This happens if I type anything besides a Y at any point between the "Continue ?" prompt and the previous one, i.e. right before the kernel starts building. Sometimes I accidentally hit a key on the keyboard while the kernel is building, and then, no matter what I do, this prompt results in triggering the default selection of n.

@Siegfried512
Copy link

Yes, I suffer from this too.

@AdelKS
Copy link
Collaborator

AdelKS commented Nov 29, 2022

I'll see what I can do, for sure there must be a way to discard any earlier input before prompting

@Slaviusz
Copy link
Contributor Author

I have seen this being solved in some scripts before but I can't recall where.

I tried this and it worked on GNU bash, version 5.2.9(1)-release (x86_64-apple-darwin22.1.0):

clear_stdin()
(
    old_tty_settings=`stty -g`
    stty -icanon min 0 time 0

    while read none; do :; done

    stty $old_tty_settings
)

@Siegfried512
Copy link

Thank you!

@Siegfried512
Copy link

Now I collected on behalf of the user, and I did not have this problem.

@Tk-Glitch Tk-Glitch added the bug Something isn't working label Dec 1, 2022
@AdelKS
Copy link
Collaborator

AdelKS commented May 29, 2023

The problem with flushing stdin is that approaches like yes "" | ./install.sh install wouldn't work any longer, and it's used by some people and our pipeline here 🤔

@tg12
Copy link

tg12 commented Feb 26, 2024

Yes I have just found this and I have this issue too

@Slaviusz
Copy link
Contributor Author

@AdelKS Regarding scripted pipeline I beleive one could use expect or libexpect for that matter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants