vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| How can I identify a Linux file system on a partition? 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. 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. 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. Thanks in advance |
| |||
| 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. |
| ||||
| On Sun, 26 Dec 2004 17:42:13 +0000, Peter Jensen 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) Just to warn everyone, file does not understand reiserfs. root@terror gking # mount | grep reiserfs /dev/hdc3 on / type reiserfs (rw,noatime) root@terror gking # file -s /dev/hdc3 /dev/hdc3: data -- War over! Balls thoroughly licked. |