# [SOLVED] Force 10baseT Half Duplex on startup how?

## Kwizatz

Hi, I am new here   :Very Happy: 

So I have this long network cable that only allows me to connect the computer to the router at 10 baseT half duplex, the computer is being used as a server, so there is no monitor attached to it, and I don't have any spare ones, so I need the card to be brought up with those settings.

ethtool -s eth0 speed 10 duplex half autoneg off

Works if I issue it from a console once the system is up,

mii-tool -F 10baseT-HD eth0

works as well under the same circumstances, but the changes are not permanent, when I reboot it goes back to 100baseT-FD.

I tried using both preup and postup on /etc/conf.d/net, but if I set dhcp (which would be preffered) the call in preup doesn't work, the one on postup seems to work if I bring the computer closer to the router and use a shorter cable, but since dhcp is set before postup, it fails with the longer cable.

If I set a static IP neither works, boots as 100bT full duplex.

I ran a test, and it seems like ethtool actually does succeed , but is quickly overridden again with the default settings.

I used to have this computer running Fedora and setting ETHTOOL_OPTS="speed 10 duplex half autoneg off" worked like a charm there, is there something similar in Gentoo?

The card is an integrated SiS900, on an AthlonXP 3200+ system.

I am running out of hair  :Smile:  please help, thanks in advance.   :Very Happy: Last edited by Kwizatz on Fri May 23, 2008 1:41 am; edited 1 time in total

----------

## BradN

You should be able to copy the network init script so it's not a symlink anymore and edit it to insert "ethtool -s eth0 speed 10 duplex half autoneg off" somewhere before it brings the interface up (or manually bring it up with ifconfig eth0 up before that command if necessary)

----------

## Kwizatz

I'll try that, thanks, I was hopping for a method that didn't tampered with non configuration system files, but if there is none I guess thats how it has to be.    :Confused: 

Thanks again  :Very Happy: 

----------

## BradN

Well, that kind of customizability is why we're not running windows  :Wink: 

----------

## Kwizatz

I just don't want the change to be either overwritten by later updates or worse, the file not updated because it has been edited, which is not uncommon in certain binary package based distro  :Smile: .

----------

## Kwizatz

Ok, turns out I just had to add the "ifconfig eth0 up" line before the ethtool line in the preup function, no need to copy and edit /etc/init.d/net.eth0, though I did edit it before figuring that one out.

Thanks BradN   :Very Happy:   :Exclamation: 

----------

