cvs commit: hints cdrw-hint.txt

timothy at linuxfromscratch.org timothy at linuxfromscratch.org
Wed Dec 18 16:09:22 PST 2002


timothy     02/12/18 19:09:22

  Modified:    .        cdrw-hint.txt
  Log:
  Updates by author.
  
  Revision  Changes    Path
  1.3       +95 -15    hints/cdrw-hint.txt
  
  Index: cdrw-hint.txt
  ===================================================================
  RCS file: /home/cvsroot/hints/cdrw-hint.txt,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- cdrw-hint.txt	26 Aug 2002 20:58:34 -0000	1.2
  +++ cdrw-hint.txt	19 Dec 2002 00:09:22 -0000	1.3
  @@ -17,7 +17,7 @@
   
   The problem is that WRITE access isn't supported, so if you have a CD-RW drive
   you can't use Linux to write to it with a UDF filesystem, all you can do is
  -write Disk-at-a-time or Track-at-a-time with CDrecord and friends( see the BLFS
  +write Disk-at-a-time or Track-at-a-time with CDrecord and friends (see the BLFS
   book for how-to on that).
   
   If, on the other hand, you were using, God forbid, Microsoft Windows (TM), then
  @@ -43,14 +43,19 @@
   ---------------------------------------------------
   
   >From the kernel patch site above download the patch for the version of the
  -kernel you are using. I'm currently on 2.4.19, so I got packet-2.4.19-2.patch.
  -Check that the patch you get is the latest dated for your kernel, they seem to
  -be updated quite often (see the Usenet Archives for why, when etc..)
  +kernel you are using. If you are using  2.4.20, get the packet-2.4.20.patch.  If 
  +you are using linux 2.4.19, then get patch-2.4.19-2.patch.Check that the patch 
  +you get is the latest dated for your kernel, they seem tobe updated quite often 
  +(see the Usenet Archives for why, when etc..)
  +
  +If you are using a '-pre' or '-ac' kernel you may have to try the nearest patch 
  +and then apply any missed chunks manually.  This has been known to work, but you 
  +are on your own.  You will know if this applies to you.
   
  -Become superuser and move to your linux source directory, then apply the patch
  -with:
  +Become superuser and move to your linux source directory, then 
  +apply the patch with:
   
  -    patch -Np1 -i packet-2.4.19-2.patch
  +    patch -Np1 -i packet-2.4.20.patch
   
   Now run 'make xconfig', or whatever version of kernel config you use (the LFS 
   book uses  'make menuconfig', which is fine)
  @@ -58,7 +63,7 @@
   Go to the section on 'Block Devices' and select:
       Packet writing on CD/DVD media
   
  -If you are into modules you can do it that way - I didn't.
  +If you are into modules you can do it that way as I now do.
   
   Now go to the section on 'File systems' and select the following:
       UDF files systems support (read only)
  @@ -74,6 +79,13 @@
   
   then copy the resulting kernel to /boot as, say, vmlinuz-2.4.19-UDF.
   
  +If you are using modules, you now need to
  +
  +   make modules
  +   make modules_install
  +   
  +The packet writing module is called pktcdvd.o.
  +
   I use GRUB as a bootloader, so you will need to read the book and hints on lilo
   if you use that, but set up your boot loader to be able to boot either your old
   kernel or this new one. (Always keep the old kernel bootable, just in case...)
  @@ -82,8 +94,7 @@
   
   Note: I think that if you built the packet driver as a module, you need to add:
       alias block-major-97 pktcdvd
  -to your /etc/modules file, as I don't use modules, i don't have any experience 
  -here.
  +to your /etc/modules.conf file.
   
   Make the Packet Driver device file.
   -----------------------------------
  @@ -129,17 +140,86 @@
   
       pktsetup /dev/pktcdvd0 /dev/scd0
   
  -associates a packet-driver with your CD-RW drive (this doesn't survive a reboot).
  -
  +associates a packet-driver with your CD-RW drive (this doesn't survive a 
  +reboot).
       mount /dev/pktcdvd0 /mnt/cdrom -t udf -o rw,noatime
   
   will mount your new disk as a read-write filesystem, all ready to use, just like
  -any other hard disk.  ('noatime' just speeds things up by not updating the access 
  -times, CD-RW can be a little slow)
  +any other hard disk.  ('noatime' just speeds things up by not updating the 
  +access times, CD-RW can be a little slow)
   
   Then you can 'umount /dev/pktcdvd0' in the usual way, when you're done.
   
  -That's all I did, and it works for me.  Good luck.
  +Tighter Integration.
  +----------------------
  +
  +I have gone a little further and added the following bootscripts to my 
  +system, so that the packet writing elements are set up every time I boot :
  +
  +cat /etc/rc.d/init.d/packetwrite << "EOF"
  +#!/bin/bash
  +# Begin $rc_base/init.d/packetwrite
  +
  +# Based on sysklogd script from LFS-3.1 and earlier.
  +# Rewritten by the blessed Gerard Beekmans
  +# gerard at linuxfromscratch.org
  +#
  +# Trivial usage for packet writing added by
  +# Richard Downing - richard.downing at bcs.org.uk
  +
  +source /etc/sysconfig/rc
  +source $rc_functions
  +
  +case "$1" in
  +	start)
  +		echo "Prepare CDRW drive for Packet Writing..."
  +		pktsetup /dev/pktcdvd0 /dev/scd0
  +		evaluate_retval
  +		;;
  +
  +	stop)
  +		echo "Tearing down CDRW for Packet Writing..."
  +		pktsetup -d /dev/pktcdvd0
  +		evaluate_retval
  +		;;
  +
  +	*)
  +		echo "Usage: $0 {start|stop}"
  +		exit 1
  +		;;
  +esac
  +
  +# End $rc_base/init.d/packetwrite
  +EOF
  +
  +chmod +x /etc/rc.d/init.d/packetwrite
  +cd /etc/rc.d/rc3.d
  +ln -s ../init.d/packetwrite S85packetwrite
  +cd ../rc0.d
  +ln -s ../init.d/packetwrite K10packetwrite
  +
  +I then create a mount point:
  +
  +mkdir /mnt/cdrw
  +
  +and add the following line to /etc/fstab:
  +
  +/dev/pktcdvd0 /mnt/cdrw udf rw,noauto,noatime,user 0 0
  +
  +which allows any user to mount the CDRW with:
  +
  +mount /mnt/cdrw
  +
  +NOTE the noauto switch is needed as the packerwriter may not be initialised
  +when mountfs runs during boot.
  +
  +End of Hint.
  +---------------
  +
  +That's all I did, and it works for me.  I'd appreciate any feedback you have 
  +about this hint.  Good luck.
  +Richard.Downing at bcs.org.uk
  +
   
   
   
  
  
  
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe hints' in the subject header of the message



More information about the hints mailing list