Linux Notes

Note: Patrick's website has moved to http://www.patrickmcdaniel.org. This site is available for historical reasons only, and much of the information is out of date.

General
  Home
  Bio
  Vita/Resume
  Schedule
  Teaching
  In the News
Research
  Publications
  IETF/IRTF
  Antigone
  Linux
Personal
  Information
  PGP Key
  Family
  Links

Linux Notes

This page contains various notes about the installation and maintenance of a Linux host. This installation assumes a Redhat installation. Other distributions may require different command, so your mileage may vary. These notes are more quick-start than exhaustive. More in depth information can be obtained from the appropriate HOWTO documents.


Burning a CD-Rom

  1. Setting Up the CD-Writer - This can be a very complex and often hardware specific process. See the CD-Writing-HOWTO. The good news is that you only have to do this once.

  2. Testing the CD-Writer - The cdrecord -scanbus utility is used to identify the devices available for writing CDs. For example,

    [root@patrick /root]# cdrecord -scanbus
    Cdrecord 1.9 (i686-pc-linux-gnu) Copyright (C) 1995-2000 Jörg Schilling
    Linux sg driver version: 3.1.17
    Using libscg version 'schily-0.1'
    scsibus0:
            0,0,0     0) 'HP      ' 'CD-Writer+ 9100 ' '1.0c' Removable CD-ROM
            0,1,0     1) *
            0,2,0     2) *
            0,3,0     3) *
            0,4,0     4) *
            0,5,0     5) *
            0,6,0     6) *
            0,7,0     7) *
    [root@patrick /root]# 
    

    If no device is reported, then there is a hardware error or the needed modules have not been installed. In this case, review step one to configure or debug the modules.

  3. Creating the CD Image - The mkisofs utility is used to create an ISO (CD) image. An ISO image is simple a file containing the CD contents in a file-system format. You will need to create the image on some disk partition that has enough free disk space to place the image (~= 650 Meg).

    So, assume you want to place the following directories on your CDROM (for example, to backup your thesis):

    /usr/local/src/antigone /home/pdmcdan/thesis /home/pdmcdan/src

    The command mkisofs needs to identify the output image file, the input directories or files, and the command line options. To illustrate,

    [root@patrick /root]# mkisofs -r -o thesis.iso -graft-points antigone-2.0.7=/usr/local/src/antigone-2.0.7 thesis=/home/pdmcdan/thesis src=/home/pdmcdan/src

    Where,

    -r
    Indicates the permissions for all files should be set to public read. See man for details of other options.

    -o thesis.iso
    Indicates that the thesis.iso output image should be created in the local directory.

    /antigone-2.0.7/=/usr/local/src/antigone-2.0.7/ ...
    Lists the directories to be mounted off the root of the CD. The graft points are used to mount these directories at other points in the file-system. For example, this graft point states that the /usr/local/src/antigone-2.0.7/ directory tree should be mounted at /antigone-2.0.7/ on the CD. This is kinda tricky, but be sure you use the graft points. Otherwise, the contents of antigone-2.0.7 will be placed at the root, rather than the antigone-2.0.7 directory.

    The output of this command is:

    Using PROPC000.JAV;1 for /home/pdmcdan/PropChgRec.java (PropChgRecs.java) ... 82.15% done, estimate finish Sat Sep 29 08:09:38 2001 84.89% done, estimate finish Sat Sep 29 08:09:39 2001 87.63% done, estimate finish Sat Sep 29 08:09:39 2001 90.37% done, estimate finish Sat Sep 29 08:09:37 2001 93.10% done, estimate finish Sat Sep 29 08:09:36 2001 95.84% done, estimate finish Sat Sep 29 08:09:37 2001 98.58% done, estimate finish Sat Sep 29 08:09:38 2001 Total translation table size: 0 Total rockridge attributes bytes: 831014 Total directory bytes: 2156544 Path table size(bytes): 9864 Max brk space used 48f3a4 182594 extents written (356 Mb) [root@patrick /root]#
  4. Testing the CD Image - Prior to burning the CD, you may wish to test the image by mounting and traversing it. As with any file-system, the image is mounted using the mount utility. Create and mount the image using the following commands.

    [root@patrick /root]# mkdir /tmp/cdimage [root@patrick /root]# mount -t iso9660 -o ro,loop=/dev/loop0 thesis.iso /tmp/cdimage verify contents ... [root@patrick /root]# umount /tmp/cdimage

    Once the CD is mounted, you can verify its contents with ls or diff to ensure the contents are correct. If you are comfortable with the contents, unmount the CD and proceed to burning process.

  5. Burning the CD
    The cdrecord utility is used to complete the burn. For example, cdrecord -v speed=2 dev=0,0,0 -data thesis.iso

    Where,

    -v
    Increases the amount of debug information generated. This is useful for determining how things are going during the burn.

    speed=2
    Tells the utility how fast to write the data to the CD. Errors will occur if the speed is too fast, but not if it is too slow. Use speeds of 1 on a slow machine, 2 on a faster machine, and 4 on a super fast machine. Note that the CPU can be a bottleneck, so going with the speed rating of the CD/W may not be the right way to go.

    dev=0,0,0
    Indicates the device to use for the burn. This can be read directly from the output of the bus scan (see #2 above).

    -data
    Tells the utility that ISO data is being written.

    thesis.iso
    Identifies the image to write to the disk.

    The utility will keep you up to date on the progress of the writing. For example,

    [root@patrick /root]# cdrecord -v speed=2 dev=0,0,0 -data thesis.iso Cdrecord 1.9 (i686-pc-linux-gnu) Copyright (C) 1995-2000 Jörg Schilling TOC Type: 1 = CD-ROM scsidev: '0,0,0' scsibus: 0 target: 0 lun: 0 Linux sg driver version: 3.1.17 Using libscg version 'schily-0.1' atapi: 1 Device type : Removable CD-ROM .... Track 01: Total bytes read/written: 373970944/373970944 (182603 sectors). Writing time: 1226.954s Fixating... Fixating time: 123.316s cdrecord: fifo had 5891 puts and 5891 gets. cdrecord: fifo was 0 times empty and 5764 times full, min fill was 90%.

    You are done. It is a good idea not to run any CPU intensive application while the CD is burning. Also, some screen-savers eat cycles, so may want to disable it during the process.


Setting Up a IMAP Server

  1. Get and install the IMAP server - The most recent version of the IMAP server (imap-2000-9.i386.rpm) is freely available from RPMFIND or similar service. Install as directed:

    [root@patrick /root]# rpm -i imap-2000-9.i386.rpm
  2. Configure xinetd - If (the default) inetd is installed, you need to aquire xinetd and install it. Once installed, enable the imap service by editing the /etc/xinetd.d as follows:

    service imap { socket_type = stream wait = no user = root server = /usr/sbin/imapd log_on_success += DURATION USERID log_on_failure += USERID disable = no }

    The important part is that the disable flag is set to no. This allows the xinetd to begin accepting IMAP connections.

  3. Converting MH files - Each folder must be converted into a mbx format. Prior to this, decide the directory you wish to place the mbx files in (.e.g., $HOME/mail), create it. After that use the packf utility to convert the directory into the stated "packed" format. For example, if you have the job, home, and net folders, you would use the following commands:

    [pdmcdan@patrick /home/pdmcdan]% mkdir mail; cd mail [pdmcdan@patrick /home/pdmcdan]% packf +job -file job [pdmcdan@patrick /home/pdmcdan]% packf +home -file home [pdmcdan@patrick /home/pdmcdan]% packf +net -file net

    Note: If you wish to convert the inbox folder as well, you need to move to packed version to the user's mail spool file on the local machine. For example, user pdmcdan would have his inbox converted from MH to IMAP as follows:

    [pdmcdan@patrick /home/pdmcdan]% packf +inbox -file /tmp/pdmcdan [pdmcdan@patrick /home/pdmcdan]% mv /tmp/pdmcdan /var/mail/pdmcdan
  4. Configure the client - Each client should be configured to communicated with the IMAP server on the hosting machine. The following is a typical configuration of a NetScape client:

    Field Value Description
    Server Name bart The name of the server host.
    Type IMAP Mail protcol (e.g., POP, IMAP)
    User Name pdmcdan The login name of the mail owner.
    Remember Password enabled Client with remember login name.
    IMAP Server Directory /var/mail/pdmcdan Path to mail directrory (in $HOME of client).


pdmcdan@pdmcdan.com
Last modified : Wed Oct 22 08:04:02 2003
Privacy Policy