I installed Xubuntu (sometimes running Cinnamon, but I digress) and would like to disable journaling in order to make file-shredding the ext4 system partition more effective (non-system/app data is on an NTFS partition). How can this be accomplished?

up vote 14 down vote accepted
  • Whatever you do you, make a backup before you play with filesystems!
  • Check the manpages ( man tune2fs ) before using this!
  • This only works on ext filesystems!

To disable journaling you can use (where XN points to your partition letter and digit):

tune2fs -O ^has_journal /dev/sdXN

From the man page:

tune2fs - adjust tunable filesystem parameters on ext2/ext3/ext4 filesystems

Option: -O [^]feature[,...]

Set or clear the indicated filesystem features (options) in the filesystem. More than one filesystem feature can be cleared or set by separating features with commas. Filesystem features prefixed with a caret character ('^') will be cleared in the filesystem's superblock; filesystem features without a prefix character or prefixed with a plus character ('+') will be added to the filesystem.

...

has_journal

Use a journal to ensure filesystem consistency even across unclean shutdowns. Setting the filesystem feature is equivalent to using the -j option.

You might also need the ...

Option: -f

Force the tune2fs operation to complete even in the face of errors. This option is useful when removing the has_journal filesystem feature from a filesystem which has an external journal (or is corrupted such that it appears to have an external journal), but that external journal is not available.

WARNING: Removing an external journal from a filesystem which was not cleanly unmounted without first replaying the external journal can result in severe data loss and filesystem corruption.


The filesystem needs to be either unmounted or in read-only mode. From the grub prompt: "advanced options" -> "recovery mode" -> "Drop to a root shell prompt" or use a Live DVD.

  • 1
    'The has_journal feature may only be cleared when the filesystem is unmounted or mounted read-only.' Do I have to boot the live-disk in order to perform this operation? – Utnubu Jan 17 '15 at 2:04
  • No, you can do it from a grub prompt too but it will be the easiests method. – Rinzwind Jan 17 '15 at 6:57

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.