3

I'm upgrading ubuntu from 13.10 to 14.04, during the upgrade it is asking the following question:

Replace the customized configuration file '/etc/sysctl.conf'?

You will lose any changes made to this configuration file if you choose to replace it with the newer version.

Difference between the files:

--- /etc/sysctl.conf  2014-04-21 21:38:34.970070205 +0530

+++ /etc/sysctl.conf.dpkg-new 2013-04-01 07:55:31.000000000 +0530
@@ -1,6 +1,6 @@
 #
 # /etc/sysctl.conf - Configuration file for setting system variables
-# See /etc/sysctl.d/ for additional system variables
+# See /etc/sysctl.d/ for additional system variables.
 # See sysctl.conf (5) for information.
 #

@@ -58,7 +58,3 @@
 # Log Martian Packets
 #net.ipv4.conf.all.log_martians = 1
 #
-# disable ipv6
-net.ipv6.conf.all.disable_ipv6 = 1
-net.ipv6.conf.default.disable_ipv6 = 1
-net.ipv6.conf.lo.disable_ipv6 = 1

I don't understand what this means, I tried googling for an answer but every post has a different file name for the same question and the answers are varying. Should I keep the file or replace it?

4

During release (or package) upgrades, the package manager usually gives you a few options:

  1. Keep your version.
  2. Keep the package maintainer's version.
  3. Show the difference.
  4. Do an (experimental) three-way merge.
  5. Open a shell.

With (1) and (2), no file is discarded. With (1), the package maintainer's version is saved with the extension dpkg-dist, and with (2), your version is saved with the extension dpkg-old. You're using (3). I have never used the other two, hopefully someone who has will come along and post an answer.

I personally always choose (1), and then manually merge in the changes (if they're worthwile) after upgrade - though I assume (5) can be used to do this.

Note that this prompt comes up only if the file was modified outside the package management system (that is, by a user, like you). So the changes were presumably made by you for a reason, and usually you'd still want those changes around.

  • If you choose to open a shell, you get a root shell (env seems as if you had used sudo -i) and when you type exit you get the same menu options again. I once found this useful; after seeing that /etc/modprobe.d/blacklist.conf had been updated, I made separate blacklist-<module>.conf files for my custom blacklists (additions were made by a script I use to modify the iso at install time - must improve the script so it makes separate files in future). After that, I closed the shell and installed the package maintainer's version of the blacklist. – Zanna Feb 6 at 12:11
1

Over the past few days I've been upgrading a system from 12.10 -> 13.04 -> 13.10 -> 14.04.1LTS, one upgrade per day, and it was only the last stage it complained about sysctl.conf. I think what is going on is that between 13.10 to 14.04 someone added a full stop at the end of one of the comments! That is enough to get it to start complaining.

As muru's answer said, I chose to keep what was already in there (in my case it is net.ipv4.conf.eth0.arp_notify = 1, which I assume Rackspace put there, as the comment above mentions xen).

1

It's a diff output comparing the before and after files.

Lines added in the new file are marked as +, lines removed with -. The other lines starting with a ' ' are just for context.

Specifically it means:

-# See /etc/sysctl.d/ for additional system variables
+# See /etc/sysctl.d/ for additional system variables.

The old version didn't have a full stop at the end of the comment, the new one does. Trivial.

-# disable ipv6
-net.ipv6.conf.all.disable_ipv6 = 1
-net.ipv6.conf.default.disable_ipv6 = 1
-net.ipv6.conf.lo.disable_ipv6 = 1

The old version had lines about disabling ipv6 (https://en.wikipedia.org/wiki/IPv6, How to disable IPv6 in Ubuntu 14.04?) the new one does not have these lines.

You should keep the file unless you want to enable IPv6.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.