FreeBSD mounting devices at boot time

2013-07-25

This post describes how to set up mounting file systems at FreeBSD boot time.

I have 3 partitions on my PC:

  1. To mount WINXP and Backup create file dosup.sh with the following contents:

    #!/bin/sh
    mount_ntfs -u ivan -g wheel -CKOI8-R /dev/ad4s1 /media/WINXP
    mount_msdosfs -u 1001 -g 1001 -Wkoi2dos -L ru_RU.KOI8-R -D CP866 /dev/ad4s5 /media/Backup
  2. Set dosup.sh executable:

    chmod 755 dosup.sh
  3. Then move dosup.sh to /usr/local/etc/rc.d to make it run on system boot:

    mv ./dosup.sh /usr/local/etc/rc.d/dosup.sh