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

Broke my vm #3

Open
farkmun opened this issue May 12, 2022 · 2 comments · May be fixed by #6
Open

Broke my vm #3

farkmun opened this issue May 12, 2022 · 2 comments · May be fixed by #6

Comments

@farkmun
Copy link

farkmun commented May 12, 2022

i ran this line [ sudo sysctl kernel.modules_disabled=1 ] and it broke my vm like you said...how do i fix it?

@lovegitman
Copy link

If executing the sudo sysctl kernel.modules_disabled=1 command has caused issues with your virtual machine (VM), here are some steps you can take to try and fix the problem:

1.Restart the VM: Sometimes, a simple restart can resolve the issue. Use the appropriate command or interface to restart your VM and see if it resolves the problem.

2.Access the VM through a console: If you're unable to access the VM through regular means, try accessing it through a console or a virtualization platform's console interface. This can provide direct access to the VM's terminal, allowing you to make necessary changes.

3.Boot into recovery mode: If a console is not available, you may need to boot the VM into recovery mode. The steps for entering recovery mode can vary depending on the virtualization platform you are using. Check the documentation or support resources for your specific virtualization software to learn how to boot into recovery mode.

4.Edit the configuration file: Once you have access to the VM's terminal, edit the /etc/sysctl.conf file to remove or comment out the line that caused the issue. Use a text editor, such as nano or vi, to modify the file.
sudo nano /etc/sysctl.conf

Locate the line that contains kernel.modules_disabled=1 and either delete the line or comment it out by adding a # at the beginning of the line. Save the file and exit the text editor.

5.Apply the changes: After editing the /etc/sysctl.conf file, you need to apply the changes. Run the following command to reload the sysctl settings:
sudo sysctl -p
This command will reload the configuration file and apply the changes.

Restart the VM: Once you have made the necessary changes and applied them, restart the VM to ensure that the modifications take effect.

6.By following these steps, you should be able to fix the issue caused by the sudo sysctl kernel.modules_disabled=1 command. Remember to use caution when modifying system configuration files to avoid unintended consequences.

@4yman-0
Copy link

4yman-0 commented Jun 18, 2024

How did your VM break?

Edit: sudo sysctl kernel.modules_disabled=1 is literally sudo disable Linux modules. You will have to run a recovery environment to probably chroot and set it back to sudo sysctl kernel.modules_disabled=0

@4yman-0 4yman-0 linked a pull request Sep 1, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

3 participants