View Single Post

   
  #2 (permalink)  
Old 02-21-2008, 08:51 AM
Peter Jensen
 
Posts: n/a
Default Re: Can't Remember Which File System I Used

amuskratt@yahoo.com wrote:

> How can I identify a Linux file system on a partition?


One way is to use the 'file' command on the partition block device. You
need to use 'file -s /dev/whatever' because it's a special file. My
ext3 partition shows this:

/dev/hda2: Linux rev 1.0 ext3 filesystem data (needs journal recovery)

> I have a Via Epia-ME6000 system that I'm moving over from Suse 9.1 to
> Gentoo 2004.3. I have had my subdirectory "/home" mounted on a
> separate partition from the "/". Thus, I should be able to do a clean
> OS install without having to completely wipe out everything on my hard
> drive.


Good strategy.

> The possible problem is that I can't recall if I formatted my "/home"
> partition ext2 or ext3. I am sure enough that I didn't use any other
> file system but my memory is stuck on this detail.


Providing that the partition was unmounted cleanly, then this should be
no problem. Ext3 is basically identical to ext2, but with an added
journal. One can switch between ext2 and ext3 with the 'tune2fs'
program. This can also be used to identify the current type, by running
'tune2fs -l /dev/whatever'. Under 'Filesystem features' it should say
has_journal if it's ext3. Most likely it is ext3, as almost nobody uses
ext2 these days.

> I currently have no trouble accessing the data on this partition when
> booting up Gentoo from a Live CD. I am just afraid of making a wrong
> move and mutilating all of the data there.


I'd say there is a *very* small risk that this will happen. But just
look in the /etc/fstab of the original system and see what it says about
the partition. Perhaps it mentions the file system type, but it might
also just be 'auto' (in which case the kernel will guess).

--
PeKaJe

Cleanliness is next to impossible.
Reply With Quote