Monday, July 30, 2007

Quick way to find out what types of file systems you can under FreeBSD on your machine


Open a terminal and run:

ls /sbin/mount_*


The following tells the kinds of file systems I can mount under my FreeBSD such as ntfs, ext2fs(linux ext2, ext3 file systems) and etc.
newemachine# ls /sbin/mount_*
/sbin/mount_cd9660      /sbin/mount_mfs         /sbin/mount_procfs
/sbin/mount_devfs /sbin/mount_msdosfs /sbin/mount_reiserfs
/sbin/mount_ext2fs /sbin/mount_nfs /sbin/mount_std
/sbin/mount_fdescfs /sbin/mount_nfs4 /sbin/mount_udf
/sbin/mount_linprocfs /sbin/mount_ntfs /sbin/mount_umapfs
/sbin/mount_linsysfs /sbin/mount_nullfs /sbin/mount_unionfs

Say, now I plug in a USB drive have two slices. The first slice da0s1 is a NTFS file system and the second slice da0s2 is an ext3 file system. I can mount them as follows:
newemachine# mount -t ntfs /dev/da0s1 /media
newemachine# mount -t ext2fs /dev/da0s2 /mnt