\n"; // Echo "RootDir: ".$RootDir."
\n"; // We'll need access to the Global Variables: // include_once("$DOCUMENT_ROOT/include/GlobalVars.php"); // To get rid of: Warning: include_once() [function.include-once]: Unable to access /include/GlobalVars.php in include_once("$RootDir/include/GlobalVars.php"); // We will be accessing all sorts of functions: //include_once("$DOCUMENT_ROOT/include/Functs.php"); include_once("$RootDir/include/Functs.php"); // Check to see if the visitor (USER_AGENT) is a spider. If not: // then do a "session_start"... // Creates a session or resumes the current one // based on the current session id that's being passed via a // request, such as GET, POST, or a COOKIE. // It's necessary that this be the first PHP command in the file. If (!ItsASpider()) { session_start(); // Sets various session variables like ReferringURL and EntryURL // if they haven't already been set // include_once("$DOCUMENT_ROOT/include/SetSessionVars.php"); include_once("$RootDir/include/SetSessionVars.php"); } // This turns on Output Buffering. This seems to be // necessary because we may be redirecting to a "Thank You" page // after they submit the form. Speeds things up because // browser doesn't reload when hitting BACK button. ob_start(); // PageNameStr - This is the dominant keyword phrase for the page. // Goes in comments, header bars, IMAGE ALT tags, etc. Only about 10 words! $PageNameStr="How to read a CD-ROM disk using FreeBSD"; // This is the first line string. It goes at the very top of the page. // If this is NOT a doorway page, then set the $PageFirstLineStr: // Notice: Undefined variable: ThisIsDoorway // IF (!($ThisIsDoorway)) // If not set, then set it to get rid of error message: If (!IsSet($ThisIsDoorway)) {$ThisIsDoorway=0;} If ($ThisIsDoorway<>1) {$PageFirstLineStr="FreeBSD CDROM Drive - How to Read or Copy Files, Tutorial, Howto Mount CD-ROM Disk";} // This is the first text after the first line, // that usually shows up in the upper left corner $PageFirstTextStr="${CompanyStr}

FreeBSD CD Drive"; // This is the second text after the first line, // that usually shows up in the upper right corner $PageSecondTextStr="${CompanyDomain}

FreeBSD - Mount CD Disk"; $PageTitleStr=$PageFirstLineStr; $PageKeywordStr=$PageNameStr; $PageCommentStr="FreeBSD Mounting CDROM Drive to Read or Copy Files from CD Disk, Configuration, Linux, Unix, Nix, Hard Disks, CD, Keyboard, Cheat Sheet for FreeBSD, Configure, Options, Configuration, Howto, How To, FreeBSD"; // $PageDescriptionStr=""; // $PageRobotsStr=""; // If this is NOT a doorway page, then include header.php: IF (!($ThisIsDoorway)) { include_once("$RootDir/include/header-brief.php"); } ?>

HOW TO USE A CD-ROM DRIVE WITH FREEBSD


    ASSUMPTIONS:

    You have already installed FreeBSD.  If not, then click here: How to Install FreeBSD


    NOTE WELL:

    If you are coming from a Windows background, it is important to note that in FreeBSD / Unix / Linux, a removable drive must be 'mounted' before it can be accessed.  This 'HowTo' explains this process.

    Shortcuts or 'aliases' can be configured so that the mounting process is streamlined.  To find out more, go to the CD-ROM Drive Configuration Section of the Shell Configuration page.


    MOUNTING A CD-ROM DISK

  1. We need to set up a directory before we can mount the CD, so let's go to the OS root directory by entering:

    cd   /


  2. Now create the /cdrom directory by entering:

    mkdir   /cdrom


  3. This step is optional but helps us know if a CD-ROM disk is mounted.  To create this file, let's first enter the following:

    cd   /cdrom


    Now enter:
    touch   CDROM-NOT-mounted-mcd.txt


    This creates a file that will show up if the CD-ROM disk is not mounted.

  4. Make sure the CD-ROM disk is in the drive and enter:

    mount   -t   cd9660   /dev/acd0c   /cdrom


    Note that this is assuming that the disk is MS-DOS formatted (Windows).  For other formats and options enter:

    man   mount



    READ A DIRECTORY LISTING

  5. The CD-ROM disk is now mounted.  To test, enter:

    ls   -lt   /cdrom


    This should give us a listing of the files on the CD.


    COPY OR MOVE FILES

  6. If we want to copy files from this CD-ROM, we could do something like this:

    cp   -p   /cdrom/somefile.conf   /some/directory/on/hard/drive/


  7. For other commands, enter:
    man   cp
    man   mv
    man   rm


    UNMOUNT CD-ROM DISK

  8. Once we are finished using the CD-ROM disk, before we remove it, enter:

    umount   /cdrom