s i s t e m a o p e r a c i o n a l m a g n u x l i n u x | ~/ · documentação · suporte · sobre |
2. ProcedureSummary of Steps
2.1. Creating the ISO ImagesChoose (or create) a file system with the largest available disk space on it. Keep in mind that CD-ROM's can hold around 640MB of data, so if you want to share 8 full CD's on your network, you'll need 5.1GB of space available.
Here the /home filesystem has the most available space, so it is the most suitable filesystem to use for dumping the CD images to.
Now, copy the CD to an iso image. You must know the device name of your CD-ROM drive (usually /dev/cdrom, it could be /dev/scd0 for SCSI CD-ROM's) I'll use the Mandrake distribution CD-ROM as an Example:
The "if=" is the input file, the "of=" is the output file. You should see a message stating the number of records in and number of records out (hopefully with no i/o errors). 2.2. Mounting the ISO ImagesThe next step is to mount the iso image file. Let's create a directory under /mnt to place the mounted file.
Now mount the ISO image file to this newly created directory
The "-o loop" means use the option that mounts a file as a block device. The "-t iso9660" means that the file is in the iso9660 CD-ROM format. The "-r" means to mount read-only. Now you can:
You should see a listing (ls) of the files and directories that are on the actual CD (only now they're inside the iso image file, and that's what you're currently looking at!) 2.3. Mounting the Image upon System RestartNow that we've manually mounted the image, and made sure it works, an entry needs to made in the /etc/fstab file so that the image is remounted on the next system startup. It's important to make the entry AFTER the entry for the parent filesystem, e.g. /home (I use vim, but Emacs, Joe, Pico or Jed will work just as well):
After the line that looks like the following (or whichever filesystem you've placed your images):
Insert the following line with your text editor:
2.4. Sharing it on a Windows Network using SambaYou'll need to have Samba installed and working to perform the next steps (that's outside the scope of this instruction). If it's not yet installed, consult your Linux distribution's instructions for installing the Samba package. Or you can visit the Samba website at http://us1.samba.org/samba/samba.html for installation instructions, binaries, and/or the source code. To share your mounted CD's on a windows network, simply create a stanza in the /etc/smb.conf file similar to the following:
This will share all the subdirectories under the /mnt/iso directory on the network. To mount the share to a local drive (in this case the I: drive), bring up an MS-DOS Prompt on the Windows machine and type the following:
Each CD image will now appear as a subdirectory on the I: drive of your Windows machine. To mount ONLY the Mandrake CD image to a drive letter (we'll use M:, the root drive of which, will correspond exactly to the CD as if it was just inserted in the CD-ROM drive), create the following stanza in the /etc/smb.conf file.
Then, at your MS-DOS Prompt, mount it with the following command:
2.5. Sharing the Images on a Unix network using NFSMake sure that NFS is running and configured correctly on your Linux machine, then add the following to the /etc/exports file using your own preferred options:
Now, when typing "showmount -e yourlinuxmachine" you should see that the /mnt/iso is included in the exports list. |