Cdvd
CD/DVD Tips And Tricks
  1. # use the program xine-check to determine whether your cd/dvd software (e.g., mplayer, ogle, xine,...) is configured optimally:
     xine-check 
    
  2. # enable dma for your dvd player:
     sudo hdparm -d1 -X34 /dev/dvd 
    
    If you are satisfied with this setting, consider appending its specification to /etc/init.d/bootmisc.sh:
     echo hdparm -d1 -X34 /dev/dvd|sudo bash -c "cat >> /etc/init.d/bootmisc.sh" 
    
  3. # how to write bootable cd/dvd images to cd/dvd using linux: here
  4. # create an exact copy of the information on a cd/dvd to your hard disk:
     sudo umount /dev/cdrom;sudo dd if=/dev/cdrom of=/tmp/image.iso conv=noerror 
    
  5. # how to burn a DVD-Video under Linux with mkisofs and dvdrecord

----

Tips To Write/burn Cds
  1. # initialize the variable ISO_DATA which points to the information you wish to write to a cd/dvd, and the variable ISOFILE which specifies name and location for the cd/dvd image:
     export ISO_DATA=/home/$USER
     export ISOFILE=/tmp/image.iso
     sudo ls -al $ISOFILE 
    
  2. # create the iso image, write it to $ISOFILE and make it contain all files found in $ISO_DATA (including all subdirectories):
     mkisofs -J -r -o $ISOFILE -R $ISO_DATA 
    
  3. # test the newly created iso image (optional step):
     sudo mount -t iso9660 -o loop,ro $ISOFILE /cdrom
     ls -alR /cdrom
     sudo umount /cdrom 
    
  4. # find out which cd/dvd writer can be used:
     export CDWRITER=`sudo cdrecord -scanbus|grep RW|head -1|cut -f2`
     if [ :$CDWRITER: == :: ];then
       export CDWRITER=`sudo cdrecord -scanbus|grep DVDRAM|head -1|cut -f2`
       fi
     if [ :$CDWRITER: == :: ];then
       export CDWRITER=`sudo cdrecord -scanbus|grep SD-R2512|head -1|cut -f2`
       fi
     if [ :$CDWRITER: == :: ];then
       export CDWRITER=0,0,0
       echo REMARK: your cd writer device could not be detected automatically...
       echo REMARK: using $CDWRITER as default device...
       echo REMARK: check whether your default device behaves properly with:
       echo sudo cdrecord -scanbus
       fi
     echo we will be using device :$CDWRITER: to write your cd/dvd to... 
    
  5. # if you wish to clean an existing cd/rw, you can burn the data with:
     time sudo cdrecord dev=$CDWRITER -blank=fast -v -eject $ISOFILE 
    
  6. # if you are using a blank cd/rw, you can burn the data with:
     time sudo cdrecord dev=$CDWRITER -v -eject $ISOFILE 
    

----

Tips To Burn Dvds
  1. # how to burn a DVD-Video under Linux with mkisofs and dvdrecord
  2. # how I burn the information found in $DATA_FOR_DVD on a dvd+rw using linux (and a sony dvd/cd rewritable drive unit model dru-500ax which is found at /dev/dvd):
    1. # specify where the information for the DVD can be found, where the temporary iso file can be stored, and the name of the DVD iso image:
       export DATA_FOR_DVD=/tmp/dvd 
      
    2. # clean the dvd+rw:
       sudo dvd+rw-format -force /dev/dvd 
      
    3. # perform the writing (master and burn an iso9660 volume):
       growisofs -speed=2 -r -T -multi -overburn -Z /dev/dvd $DATA_FOR_DVD 
      
    4. # append more data to an already mastered volume (make sure to use the same options for both initial burning and following sessions):
       growisofs -speed=2 -r -T -multi -overburn -M /dev/dvd $DATA_FOR_DVD 
      
    5. # perform the writing of a pre-mastered iso9660 volume to a dvd:
       growisofs -speed=2 -dvd-compat -r -T -multi -overburn -Z /dev/dvd $DATA_FOR_DVD 
      

----

----

Tips To Set Up firewire Devices
Enabling FireWire support for an external hard disk:
  1. # load the appropriate modules:
     echo ieee1394         >> /etc/modules-`uname -r` # FireWire protocol
     echo ohci1394          >> /etc/modules-`uname -r` # Open Host Controller Interface
     echo raw1394           >> /etc/modules-`uname -r` # Serial Bus Protocol-2
     echo usb-storage       >> /etc/modules-`uname -r` # generic usb support for storage devices 
    
  2. # check whether the device is present according to your machine:
     sudo gscanbus 
    
  3. # if the device is not yet present, you might need to execute the utility from http://www.garloff.de/kurt/linux/rescan-scsi-bus.sh to look for new scsi devices:
     cd /usr/local/bin
     wget -N --retr-symlinks http://www.garloff.de/kurt/linux/rescan-scsi-bus.sh
     sudo sh /usr/local/bin/rescan-scsi-bus.sh 
    
  4. # list the partitions which are currently known to your machine with:
     sudo sfdisk -l 
    

----

