Friday, August 05, 2005

Find Linux version

Q:
How can I tell what version of Linux I am using?

# cat /proc/version
- or -
# uname -a

Thursday, August 04, 2005

Linux FS tips

Just restored a system on ext3 filesystem. Backup was taken from a live server with ext2 filesystem, so fsck runs and has problems saying fsck is too old and doesn't support the filesystem:
Your system appears to have shut down uncleanly
Press Y within 1 seconds to force file system integriry check...
Checking root filesystem
fsck.ext3: Filesystem has unsupported feature(s) (/)
e2fsck: Get a newer version of e2fsck!

I had tried to boot under the other LX version and did an fsck on the unmounted filesystem from there, but it didn't find anything. So I tried the -f flag for force:
umount /dev/hda2
fsck -f /dev/hda2

If foudn errord and fixed them, but when I rebooted back on the restored system, I get the same error.

I wonder what i did last time I solved this issue... I think I copied the files in. Or maybe yum or rpm have an option to upgrade a package on a target system. I could do rpm to find out what files are involved in each package to be upgraded...


Next, I am trying to convert the ext3 back to ext2:
From the site: http://forums.devshed.com/archive/t-104010/Anyway-to-write-to-EXT3-filesystem-from-windows

You can easily change a partition between ext2 and ext3, considering that the onlt difference is that ext3 is a journaling filesystem.
To convert from ext3 to ext2, do "tune2fs -O ^has_journal /dev/X" (where X is the partition). Then if you want, delete the .journal file
To convert from ext2 back to ext3, do "tune2fs -j /dev/X"