What are the purpose of these directories?

I have completed an initial minimal install of FreeBSD 7.2. Below the root directory there are some directories created which seem to have no purpose. What are these for?

/compat
/dist
/media
/sys

Can they be deleted?

The handbook does not include these as part of its directory structure documentation.
 
Thanks for the pointer.

It seems like /sys is for the kernel source, and /media for removable media (kind of makes me wonder about /cdrom*).

Also, /compat appears to be provided for compatibility purposes, specifically to address the issue of duplicate files such as those installed for linux support.

What of /dist?
 
stonee said:
It seems like /sys is for the kernel source
Yes and /src is for the rest. /sys is a symlink as killasmurf86 said. You can find more about it by doing % ls -l /sys.

stonee said:
, and /media for removable media (kind of makes me wonder about /cdrom*).
There's also /mnt. You can use them as you want. /media is sometimes used by desktop environments for automounting, if I'm not mistaken. As for /cdrom, /cdrom1, etc. they're not even in the base system and are created by sysinstall(8) during the setup.
Anyway, when you mount removable media as a user, it's always better to have the mount points inside your home directory, e.g. ~/mnt/cd2/.

stonee said:
What of /dist?
It's clearly written: mount point used by sysinstall(8).
 
Excellent! This is much more clear, and not so alien.

Thanks for your replies, it is helpful in determining a permissions and partitioning strategy.

:e
 
There's also /mnt. You can use them as you want. /media is sometimes used by desktop environments for automounting, if I'm not mistaken. As for /cdrom, /cdrom1, etc. they're not even in the base system and are created by sysinstall(8) during the setup.
Anyway, when you mount removable media as a user, it's always better to have the mount points inside your home directory, e.g. ~/mnt/cd2/.
I've always used /media to mount USB sticks and CD/DVD manually, don't use automount and have never used /mnt.

First I have to manually create /media/da0s1 and /media/cdrom from within x11-fm/xfe:

Code:
mount -v -t msdosfs /dev/da0s1 /media/da0s1
umount -v -t msdosfs /dev/da0s1 /media/da0s1

mount -v -t msdosfs -F32 -o large /dev/da0s1 /media/da0s1
umount -v -t msdosfs -F32 /dev/da0s1 /media/da0s1

mount_cd9660 /dev/cd0 /media/cdrom
umount_cd9660 /dev/cd0 /media/cdrom
 
  • Thanks
Reactions: a6h
Back
Top