# Python files changed to binary after shutdown



## v0idPtr (Mar 11, 2019)

Hi, I'm posting on the miscellaneous section as I have no idea where to put this. I'm using a Linux EXT4 partition mounted on freebsd using ext2fs kernel module. This mounted volume is then shared with a VirtualBox VM where I edit some python scripts. Now I've started my notebook, got everything running and the python script I was working with this morning is no longer there, instead there is a binary file filled with 0x00 seen as @ chars if I edit the file... Any idea how I can debug this? should this be caused by Virtualbox or by the ext2fs kernel module? Any help is very appreciated.


----------



## aragats (Mar 11, 2019)

That is an evidence of a corrupted filesystem.
The write support was added to ext2fs just recently, most likely there is an issue with that.
Since you use VirtualBox, you can access the Ext4 partition directly, see the VB manual. Something like this:
	
	



```
vboxmanage internalcommands createrawvmdk -filename /path/to/file.vmdk -rawdisk /dev/ada0 -partitions 3
```


----------



## v0idPtr (Mar 15, 2019)

Hmmm, not sure if a feature added 14 months can be said to have been recently added. Nevertheless that is offtopic. It does seem like something corrupted a the filesystem level and I did read something specifically about disabling journaling on the Ext filesystem, which I didn't. Many thanks for the suggestion, I will hook up the VM directly to the partition.


----------



## DoItDrive (Mar 29, 2019)

Yeah, mate. That definitely sounds like the good old corrupt VMDK file situation. I had my server machine. Messing around with the python scripts was mine and yours biggers mistakes. Good news is you can still manage to get your corrupt files all fixed and running smoothly. Better to just show rather than explain at this point so here https://www.diskinternals.com/vmfs-recovery/how-to-fixrepair-corrupted-vmdk-files-effortless/ I will, however, comment on the situation slightly. If the VMDK file was damaged, you will need to recreate the new VM and load the recovered data into this new VM.


----------

