Differences
This shows you the differences between two versions of the page.
— |
guides:how-to-convert-ext2-to-ext4 [2016-08-24 18:39:34] (current) shaun.reitan created |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== How to convert a EXT2 file system to EXT4 ====== | ||
+ | There may be a time when you need to convert a EXT2 file system to EXT4. This guide will help you through that process. | ||
+ | |||
+ | <note warning> | ||
+ | |||
+ | ===== First ensure your filesystem is not mounted! ===== | ||
+ | Before proceeding you should make sure your file system is not currently mounted. If the file system your going to be doing this too is your root file system then you should boot off a recovery disk or live env. You must make sure your disk is not in use! | ||
+ | |||
+ | ===== Force check the filesystem ===== | ||
+ | Again, we cannot stress this enough. Make sure your FS is not mounted. | ||
+ | |||
+ | First run the following command. | ||
+ | <code console> | ||
+ | fsck / | ||
+ | </ | ||
+ | |||
+ | Chances are the FS is going to say it's clean. If it's not let it do it's thing and you can skip the next step. If the FS is clean, we are going to force a check on the FS. | ||
+ | <code console> | ||
+ | fsck -f / | ||
+ | </ | ||
+ | |||
+ | ===== Convert to EXT4 ===== | ||
+ | We can not use tune2fs to convert the filesystem to EXT4 using the following command. | ||
+ | |||
+ | <code console> | ||
+ | tune2fs -O extents, | ||
+ | </ | ||
+ | |||
+ | ===== Run final fsck check ===== | ||
+ | Yep, we need to run fsck one last time! We are again forcing a fsck check, make sure the device is not in use! | ||
+ | |||
+ | <code console> | ||
+ | fsck -f / | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Verify the FS is now EXT4 ===== | ||
+ | You can verify your device is now EXT4 by running the following command. | ||
+ | |||
+ | <code console> | ||
+ | blkid / | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||