[Solved] Ethernet Shield 2 SD Card - doesn't work unless removed and re-inserted


I am using an Arduino Mega 2560 Rev3 board with an Ethernet Shield 2.

I am learning how to use the SD card module and I am running into an issue while running the CardInfo example: after uploading, the Arduino fails to access the card unless I remove it, re-insert it and then reset the Arduino.

Removing and inserting the card needs to be repeated everytime I power the Arduino board back on.

This is an issue, since my project will leave the board itself inaccessible, and I won't be able to access the card everytime I power the board back on.

Is there any modification to the code that I can perform in order to fix this issue?

Thank you.

Edit: Having gotten no replies on this topic, I made a new one in "Installation and Troubleshooting", hoping for a faster answer (I need to get this working for my job).

Other post/duplicate DELETED
Please do NOT cross post / duplicate as it wastes peoples time and efforts to have more than one post for a single topic.

Continued cross posting could result in a time out from the forum.

Could you also take a few moments to Learn How To Use The Forum.
It will help you get the best out of the forum in the future.
Other general help and troubleshooting advice can be found here.

So, I got my hands on a different micro SD card, which has less storage, but the same FAT 32 file system and the problem was gone.

I doesn't make much sense that one card works every time, while the other demands that I remove and re-insert it, but at least I now know that it's the card's problem.