It might be a hardware error then.
Have you tried booting it on whole holding select and start? If luma/gm9 don't show up, and you made sure luma has the boot.firm and boot.3dsx files, then you might have an essentially soft bricked 2ds. Soft bricked means it's still savable. When booting up the 2ds, have you tried holding L + R + A + Up? After that, press update. If it worked, it should help.
Can you tell us what you were doing before the 2ds started randomly crashing? Were you just using it normally? Were you messing around with files that might are too important?
Try booting it on without the sd card. If it boots up and doesn't crash, the last resort might be to format the sd card. I'm not too keen with troubleshooting micro sd card file issues, so don't default to formatting yet!