Cdvd
CD/DVD Tips And Tricks
- # use the program xine-check to determine whether your cd/dvd software (e.g., mplayer, ogle, xine,...) is configured optimally:
xine-check
- # 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"
- # how to write bootable cd/dvd images to cd/dvd using linux: here
- # 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
- # how to burn a DVD-Video under Linux with mkisofs and dvdrecord
|

|
Tips To Write/burn Cds
- # 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
- # 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
- # test the newly created iso image (optional step):
sudo mount -t iso9660 -o loop,ro $ISOFILE /cdrom
ls -alR /cdrom
sudo umount /cdrom
- # 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...
- # 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
- # 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
- # how to burn a DVD-Video under Linux with mkisofs and dvdrecord
- # 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):
- # 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
- # clean the dvd+rw:
sudo dvd+rw-format -force /dev/dvd
- # perform the writing (master and burn an iso9660 volume):
growisofs -speed=2 -r -T -multi -overburn -Z /dev/dvd $DATA_FOR_DVD
- # 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
- # 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:
- # 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
- # check whether the device is present according to your machine:
sudo gscanbus
- # 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
- # 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.
- # configuring the modem driver:
- # a winmodem:
- # 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`
- # 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>
- # test your modem configuration:
sudo wvdial
- # 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
- # 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)
- # use modconf to load the appropriate module for your scsi adapter (e.g., kernel/drivers/scsi/aic7xxx_old)
- # 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
- # 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
- # rewind the current tape:
time mt -f $REWINDEDTAPE_DEV rewind
- # 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
- # 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
- # 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
- # 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
- # eject the current tape after rewinding:
time mt -f $REWINDEDTAPE_DEV offline
|

|
Tips For Usb Devices
- # 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`
|

|