Tips To Configure Your Laptop's Modem
Making a modem work consists of two phases: the modem device must first be made available, and then configured.
  1. # configuring the modem driver:
    1. # a winmodem:
      • # under construction
    2. # an intel modem 82801ca/cam, as can be found in a dell latitude c640:
      • # locate the appropriate modem driver from the Internet:
         cd /tmp;
         wget http://linmodems.technion.ac.il/pctel-linux/pctel-0.9.6.tar.gz 
        
      • # unpack the stuff:
         tar -xzvf pctel-0.9.6.tar.gz 
        
      • # configure the make files for your platform:
         cd /tmp/pctel-0.9.6
         ./configure --with-hal=i8xx 
        
      • # make and install the stuff if successful:
         if make;then sudo make install;else echo problem making the stuff =============;fi 
        
      • # make sure that the modem modules are loaded at boot time:
         echo pctel >> /etc/modules-`uname -r`
         echo ptserial  >> /etc/modules-`uname -r` 
        
  2. # configuring the dial in program wvdial:
    • # run the configuration program (if this program does not seem to find your modem, you may have a problem which is not within the scope of this page: read the INSTALL and README files of the modem driver software, e.g., at http://linmodems.technion.ac.il/pctel-linux):
       sudo wvdialconf /etc/wvdial.conf 
      
    • # Note that this program probably terminates mentioning where your modem has been found, e.g.,
       Found a modem on /dev/ttyLT0, using link /dev/modem in config. 
      
      indicates that the modem device is /dev/ttyLT0
    • # edit /etc/wvdial.conf to specify the phone number you wish to dial, the userid that must be used, and the password which should be presented:
       joe /etc/wvdial.conf 
      
      This file typically looks like this:
      [Dialer Defaults]
      Modem = /dev/modem
      Baud = 115200
      Init1 = ATZ
      Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
      ISDN = 0
      Modem Type = Analog Modem
      Phone = <Target Phone Number>
      Username = <Your Login Name>
      Password = <Your Password> 
      
  3. # test your modem configuration:
     sudo wvdial 
    
  4. # if the program claims not to be able to detect /dev/modem, you should create a symbolic link pointing to the modem device (assume /dev/ttyLT0 is reported by the wvdialconf program ):
     ln -sf /dev/ttyLT0 /dev/modem 
    
  5. # you can now use your modem to dial to your Internet service provider using:
     sudo wvdial 
    

----

Tips For Tape Drives

Tape archiving (works for an HP StorageWorks Ultrium 460 using an Adaptec AIC-7892A U160/m (rev 2) SCSI controller)

  1. # use modconf to load the appropriate module for your scsi adapter (e.g., kernel/drivers/scsi/aic7xxx_old)
  2. # use modconf to load the module which provides scsi tape support (i.e., kernel/drivers/scsi/st). Once these modules have been loaded successfully, your scsi tape drive and adapter should appear at the end of
     dmesg 
    
  3. # Assume dmesg reports your scsi tape drive as st0:
     if [ :$TAPEDRIVE: == :: ];then export TAPEDRIVE=st0;fi
     if [ :$REWINDEDTAPE_DEV: == :: ];then export REWINDEDTAPE_DEV=/dev/$TAPEDRIVE;fi
     if [ :$UNREWINDEDTAPE_DEV: == :: ];then export UNREWINDEDTAPE_DEV=/dev/n$TAPEDRIVE;fi 
    
  4. # rewind the current tape:
     time mt -f $REWINDEDTAPE_DEV rewind 
    
  5. # append new data from $DATADIR to the end of the current tape:
     time mt -f $REWINDEDTAPE_DEV rewind  
     time while tar -tzf $UNREWINDEDTAPE_DEV;do date;done #> /tmp/tape.content.txt
     time tar -czvf $UNREWINDEDTAPE_DEV --totals --label=":full backup of :$DATADIR: created on `date`:" $DATADIR 
    
  6. # add $DATADIR to the tape archive without first rewinding the tape:
     if [ :$DATADIR: == :: ];then DATADIR=/home;fi
     time tar -czvf $UNREWINDEDTAPE_DEV --totals --label=":full backup of :$DATADIR: created on `date`:" $DATADIR 
    
  7. # rewind the current tape and list its content:
     time mt -f $REWINDEDTAPE_DEV rewind
     time while tar -tzf $UNREWINDEDTAPE_DEV;do date;done #> /tmp/backup.tape.content.txt 
    
  8. # restore all data from the current tape, given that it matches $PATTERN:
     time mt -f $REWINDEDTAPE_DEV rewind
     if [ :$PATTERN: == :: ];then PATTERN=$USER;fi
     if [ :$RESTORED: == :: ];then RESTORED="/tmp/restored.from.tape.on.`date`";fi
     mkdir -p "$RESTORED"
     cd "$RESTORED";time while tar -xzvf $UNREWINDEDTAPE_DEV \*$PATTERN\*;do date;done 
    
  9. # eject the current tape after rewinding:
     time mt -f $REWINDEDTAPE_DEV offline 
    

----

Tips For Usb Devices
  1. # if you want to make sure that usb 2.0 devices are used at their maximum throughput, you should load the ehci-hcd module at boot time:
     echo ehci-hcd >> /etc/modules-`uname -r` 
    

----