How to restore Ubuntu18.04 network kernel parameter?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I messed up the kernel parameters and now no services except SSH could be started, does anybody know how to restore those network or kernel parameter? I don't want to re-install the system, Thanks in advance.
networking kernel
add a comment |
I messed up the kernel parameters and now no services except SSH could be started, does anybody know how to restore those network or kernel parameter? I don't want to re-install the system, Thanks in advance.
networking kernel
1
How can we know what method use used to disable or remove the kernel parameters. Did you disable it via a grub change, package removal, disable services or other. Look at yourhistory
would be what I would do first, then looking at logs (eg. apt) to see what (if anything) you removed; or if you have a clue on when, looking for files modified in that period etc. When you make a change, don't you leave breadcrumbs for yourself in case something doesn't work as expected? I'd check those notes.
– guiverc
Mar 28 at 3:25
i changed them via sysctl and sysctl.conf before, and then .bash_history was cleared afterwards. but then i found that some services were not able to be started. my question is is there any methods to restore these kernel parameters as they were right after the system was installed. i didn't change any configurations in grub and it's nothing to do with package removing ...
– wrl
Mar 28 at 6:36
add a comment |
I messed up the kernel parameters and now no services except SSH could be started, does anybody know how to restore those network or kernel parameter? I don't want to re-install the system, Thanks in advance.
networking kernel
I messed up the kernel parameters and now no services except SSH could be started, does anybody know how to restore those network or kernel parameter? I don't want to re-install the system, Thanks in advance.
networking kernel
networking kernel
asked Mar 28 at 2:52
wrlwrl
32
32
1
How can we know what method use used to disable or remove the kernel parameters. Did you disable it via a grub change, package removal, disable services or other. Look at yourhistory
would be what I would do first, then looking at logs (eg. apt) to see what (if anything) you removed; or if you have a clue on when, looking for files modified in that period etc. When you make a change, don't you leave breadcrumbs for yourself in case something doesn't work as expected? I'd check those notes.
– guiverc
Mar 28 at 3:25
i changed them via sysctl and sysctl.conf before, and then .bash_history was cleared afterwards. but then i found that some services were not able to be started. my question is is there any methods to restore these kernel parameters as they were right after the system was installed. i didn't change any configurations in grub and it's nothing to do with package removing ...
– wrl
Mar 28 at 6:36
add a comment |
1
How can we know what method use used to disable or remove the kernel parameters. Did you disable it via a grub change, package removal, disable services or other. Look at yourhistory
would be what I would do first, then looking at logs (eg. apt) to see what (if anything) you removed; or if you have a clue on when, looking for files modified in that period etc. When you make a change, don't you leave breadcrumbs for yourself in case something doesn't work as expected? I'd check those notes.
– guiverc
Mar 28 at 3:25
i changed them via sysctl and sysctl.conf before, and then .bash_history was cleared afterwards. but then i found that some services were not able to be started. my question is is there any methods to restore these kernel parameters as they were right after the system was installed. i didn't change any configurations in grub and it's nothing to do with package removing ...
– wrl
Mar 28 at 6:36
1
1
How can we know what method use used to disable or remove the kernel parameters. Did you disable it via a grub change, package removal, disable services or other. Look at your
history
would be what I would do first, then looking at logs (eg. apt) to see what (if anything) you removed; or if you have a clue on when, looking for files modified in that period etc. When you make a change, don't you leave breadcrumbs for yourself in case something doesn't work as expected? I'd check those notes.– guiverc
Mar 28 at 3:25
How can we know what method use used to disable or remove the kernel parameters. Did you disable it via a grub change, package removal, disable services or other. Look at your
history
would be what I would do first, then looking at logs (eg. apt) to see what (if anything) you removed; or if you have a clue on when, looking for files modified in that period etc. When you make a change, don't you leave breadcrumbs for yourself in case something doesn't work as expected? I'd check those notes.– guiverc
Mar 28 at 3:25
i changed them via sysctl and sysctl.conf before, and then .bash_history was cleared afterwards. but then i found that some services were not able to be started. my question is is there any methods to restore these kernel parameters as they were right after the system was installed. i didn't change any configurations in grub and it's nothing to do with package removing ...
– wrl
Mar 28 at 6:36
i changed them via sysctl and sysctl.conf before, and then .bash_history was cleared afterwards. but then i found that some services were not able to be started. my question is is there any methods to restore these kernel parameters as they were right after the system was installed. i didn't change any configurations in grub and it's nothing to do with package removing ...
– wrl
Mar 28 at 6:36
add a comment |
2 Answers
2
active
oldest
votes
Since you didn't specify which parameters you changed in sysctl.conf, it makes it somewhat difficult, but here's the basic method...
- boot to the GRUB menu
- choose Advanced Options
- choose Recovery mode
- choose Root access
- at the # prompt, type:
sudo mount -o rw,remount /
sudo pico /etc/sysctl.conf
- restore the values that you changed
- if you need the default values, tell us which parameters you changed
- save the file
reboot
Update #1:
Reinstalled Ubuntu. Sysctl.conf restored. System is fully operational.
thanks! but i did forget what parameters i changed, and actually i used sysctl -w method to change some kernel parameters. now i just wonder would i get some new default kernel parameters if i upgrade the kernel ...
– wrl
Mar 29 at 3:04
@wrl no, you won't get a new sysctl.conf file with just a new kernel, but you probably will if you upgrade to 18.10. You might see if you can get a virgin sysctl.conf from the Ubuntu Live DVD/USB. Lesson learned... always backup sysctl.conf before making such massive and damaging changes...
– heynnema
Mar 29 at 13:02
@wrl status please...
– heynnema
Apr 3 at 2:56
unsolved, i'm checking all kernel parameters now, up to 900+...
– wrl
Apr 3 at 3:10
@wrl Why don't you just reinstall 18.04, or upgrade to 18.10?
– heynnema
Apr 3 at 13:22
|
show 3 more comments
It seems to me that your best chance is to install a fresh copy of /etc/sysctl.conf
You should be able to dig that out somehow from the distribution.
When you have a copy of this file, then you need to copy it. THe easy way would be a USB stick, but maybe your system is too damaged to do that ? If so, you could make a bootable USB stick with the copy and mount the file systems of your damaged system and copy the file. I have in the past used the refind boot manager to do something like this. Once booted from the refind usb you need to do some chrooting and manual mounting to get to your system partitions. But it is doable. If you go down that path then I probably have written down the procedure somewhere for my own use if needed.
https://www.rodsbooks.com/refind/installing.html
If you dont want to use refind, there are other ways to make a bootable ubuntu usb - e.g.. :
https://tutorials.ubuntu.com/tutorial/tutorial-create-a-usb-stick-on-ubuntu#0
actually i did this to recovery the sysctl.conf "apt-get -o Dpkg::Options::="--force-confmiss" -y install --reinstall procps", but then i realized that not all kernel parameters worte in the file. so something i changed by "sysctl -w" and "sysctl -p" cannot be reset by restoring the sysctl.conf. so now the question is how to fine tune all of the kernel parameters. what a terrible task ~
– wrl
Apr 1 at 1:03
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1129289%2fhow-to-restore-ubuntu18-04-network-kernel-parameter%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Since you didn't specify which parameters you changed in sysctl.conf, it makes it somewhat difficult, but here's the basic method...
- boot to the GRUB menu
- choose Advanced Options
- choose Recovery mode
- choose Root access
- at the # prompt, type:
sudo mount -o rw,remount /
sudo pico /etc/sysctl.conf
- restore the values that you changed
- if you need the default values, tell us which parameters you changed
- save the file
reboot
Update #1:
Reinstalled Ubuntu. Sysctl.conf restored. System is fully operational.
thanks! but i did forget what parameters i changed, and actually i used sysctl -w method to change some kernel parameters. now i just wonder would i get some new default kernel parameters if i upgrade the kernel ...
– wrl
Mar 29 at 3:04
@wrl no, you won't get a new sysctl.conf file with just a new kernel, but you probably will if you upgrade to 18.10. You might see if you can get a virgin sysctl.conf from the Ubuntu Live DVD/USB. Lesson learned... always backup sysctl.conf before making such massive and damaging changes...
– heynnema
Mar 29 at 13:02
@wrl status please...
– heynnema
Apr 3 at 2:56
unsolved, i'm checking all kernel parameters now, up to 900+...
– wrl
Apr 3 at 3:10
@wrl Why don't you just reinstall 18.04, or upgrade to 18.10?
– heynnema
Apr 3 at 13:22
|
show 3 more comments
Since you didn't specify which parameters you changed in sysctl.conf, it makes it somewhat difficult, but here's the basic method...
- boot to the GRUB menu
- choose Advanced Options
- choose Recovery mode
- choose Root access
- at the # prompt, type:
sudo mount -o rw,remount /
sudo pico /etc/sysctl.conf
- restore the values that you changed
- if you need the default values, tell us which parameters you changed
- save the file
reboot
Update #1:
Reinstalled Ubuntu. Sysctl.conf restored. System is fully operational.
thanks! but i did forget what parameters i changed, and actually i used sysctl -w method to change some kernel parameters. now i just wonder would i get some new default kernel parameters if i upgrade the kernel ...
– wrl
Mar 29 at 3:04
@wrl no, you won't get a new sysctl.conf file with just a new kernel, but you probably will if you upgrade to 18.10. You might see if you can get a virgin sysctl.conf from the Ubuntu Live DVD/USB. Lesson learned... always backup sysctl.conf before making such massive and damaging changes...
– heynnema
Mar 29 at 13:02
@wrl status please...
– heynnema
Apr 3 at 2:56
unsolved, i'm checking all kernel parameters now, up to 900+...
– wrl
Apr 3 at 3:10
@wrl Why don't you just reinstall 18.04, or upgrade to 18.10?
– heynnema
Apr 3 at 13:22
|
show 3 more comments
Since you didn't specify which parameters you changed in sysctl.conf, it makes it somewhat difficult, but here's the basic method...
- boot to the GRUB menu
- choose Advanced Options
- choose Recovery mode
- choose Root access
- at the # prompt, type:
sudo mount -o rw,remount /
sudo pico /etc/sysctl.conf
- restore the values that you changed
- if you need the default values, tell us which parameters you changed
- save the file
reboot
Update #1:
Reinstalled Ubuntu. Sysctl.conf restored. System is fully operational.
Since you didn't specify which parameters you changed in sysctl.conf, it makes it somewhat difficult, but here's the basic method...
- boot to the GRUB menu
- choose Advanced Options
- choose Recovery mode
- choose Root access
- at the # prompt, type:
sudo mount -o rw,remount /
sudo pico /etc/sysctl.conf
- restore the values that you changed
- if you need the default values, tell us which parameters you changed
- save the file
reboot
Update #1:
Reinstalled Ubuntu. Sysctl.conf restored. System is fully operational.
edited Apr 8 at 7:26
answered Mar 28 at 14:32
heynnemaheynnema
21.6k32361
21.6k32361
thanks! but i did forget what parameters i changed, and actually i used sysctl -w method to change some kernel parameters. now i just wonder would i get some new default kernel parameters if i upgrade the kernel ...
– wrl
Mar 29 at 3:04
@wrl no, you won't get a new sysctl.conf file with just a new kernel, but you probably will if you upgrade to 18.10. You might see if you can get a virgin sysctl.conf from the Ubuntu Live DVD/USB. Lesson learned... always backup sysctl.conf before making such massive and damaging changes...
– heynnema
Mar 29 at 13:02
@wrl status please...
– heynnema
Apr 3 at 2:56
unsolved, i'm checking all kernel parameters now, up to 900+...
– wrl
Apr 3 at 3:10
@wrl Why don't you just reinstall 18.04, or upgrade to 18.10?
– heynnema
Apr 3 at 13:22
|
show 3 more comments
thanks! but i did forget what parameters i changed, and actually i used sysctl -w method to change some kernel parameters. now i just wonder would i get some new default kernel parameters if i upgrade the kernel ...
– wrl
Mar 29 at 3:04
@wrl no, you won't get a new sysctl.conf file with just a new kernel, but you probably will if you upgrade to 18.10. You might see if you can get a virgin sysctl.conf from the Ubuntu Live DVD/USB. Lesson learned... always backup sysctl.conf before making such massive and damaging changes...
– heynnema
Mar 29 at 13:02
@wrl status please...
– heynnema
Apr 3 at 2:56
unsolved, i'm checking all kernel parameters now, up to 900+...
– wrl
Apr 3 at 3:10
@wrl Why don't you just reinstall 18.04, or upgrade to 18.10?
– heynnema
Apr 3 at 13:22
thanks! but i did forget what parameters i changed, and actually i used sysctl -w method to change some kernel parameters. now i just wonder would i get some new default kernel parameters if i upgrade the kernel ...
– wrl
Mar 29 at 3:04
thanks! but i did forget what parameters i changed, and actually i used sysctl -w method to change some kernel parameters. now i just wonder would i get some new default kernel parameters if i upgrade the kernel ...
– wrl
Mar 29 at 3:04
@wrl no, you won't get a new sysctl.conf file with just a new kernel, but you probably will if you upgrade to 18.10. You might see if you can get a virgin sysctl.conf from the Ubuntu Live DVD/USB. Lesson learned... always backup sysctl.conf before making such massive and damaging changes...
– heynnema
Mar 29 at 13:02
@wrl no, you won't get a new sysctl.conf file with just a new kernel, but you probably will if you upgrade to 18.10. You might see if you can get a virgin sysctl.conf from the Ubuntu Live DVD/USB. Lesson learned... always backup sysctl.conf before making such massive and damaging changes...
– heynnema
Mar 29 at 13:02
@wrl status please...
– heynnema
Apr 3 at 2:56
@wrl status please...
– heynnema
Apr 3 at 2:56
unsolved, i'm checking all kernel parameters now, up to 900+...
– wrl
Apr 3 at 3:10
unsolved, i'm checking all kernel parameters now, up to 900+...
– wrl
Apr 3 at 3:10
@wrl Why don't you just reinstall 18.04, or upgrade to 18.10?
– heynnema
Apr 3 at 13:22
@wrl Why don't you just reinstall 18.04, or upgrade to 18.10?
– heynnema
Apr 3 at 13:22
|
show 3 more comments
It seems to me that your best chance is to install a fresh copy of /etc/sysctl.conf
You should be able to dig that out somehow from the distribution.
When you have a copy of this file, then you need to copy it. THe easy way would be a USB stick, but maybe your system is too damaged to do that ? If so, you could make a bootable USB stick with the copy and mount the file systems of your damaged system and copy the file. I have in the past used the refind boot manager to do something like this. Once booted from the refind usb you need to do some chrooting and manual mounting to get to your system partitions. But it is doable. If you go down that path then I probably have written down the procedure somewhere for my own use if needed.
https://www.rodsbooks.com/refind/installing.html
If you dont want to use refind, there are other ways to make a bootable ubuntu usb - e.g.. :
https://tutorials.ubuntu.com/tutorial/tutorial-create-a-usb-stick-on-ubuntu#0
actually i did this to recovery the sysctl.conf "apt-get -o Dpkg::Options::="--force-confmiss" -y install --reinstall procps", but then i realized that not all kernel parameters worte in the file. so something i changed by "sysctl -w" and "sysctl -p" cannot be reset by restoring the sysctl.conf. so now the question is how to fine tune all of the kernel parameters. what a terrible task ~
– wrl
Apr 1 at 1:03
add a comment |
It seems to me that your best chance is to install a fresh copy of /etc/sysctl.conf
You should be able to dig that out somehow from the distribution.
When you have a copy of this file, then you need to copy it. THe easy way would be a USB stick, but maybe your system is too damaged to do that ? If so, you could make a bootable USB stick with the copy and mount the file systems of your damaged system and copy the file. I have in the past used the refind boot manager to do something like this. Once booted from the refind usb you need to do some chrooting and manual mounting to get to your system partitions. But it is doable. If you go down that path then I probably have written down the procedure somewhere for my own use if needed.
https://www.rodsbooks.com/refind/installing.html
If you dont want to use refind, there are other ways to make a bootable ubuntu usb - e.g.. :
https://tutorials.ubuntu.com/tutorial/tutorial-create-a-usb-stick-on-ubuntu#0
actually i did this to recovery the sysctl.conf "apt-get -o Dpkg::Options::="--force-confmiss" -y install --reinstall procps", but then i realized that not all kernel parameters worte in the file. so something i changed by "sysctl -w" and "sysctl -p" cannot be reset by restoring the sysctl.conf. so now the question is how to fine tune all of the kernel parameters. what a terrible task ~
– wrl
Apr 1 at 1:03
add a comment |
It seems to me that your best chance is to install a fresh copy of /etc/sysctl.conf
You should be able to dig that out somehow from the distribution.
When you have a copy of this file, then you need to copy it. THe easy way would be a USB stick, but maybe your system is too damaged to do that ? If so, you could make a bootable USB stick with the copy and mount the file systems of your damaged system and copy the file. I have in the past used the refind boot manager to do something like this. Once booted from the refind usb you need to do some chrooting and manual mounting to get to your system partitions. But it is doable. If you go down that path then I probably have written down the procedure somewhere for my own use if needed.
https://www.rodsbooks.com/refind/installing.html
If you dont want to use refind, there are other ways to make a bootable ubuntu usb - e.g.. :
https://tutorials.ubuntu.com/tutorial/tutorial-create-a-usb-stick-on-ubuntu#0
It seems to me that your best chance is to install a fresh copy of /etc/sysctl.conf
You should be able to dig that out somehow from the distribution.
When you have a copy of this file, then you need to copy it. THe easy way would be a USB stick, but maybe your system is too damaged to do that ? If so, you could make a bootable USB stick with the copy and mount the file systems of your damaged system and copy the file. I have in the past used the refind boot manager to do something like this. Once booted from the refind usb you need to do some chrooting and manual mounting to get to your system partitions. But it is doable. If you go down that path then I probably have written down the procedure somewhere for my own use if needed.
https://www.rodsbooks.com/refind/installing.html
If you dont want to use refind, there are other ways to make a bootable ubuntu usb - e.g.. :
https://tutorials.ubuntu.com/tutorial/tutorial-create-a-usb-stick-on-ubuntu#0
edited Mar 29 at 10:57
answered Mar 29 at 10:46
storestyggeulvstorestyggeulv
214
214
actually i did this to recovery the sysctl.conf "apt-get -o Dpkg::Options::="--force-confmiss" -y install --reinstall procps", but then i realized that not all kernel parameters worte in the file. so something i changed by "sysctl -w" and "sysctl -p" cannot be reset by restoring the sysctl.conf. so now the question is how to fine tune all of the kernel parameters. what a terrible task ~
– wrl
Apr 1 at 1:03
add a comment |
actually i did this to recovery the sysctl.conf "apt-get -o Dpkg::Options::="--force-confmiss" -y install --reinstall procps", but then i realized that not all kernel parameters worte in the file. so something i changed by "sysctl -w" and "sysctl -p" cannot be reset by restoring the sysctl.conf. so now the question is how to fine tune all of the kernel parameters. what a terrible task ~
– wrl
Apr 1 at 1:03
actually i did this to recovery the sysctl.conf "apt-get -o Dpkg::Options::="--force-confmiss" -y install --reinstall procps", but then i realized that not all kernel parameters worte in the file. so something i changed by "sysctl -w" and "sysctl -p" cannot be reset by restoring the sysctl.conf. so now the question is how to fine tune all of the kernel parameters. what a terrible task ~
– wrl
Apr 1 at 1:03
actually i did this to recovery the sysctl.conf "apt-get -o Dpkg::Options::="--force-confmiss" -y install --reinstall procps", but then i realized that not all kernel parameters worte in the file. so something i changed by "sysctl -w" and "sysctl -p" cannot be reset by restoring the sysctl.conf. so now the question is how to fine tune all of the kernel parameters. what a terrible task ~
– wrl
Apr 1 at 1:03
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1129289%2fhow-to-restore-ubuntu18-04-network-kernel-parameter%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
How can we know what method use used to disable or remove the kernel parameters. Did you disable it via a grub change, package removal, disable services or other. Look at your
history
would be what I would do first, then looking at logs (eg. apt) to see what (if anything) you removed; or if you have a clue on when, looking for files modified in that period etc. When you make a change, don't you leave breadcrumbs for yourself in case something doesn't work as expected? I'd check those notes.– guiverc
Mar 28 at 3:25
i changed them via sysctl and sysctl.conf before, and then .bash_history was cleared afterwards. but then i found that some services were not able to be started. my question is is there any methods to restore these kernel parameters as they were right after the system was installed. i didn't change any configurations in grub and it's nothing to do with package removing ...
– wrl
Mar 28 at 6:36