I'm porting embedded linux into an embedded system which has a compact flash card. what precautions can i take for the file system (ext 2 or any other) and linux kernel , so that linux file system never crashes inspite of improper shutdowns (Direct switch of the device). Please help me.