How can I prevent Windows 10 from corrupting the ext4 superblock every time?
I have done some research and it seems that since ext2fsprogs 1.43 (Ubuntu 16.10), the 64bit and the metadata_csum
features are enabled when a new ext4 filesystem is created. I did a fresh install of Ubuntu 16.10, but before installing, I started into the USB live session and removed the 64bit and metadata_csum
features for ext4 from /etc/mke2fs.conf
. After this I ran the installer out of the this live session and now I can start Windows 10 without corrupting my ext4 partitions (you have to reformat your ext4 partitions during the installation of Ubuntu 16.10).
The problem is related to ext2fsd which obviously does not support the 64bit feature and/or metadata_csum feature. It is sufficient to have ext2fsd installed to corrupt your ext4 partitions. No need for them to be mounted in Windows.
You can check if these features are enabled with the following command:
sudo tune2fs -l /dev/[sdXX]
where [sdXX] stands for the ext4-partition in question.
I have the same issue and for me it seems to be the Windows 10 ext2fsd file system driver. Maybe for you too? When I uninstall ext2fsd (version 0.68) I can start Windows 10 as often as I want and the ext4 partitions stay clean. With ext2fsd installed all ext4 partitions get corrupted no matter if they are mounted or not.
I have a solution that works for me (diskpart is my friend)
1) identify the linux partition in the cmd administrative windows :
diskpart
list volume
you can see your linux partition
N° volume Ltr Nom Fs Type Taille Statut Info
---------- --- ----------- ----- ---------- ------- --------- --------
Volume 0 D BIOS_RVY NTFS Partition 10 G Sain
Volume 1 E System NTFS Partition 100 M Sain Système
Volume 2 C OS_Install NTFS Partition 131 G Sain Démarrag
Volume 3 L Partition 18 G Sain
DISKPART>
In my case : Volume 3
2) create a diskpart script with notepad create the file volume3offline.txt
select volume 3
offline volume
exit
3) create a bat file with notepad create the file govolume3offline.bat in the same directory
cd \users\f35\documents
diskpart /s volume3offline.txt
4) create a scheduled task Open the windows tash scheduler Program a task that launch govolume3offline.bat at boot time
5) check if all is ok after a reboot in windows
diskpart
list volume
your linux volume should be offline
Reboot in linux
If no errors => it's good
if you have errors,
correct them
reboot in windows
reboot in linux
If no errors => it's good
if you have errors, goto 1)