How to identify the harddisks filesystem

I had an harddisk with an unknown filesystem. The mount command without any option didn’t work, so i had to find out the filesystem.

There is one simpel command to do this:

hellmann linux # file -s /dev/sdb1
/dev/sdb1: x86 boot sector, code offset 0x3c, OEM-ID "TSD FAT ", sectors/cluster 64, sectors 976771120 (volumes > 32 MB) , FAT (32 bit), sectors/FAT 119221, serial number 0x4d1d59b, unlabeled

Now i can use the mount command with the -t option to simply mount this partition (don’t know why it doesn’t detect the filesystem automatically):

mount -t vfat /dev/sdb1 /mnt/usb

2 thoughts on “How to identify the harddisks filesystem”

  1. looking onto the disk with fdisk -l /dev/sdb can also come in handy, although it only reads the partition type label, print command in parted is a little more intelligent (but might not always be installed)

    1. I use the following litlte trick. When I create a new folder (directory) that I plan to use as a mount point, after the mkdir, I use the following commands path# touch /mountFolder/_THIS_IS_A_MOUNT_POINT_.txt path# emacs /mountFolder/_THIS_IS_A_MOUNT_POINT_.txt document my plans for using this mount point folder path# chmod a-w /mountFolder/_THIS_IS_A_MOUNT_POINT_.txtIf this file is visible, then nothing is mounted on that mount point.As file systems come and go, I’ve orphaned mount points and find this useful to cull the orphans and also following a cold-iron recovery or re-install.~~~ 0;-Dan

Leave a Reply

Your email address will not be published. Required fields are marked *