How do I convert
my existing ext2 partition to ext3?
Ext3 is a journaling file systems, and you can look at it as ext2 plus journalling. First create a journal for your file system using,
tune2fs -j /dev/hdaXYou can do this on a mounted or an unmounted filesystem. If you create the journal on a mounted filesystem you will see a .journal file. Do not try to access this journal file.
mount -t ext3 /dev/hdaX /mnt/With mke2fs -j /dev/hdaX you can format a raw partition as ext3. You can then mount this as ext2 as well. Just check if you have the line ext3 in the file /etc/mkinitrd/modules.
tune2fs -O ^has_journal /dev/hdaXForce an fsck to be on the safer,
fsck.ext2 -f /dev/hdaX
Get rid of the .journal file, as that doesn't do any purpose now.
How do I setup my
/etc/vfstab file for the ext3 file system ?
Instead of just specifying the new file system as ext3, enter it as "ext3, ext2". This instructs the kernel to first try mounting as ext3. If that doesn't work for any reason, it gets mounted as ext2 (atleast!). For fsck to understand this convention, you must make a link in /sbin/ext3,ext2 to /sbin/ext2. This may sound ugly - but there is no other way.
How to avoid fsck prompts during the boot sequence?
Write 'FSCKFIX=yes' in /etc/default/rcS. You will not face the fsck problem from the next reboot onwards. However, if the disk is corrupted very badly, your presence may be required. I had done some kernel tweaks also for that. I will write about in subsequent tips.
How do I mount my windows share on Linux using samba?
Have this line in your /etc/fstab
//Server/ShareName /home/ServerShare smb username=user,password=password 1 2
This would work in a home environment, where you don't mind putting the password in fstab file. If you want to be cautious, have a script ask for your password and mount the stuff using smbmount command. However, if you like to do this as non-root, specify the mount point option in /etc/fstab alongwith noauto and user options.