How to convert ext2 to ext4?

Solution 1:

Follow the instructions detailed in this post: Convert ext2/3 to ext4

Solution 2:

The short version for the impatient:

dev=/dev/sdXn # <-- Adjust this

then

umount $dev && tune2fs -O extents,uninit_bg,dir_index,has_journal $dev && e2fsck -v -pf $dev

If you cannot unmount because it's your system partition, then of course you will need to first boot from another system like a Live CD.

And no, you will not lose data. Unless something very weird happens, in which case you will have to reach to your backup. (You do have backups, of course. Right?)