[RFC] mount can figure out fstype automatically

Mike Jakubik mikej at rogers.com
Sat Jul 8 22:27:07 UTC 2006


Craig Rodrigues wrote:
> I was thinking of doing something like that.  You can basically
> get the same info by doing something like:
>
> file - < /dev/ad0s1e
> /dev/stdin: Unix Fast File system (little-endian)
>
> file - < /dev/ad0s4
> /dev/stdin: SGI XFS filesystem
>   

This does not work on my system btw.

root at fbsd.home.local:~# file - < /dev/ad0
/dev/stdin: x86 boot sector
root at fbsd.home.local:~# file - < /dev/ad0s1
/dev/stdin: x86 boot sector, code offset 0x3c, reserved sectors 0, Media 
descriptor 0x0, reserved 0x16, dos < 4.0 BootSector (0x1f), BSD disklabel
root at fbsd.home.local:~# file - < /dev/ad0s1a
/dev/stdin: data
root at fbsd.home.local:~# file - < /dev/ad0s1b
/dev/stdin: x86 boot sector, code offset 0x3c, reserved sectors 0, Media 
descriptor 0x0, reserved 0x16, dos < 4.0 BootSector (0x1f), BSD disklabel
root at fbsd.home.local:~# file - < /dev/ad0s1c
/dev/stdin: x86 boot sector, code offset 0x3c, reserved sectors 0, Media 
descriptor 0x0, reserved 0x16, dos < 4.0 BootSector (0x1f), BSD disklabel


No mention of FS type.

root at fbsd.home.local:~# df -h|grep ad0
/dev/ad0s1a     73G     12G     55G    18%    /




More information about the freebsd-current mailing list