Results 1 to 6 of 6

Thread: Make changes to network adapter persistent

  1. #1
    Join Date
    Oct 2007
    Beans
    5
    Distro
    Ubuntu 10.04 Lucid Lynx

    [Solved] Make changes to network adapter persistent

    I have a crappy cat5 cable that only works at 10BaseT settings on any nic.
    I have a gigabit nic which I configure using;

    ethtool -s eth2 speed 10 autoneg off
    Problem is that this setting doesn't stick after a reboot. How do I make the change permanent?

    Thanks.
    Last edited by nomaan; May 19th, 2010 at 07:16 PM.

  2. #2
    Join Date
    Aug 2005
    Location
    South Carolina, USA
    Beans
    25,241
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Make changes to network adapter persistent

    Code:
    sudo gedit /etc/rc.local
    Add a line above 'exit 0':
    Code:
    ethtool -s eth2 speed 10 autoneg off
    Proofread, save and close gedit. You should be all set.
    "Oh, Ubuntu, you are my favorite Linux-based operating system" --Dr. Sheldon Cooper, Ph.D., Sc.D.

  3. #3
    Join Date
    Oct 2007
    Beans
    5
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Make changes to network adapter persistent

    Didn't work. Does this command in rc.local run with root privileges?


    #!/bin/sh -e
    #
    # rc.local
    #
    # This script is executed at the end of each multiuser runlevel.
    # Make sure that the script will "exit 0" on success or any other
    # value on error.
    #
    # In order to enable or disable this script just change the execution
    # bits.
    #
    # By default this script does nothing.
    ethtool -s eth2 speed 10 autoneg off
    exit 0


    EDIT -- Oh **** . I just noticed the 7.04 FF on the left side. I'm on 10.04 these days. Don't know if that made a difference ... updating ...
    Last edited by nomaan; May 13th, 2010 at 02:50 PM.

  4. #4
    Join Date
    Aug 2005
    Location
    South Carolina, USA
    Beans
    25,241
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Make changes to network adapter persistent

    Does this command in rc.local run with root privileges?
    Yes, indeed.
    I'm on 10.04 these days. Don't know if that made a difference
    It makes none; rc.local has worked in the same manner since I didn't have a single gray hair.

    I wonder if it works if you separate the commands:
    Code:
    --- snip ---
    # bits.
    #
    # By default this script does nothing.
    
    ethtool -s eth2 autoneg off
    ethtool -s eth2 speed 10
    
    exit 0
    "Oh, Ubuntu, you are my favorite Linux-based operating system" --Dr. Sheldon Cooper, Ph.D., Sc.D.

  5. #5
    Join Date
    Oct 2007
    Beans
    5
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Make changes to network adapter persistent

    It did.. Thanks!!!

    Quote Originally Posted by chili555 View Post
    I wonder if it works if you separate the commands:
    Code:
    --- snip ---
    # bits.
    #
    # By default this script does nothing.
    
    ethtool -s eth2 autoneg off
    ethtool -s eth2 speed 10
    
    exit 0

  6. #6
    Join Date
    Oct 2011
    Beans
    5

    Re: Make changes to network adapter persistent

    Thanks a million!!!!

    I have been stuck on this issue for a day (since I am a linux newbi). All other solutions I saw did not work, but this solved the problem.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •