Sun Dublan
FreeBSD Notes 

Boot

  • Rewriting the bootloader in the Master Boot Record:

    # fdisk -B -b /boot/boot0 device

     

  • NT Bootloader: Copy /boot/boot1 to the root of C: and name it bootsect.bsd, then add this line to boot.ini:

    C:\bootsect.bsd="FreeBSD"

     

  • Automatic kernel parameters in: /boot/kernel.conf

     

  • Reducing boot delay: add autoboot_delay="2" in /boot/loader.conf

     

  • Generic /etc/cvsupfile

    *default host=cvsup11.FreeBSD.org
    *default base=/usr
    *default prefix=/usr
    *default release=cvs
    #*default tag=RELENG_4
    *default delete use-rel-suffix
    src-all
    *default tag=.
    ports-all
  • Ordinary users can be permitted to mount devices. Here is how:

    1. As root set the sysctl variable vfs.usermount to 1.

      # sysctl -w vfs.usermount=1
      
    2. As root assign the appropriate permissions to the block device associated with the removable media.

      For example, to allow users to mount the first floppy drive, use:

      # chmod 666 /dev/fd0
      

      To allow users in the group operator to mount the CDROM drive, use:

      # chgrp operator /dev/cd0c
      # chmod 640 /dev/cd0c
      
    3. Finally, add the line vfs.usermount=1 to the file /etc/sysctl.conf so that it is reset at system boot time.

    All users can now mount the floppy /dev/fd0 onto a directory that they own:

    % mkdir ~/my-mount-point
    % mount -t msdos /dev/fd0 ~/my-mount-point
    

    Users in group operator can now mount the CDROM /dev/cd0c onto a directory that they own:

    % mkdir ~/my-mount-point
    % mount -t msdos /dev/cd0c ~/my-mount-point
    

    Unmounting the device is simple:

    % umount ~/my-mount-point
    

    Enabling vfs.usermount, however, has negative security implications. A better way to access MSDOS formatted media is to use the mtools package in the ports collection.

4/19/2002 Webmaster: Troy Bowman