Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Installed Ubuntu 12.10 alongside manufacturer-installed Win 8 with no problems. Was "clever" enough to install as ext2 filesystem, which has resulted in the inconvenience of fsck making the usual checks every time I boot up. Sure, I could just press "C" to cancel the check, but that gets a little old after a while.

I've already tried tinkering with the maximum mount count in tune2fs, but that hasn't made any difference. It looks like I have to convert my ext2 filesystem to ext4. I could do this via the information provided here but have also noticed that I can enable some of the features of ext4, as detailed in this answer, by running the following command...

sudo tune2fs -O has_journal,uninit_bg,extents /dev/sda1

...and rebooting.

Is it necessary to do the full filesystem conversion, or will the fsck be eliminated by running the above command in terminal to enable some ext4 features?

share|improve this question
add comment

1 Answer 1

You'll have to do that from a live environment (launch from a Ubuntu DVD or pendrive). Before doing so, please check the filesystem:

sudo fsck.ext2 /dev/sda1

And then do your thing. You better also enable dir_index. You can read about ext4 features on Wikipedia. Do it:

sudo tune2fs -O dir_index,has_journal,uninit_bg,extents /dev/sda1

After doing that, try mounting the filesystem to see if everything is OK.

sudo mount /dev/sda1 /mnt -t ext4

Can you see the filesystem? Nice.

sudo ls /mnt

And that's enough to convert the filesystem. But you'll also need to change the file /etc/fstab for the operating system to mount the filesystem as ext4.

sudo gedit /mnt/etc/fstab

Change the second line to say ext4 instead of ext2:

# / was on /dev/sda1 during installation
UUID=14f577b8-xxxx-4124-88d3-c1d49eb41113 /               ext2    errors=remount-ro 0       1

And that's it. Save and exit. Don't forget to unmount the filesystem before restarting into your system again:

sudo umount /mnt
share|improve this answer
    
Thank you :-) does this remove the need for refreshing Grub on my boot partition, as in step 6 at ghacks.net/2010/08/11/convert-ext23-to-ext4? –  Dan Jan 13 '13 at 18:49
    
You shouldn't need to refresh Grub at all. If the system don't boot, go back to the live environment and do it, though. –  Jorge Suárez de Lis Jan 13 '13 at 20:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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