I have a 12TB internal hard disk on my Ubuntu 18.04 workstation that when I boot, is assigned a 17MB 'Microsoft Reserved' partition and the rest is allocated to a second partition as free space (according to the Disks utility).
If I run fsck
on the drive (i.e. fsck /dev/sdb
), I get the following output:
fsck from util-linux 2.31.1
e2fsck 1.44.1 (24-Mar-2018)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
data2 was not cleanly unmounted, check forced.
Pass 1: Checking inodes, blocks, and sizes
Just running this, even without it completing, usually results in it being recognised as ext4 and mounted properly. However, if I reboot, the drive reverts to the same state as before with the Microsoft Reserved partition. This could be the result of the drive having been accidentally put into a separate Windows system, but I don't understand why fsck doesn't permanently resolve it. Unmounting the drive before reboot does not resolve the issue either.
Any suggestions on how I can permanently enable the drive to be mounted as ext4, without running fsck every time?
fsck
. Always indicate the full command as you executed it. Use "edit" to update your question. Is this a removable USB drive, or an internal drive on a system that is also used by Windows? Putting in a WIndows system and correctly removing it from Windows should not cause the issue. However, it could if you remove the drive after shutting down Windows with "Windows Fast Start" enabled, because then it is not properly closed by Windows. – vanadium Sep 14 '21 at 10:03fsck
you should be able to specify the file system and have it correct errors:fsck -t ext4 -f /dev/sdX
. Be sure to replacesdX
with the proper device location. – matigo Sep 14 '21 at 11:04