Re: [SLUG] filesystem identification

From: Eben King (eben1@tampabay.rr.com)
Date: Sat Oct 16 2004 - 14:18:04 EDT


On Sat, 16 Oct 2004, Chad Perrin wrote:

> Levi Bard wrote:
> > On Sat, 16 Oct 2004 11:12:14 -0400 (EDT), Eben King
> > <eben1@tampabay.rr.com> wrote:
> >
> >>OK, how does one identify the filesystem on a device? "file" says:
> >>
> >>[root@pc root]# file - < /dev/sda
> >>standard input: x86 boot sector
> >>
> >>(/dev/sda is one of these, 0.5 GB: http://kasercorp.com/usbjumbo.cfm )
> >>
> >>I successfully mounted it as ext2, but just because I happened to *know*
> >>that was what it was. In general, what should I do? How about an offset
> >>that'll skip ahead straight to the filesystem?
> >>
> >> offset in 1K blocks --vvv
> >>dd if=/dev/sda bs=1024 skip=xxx | file -
> >
> >
> > I never found a good solution to this other than trial && error.
>
> I don't recall, but . . . is it possible to mount a drive or partition
> without knowing the filesystem type, even if it's not in fstab?

Sure, but if it's some filesystem you haven't compiled yet, you're SOL.
Also, I have recent memories of "mount" mismounting a umsdos partition as
FAT, too. Looks like filesystem damage -- all the names, ownership,
permissions, some of the dates are trashed. Understandable, but still.

> In any case, some of the information spat out by running fsck on an
> unmounted filesystem might tell you what filesystem type it is. For
> instance, I ran fsck on a drive I thought was formatted ext3 and it
> informed me that fsck.reiserfs had been run on it, thus informing me
> that my guess at the filesystem type had been wrong. This also has the
> useful effect of telling you if the filesystem is damaged, in addition
> to telling you what type it is.

I've heard bad things about fsck.reiserfs, as in: if an ext[23]
fileystem gets damaged, you'll get most of your files back, but if you're
using reiserfs, hope your backup works.

-- 
-eben    ebQenW1@EtaRmpTabYayU.rIr.OcoPm    home.tampabay.rr.com/hactar

Drive nail here > < for new monitor.

----------------------------------------------------------------------- This list is provided as an unmoderated internet service by Networked Knowledge Systems (NKS). Views and opinions expressed in messages posted are those of the author and do not necessarily reflect the official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:53:53 EDT