Changing file system from Ext2 to Ext3 in Debian

Published January 01, 2005
Table of Contents

2. Filesystem in Linux

Converting Ext2 to Ext3

Ext2 has been the Linux default filesystems until recently. But when the computer is rebooted without correctly shutting down, Ext2 filesystems are placed in an error state which could result in data loss.

Ext3 is a journalised filesystem made to remove those errors. If you want to replace Ext2 with Ext3, read on, or else go to the next page.

Login as root.

su

Unmount the /dev/hda4 partition.

umount /dev/hda4

If it doesn't unmount, then I remount it as read-only.

mount -o remount,rw /dev/hda4

Convert it to Ext3.

tune2fs -j /dev/hda4

Edit /etc/fstab and in the /dev/hda4 entry, change ext2 to ext3.

Reboot (one of the very few times you'll be rebooting!!)

shutdown -h now

After you've rebooted, you'll find that you have Ext3 as your file system. To verify, the following command shows the current file systems and mounted partitions. df

Accessing the Windows partition from Linux

My Windows partition is called /dev/hda1. To access it and give read and write permissions to all users, first create a directory called win under /mnt. mkdir /mnt/win

Then edit your /etc/fstab file and add this entry to the last line. Don't forget to press enter after you add this line. /dev/hda1 /mnt/win vfat users,owner,rw,umask=000 0 0

Mount it with the command mount -a

Now any user can access the Windows partition with cd /mnt/win

Related Posts

If you have any questions, please contact me at arulbOsutkNiqlzziyties@gNqmaizl.bkcom. You can also post questions in our Facebook group. Thank you.

Disclaimer: Our website is supported by our users. We sometimes earn affiliate links when you click through the affiliate links on our website.

Last Updated: January 01, 2005.     This post was originally written on February 01, 2005.