MicroSD not able to initialize often

I agree with some, but not all. If you leave the SD SPI floating while starting the w5100, you will eventually have trouble. Maybe not all the time, but enough to be annoying, normally noticeable on a reboot.

void setup()
{
  Serial.begin(9600);

  // disable SD SPI while starting w5100
  // or you will have trouble
  pinMode(4, OUTPUT);
  digitalWrite(4,HIGH);   

  Ethernet.begin(mac, ip);
  server.begin();
  
  Serial.print("server is at ");
  Serial.println(Ethernet.localIP());
  
  // this corrects a bug in the Ethernet.begin() function
  // even tho the call to Ethernet.localIP() does the same thing
  digitalWrite(10,HIGH);
 
  if (!SD.begin(4)) 
     Serial.println("SD initialization failed.");
  // SD.begin() returns with the SPI disabled, so you need not disable it here
    
  Serial.print("server is (still?) at ");
  Serial.println(Ethernet.localIP());    
     
}