From owner-freebsd-questions@FreeBSD.ORG Sat Jul 10 01:13:41 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA13A1065670 for ; Sat, 10 Jul 2010 01:13:41 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id 72C348FC13 for ; Sat, 10 Jul 2010 01:13:41 +0000 (UTC) Received: from r55.edvax.de (port-92-195-117-232.dynamic.qsc.de [92.195.117.232]) by mx01.qsc.de (Postfix) with ESMTP id 5A1693D47F; Sat, 10 Jul 2010 03:13:18 +0200 (CEST) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id o6A1DGvv002511; Sat, 10 Jul 2010 03:13:17 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Sat, 10 Jul 2010 03:13:16 +0200 From: Polytropon To: Gary Kline Message-Id: <20100710031316.e324bbed.freebsd@edvax.de> In-Reply-To: <20100708182305.GA78236@thought.org> References: <20100708182305.GA78236@thought.org> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: FreeBSD Mailing List Subject: Re: troubles with my optical drive on old thinkpad.... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jul 2010 01:13:41 -0000 On Thu, 8 Jul 2010 11:23:08 -0700, Gary Kline wrote: > > guys, > > i only have a couple more black cd-r discs left; have wasted many since > i WAS ABLE to install PC-BSD. the optical [dvd/cd] drive =does= read > my ancient 5.3 CD set, but it reads nothing i burn. i have tried > burning 8.0 bootonly.iso on the laptop (via k3b), and tried the same > from my twin optical drives here on my desktop. > > can anybody suggest what i'm doing wrong? First of all, let's check the basics. You have CDs that can be burned without errors, but can't be read afterwards, in multiple drives. This indicates that the writing process is okay, but maybe the content of the writing process is wrong. So let's first check that. Use the command % cdcontrol -f /dev/acd0 info If /dev/acd0 is your default drive (which can be set using the environment variable CDROM), you don't need the -f parameter. to get a TOC listing of the CD in the drive. This doesn't involve any mounting, just reading. It should give something like this: % cdcontrol info Starting track = 1, ending track = 1, TOC size = 18 bytes track start duration block length type ------------------------------------------------- 1 0:02.00 57:57.56 0 260831 data 170 57:59.56 - 260831 - - This example is taken from a FreeBSD 7.0 CD #1. It shows one data track. This is correct, as the CD has been created from an ISO. But a defective ISO, or just a plain file, would result in a similar output, so let's next verify what's on the CD - fs-type-wise. % file - < /dev/acd0 /dev/stdin: ISO 9660 CD-ROM filesystem data 'FreeBSD_Install ' (bootable) Okay, an ISO is on it. Good. The final step is to try to mount it. I'll give the full set of options here, you usually don't have to do that because of an entry in /etc/fstab (which you don't have when using HAL's automounting). % sudo mount -t cd9660 -o ro /dev/acd0 /media/cdrom/ % df -h /media/cdrom/ Filesystem Size Used Avail Capacity Mounted on /dev/acd0 509M 509M 0B 100% /media/cdrom Excellent. Now we could also "ls -R /media/cdrom" to see a listing of all the files, but that's not needed, as the CD is obviously working. % sudo mount /media/cdrom % cdcontrol eject If you can verify your CDs with THOSE steps, they are okay, as they are valid data CDs. You should be able to reproduce that with ANY drive. If you can't (e. g. no file, no mount), check the process of how you've initially created them. Just for testing, have a blank CD handy, and do this (obviously stupid) exercise: 1. As you're going to use cdrecord, make sure ATAPICAM is in your kernel, or the module atapicam.ko is loaded. # kldstat -v | grep atapicam 45 ata/atapicam In this example, I have ATAPICAM in the kernel. Otherwise, use # kldload atapicam.ko to dynamically load it. 2. Make sure to have sufficient permissions for cd and xpt devices. If in doubt, test as root (which I'll do in this example, so no further checking). 3. Prepare a valid ISO: # cd /usr # mkisofs -r -J -o /tmp/foo.iso src/ This will create a file system with the contents of /usr/src. You can choose any other directory for testing, but I think /usr/src is good as it doesn't containt too much stuff, so it should be quite quick. Make sure you have approx. 500 MB on /tmp. If not, use any other directory with sufficient space; I usually use my 10 GB /scratch partition for such things. 4. Find out the SCSI ID for your CD recorder. # camcontrol devlist at scbus2 target 0 lun 0 (cd0,pass0) In this example, it is 2,0,0; the corresponding files are /dev/cd0 and /dev/pass0 (which you need +w permission for). If there's no such output, go back to square 1. :-) 5. Insert the blank media, let the drive settle, and record the ISO: # cdrecord dev=2,0,0 speed=16 -v -eject -tao -data The ISO should now be recorded to the CD. The recording speed is defined to be 16x. Most drives know the best speed by theirselves, but it's not always compatible with the media. Some say they are 48x, but aren't. So 16x is a good speed - not too fast, not to slow. Make sure to see the options for cdrecord: The CD has to be created as "track at once" (-tao), and it will also be closed, so you can't append any new data. But for this test, it's not needed. It's also defined to be a data CD (not a music CD). This test is just a "basic minimum variables" test. As much as possible is predefined, so there's fewer room for mistakes. That's why I'm not giving pictural instructions for GUI programs - there's so much one can't check, and also so much one can do wrong by accident. So I rely on a kind of highly controlled environment... :-) Please try this and post the results - especially if anything strange comes up. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...