[ccoss] Re: unmount cdrom, device is busy, what is using it,using fuser as a solution
- From: Christopher Paulin <cpaulin@xxxxxxx>
- To: ccoss@xxxxxxxxxxxxx
- Date: Mon, 01 Dec 2003 22:57:04 -0500
dave wrote:
>Christopher Paulin wrote:
>
>
>>p450:/mnt/mandrake/home/chris_temp # mount -t iso9660 -o
>>ro,loop=/dev/loop0 cdrecorder.iso /media/cdrecorder/
>>p450:/mnt/mandrake/home/chris_temp # exit
>>exit
>>
>>
>
>you can mount an iso image using only the '-o loop' option....
>
>insp5100:~# mount -o loop /home/dave/iso/sarge-i386-netinst.iso /mnt/
>insp5100:~# ls /mnt/
>README.html README.non-US debian install pics
>README.mirrors.html README.txt dists isolinux pool
>README.mirrors.txt TRANS.TBL doc md5sum.txt tools
>insp5100:~# umount /mnt/
>
>i believe the next available loopback device is used when you don't
>specify one. i verified this wasn't debian-specific by also doing it on
>a Fedora box.
>
It worked!
chris@p450:~> mount -o loop /mnt/mandrake/home/chris_temp/cdrecorder.iso
/media/cdrecorder/
mount: only root can do that
chris@p450:~> su
Password:
p450:/home/chris # mount -o loop
/mnt/mandrake/home/chris_temp/cdrecorder.iso /media/cdrecorder/
p450:/home/chris # ls /media/cdrecorder/
. .. Autorun.ICO Autorun.INF IDE Lan Modem Peripheral Setup.exe
Sound USB Utility VGA
p450:/home/chris # umount /media/cdrecorder/
p450:/home/chris # ls /media/cdrecorder/
. ..
p450:/home/chris # exit
exit
chris@p450:~>
>
>
>
>
>>chris@p450:/mnt/mandrake/home/chris_temp> cdrecord -v speed=16 dev=1,0,0
>>-data cdrecorder.iso
>>
>>
>
>also, you can save some keystrokes here with a configuration file
>(/etc/default/cdrecord on debian and gentoo, but might be cdrecord.conf
>on others).
>
>see below for an example. this allows me to type:
>cdrecord -v /path/to/image.iso
>
That also worked!
chris@p450:~> su
su
Password:
p450:/home/chris # emacs /etc/default/cdrecord &
[1] 1554
I have to go this extra work:
p450:/home/chris # Xlib: connection to ":0.0" refused by server
Xlib: Invalid XDM-AUTHORIZATION-1 key (failed key comparison)
emacs: Cannot connect to X server :0.0.
Check the DISPLAY environment variable or use `-d'.
Also use the `xhost' program to verify that it is set to permit
connections from your machine.
[1]+ Exit 1 emacs /etc/default/cdrecord
p450:/home/chris # exit
exit
Temporary fix:
chris@p450:~> xhost +
access control disabled, clients can connect from any host
I create the configuration file:
chris@p450:~> su
Password:
p450:/home/chris # emacs /etc/default/cdrecord &
[1] 1562
My /etc/default/cdrecord is the same as yours except:
cdrom= 0,0,0 -1 -1 burnfree
is
cdrom= 1,0,0 -1 -1 burnfree
Also, I make sure there is only one tab between each entry because I was
getting this:
chris@p450:~> cdrecord -v -dummy
/mnt/mandrake/home/chris_temp/cdrecorder.iso
Cdrecord 1.11a28 (i686-suse-linux) Copyright (C) 1995-2002 Jörg Schilling
TOC Type: 1 = CD-ROM
cdrecord: Invalid argument. Invalid lun specifier in ' 1,0,0
-1 -1 burnfree'. Cannot open SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you
are root.
chris@p450:~>
---------------------------------------------------------------------------
p450:/home/chris # exit
exit
I use the -dummy option because I do not need to make another copy, only
to test this command.
chris@p450:~> cdrecord -v -dummy
/mnt/mandrake/home/chris_temp/cdrecorder.iso
Cdrecord 1.11a28 (i686-suse-linux) Copyright (C) 1995-2002 Jörg Schilling
TOC Type: 1 = CD-ROM
scsidev: '1,0,0'
scsibus: 1 target: 0 lun: 0
Linux sg driver version: 3.2.0
Using libscg version 'schily-0.6'
Driveropts: 'burnfree'
atapi: 1
Device type : Removable CD-ROM
Version : 0
Response Format: 2
Capabilities :
Vendor_info : 'SONY '
Identifikation : 'DVD RW DRU-510A '
Revision : '1.0c'
Device seems to be: Generic mmc2 DVD.
cdrecord: This version of cdrecord does not include DVD-R/DVD-RW support
code.
cdrecord: If you need DVD-R/DVD-RW support, ask the Author for
cdrecord-ProDVD.
Using generic SCSI-3/mmc CD-R driver (mmc_cdr).
Driver flags : SWABAUDIO BURNFREE
Supported modes: TAO PACKET SAO SAO/R96R RAW/R96R
Drive buf size : 8112896 = 7922 KB
FIFO size : 4194304 = 4096 KB
Track 01: data 442 MB
Total size: 508 MB (50:19.88) = 226491 sectors
Lout start: 508 MB (50:21/66) = 226491 sectors
Current Secsize: 2048
ATIP info from disk:
Indicated writing power: 5
Is not unrestricted
Is not erasable
Disk sub type: Medium Type A, high Beta category (A+) (3)
ATIP start of lead in: -11634 (97:26/66)
ATIP start of lead out: 359846 (79:59/71)
Disk type: Short strategy type (Phthalocyanine or similar)
Manuf. index: 3
Manufacturer: CMC Magnetics Corporation
Blocks total: 359846 Blocks current: 359846 Blocks remaining: 133355
Starting to write CD/DVD at speed 24 in dummy TAO mode for single session.
Last chance to quit, starting dummy write in 0 seconds. Operation starts.
Waiting for reader process to fill input buffer ... input buffer ready.
BURN-Free is ON.
cdrecord: Turning BURN-Free on
Starting new track at sector: 0
Track 01: 442 of 442 MB written (fifo 100%) 28.3x.
Track 01: Total bytes read/written: 463849472/463849472 (226489 sectors).
Writing time: 119.659s
Fixating...
WARNING: Some drives don't like fixation in dummy mode.
Fixating time: 0.005s
cdrecord: fifo had 7307 puts and 7307 gets.
cdrecord: fifo was 0 times empty and 1539 times full, min fill was 87%.
chris@p450:~>
Since this was a dummy write, I shouldn't be able to mount the CD.
chris@p450:~> mount /media/cdrecorder/
/dev/cdrecorder: Input/output error
mount: I could not determine the filesystem type, and none was specified
chris@p450:~>
After ejecting the CD, it looks blank as expected.
Christopher Paulin
>
>the CDR_DEVICE line is just a pointer to the specified line at the
>bottom, CDR_SPEED is the max speed of your burner, CDR_FIFO is your FIFO
>buffer size (which I left at the default). on the cdrom line, Chris
>you'd want 1,0,0 in the device column, and burnfree in the driveropts
>column if your burner has it, or just empty quotes if it doesn't.
>
>dave
>
>
>
>#ident @(#)cdrecord.dfl 1.4 02/07/07 Copyr 1998 J. Schilling
>#
># This file is /etc/default/cdrecord
># It contains defaults that are used if no command line option
># or environment is present.
>#
># The default device, if not specified elswhere
>#
>CDR_DEVICE=cdrom
>
>
>#
># The default speed, if not specified elswhere
>#
># Note that newer cdrecord versions do not default
># to speed=1. For MMC compliant drives, the default
># is to write at maximum speed, so it in general does
># not make sense to set up a default speed in /etc/default/cdrecord
>#
>CDR_SPEED=24
>
>
>#
># The default FIFO size if, not specified elswhere
>#
>CDR_FIFOSIZE=4m
>
>#
># The following definitions allow abstract device names.
># They are used if the device name does not contain the
># the characters ',', ':', '/' and '@'
>#
># Unless you have a good reason, use speed == -1 and let
># cdrecord use it's intercal drive specific defaults.
>#
># drive name device speed fifosize driveropts
>#
>teac= 1,3,0 -1 -1 ""
>panasonic= 1,4,0 -1 -1 ""
>plextor= 1,4,0 -1 -1 ""
>sanyo= 1,4,0 -1 -1 burnfree
>yamaha= 1,5,0 -1 -1 ""
>#cdrom= 0,0,0 24 4m burnfree
>cdrom= 0,0,0 -1 -1 burnfree
>
>_______________________________________________
>CCOSS mailing list
>ccoss@xxxxxxxxxxxxx
>CCOSS mailing list page: http://www.freelists.org/cgi-bin/list?list_id=3594
>CCOSS Web page: http://www.ccoss.org
>
>
>
_______________________________________________
CCOSS mailing list
ccoss@xxxxxxxxxxxxx
CCOSS mailing list page: http://www.freelists.org/cgi-bin/list?list_id=3594
CCOSS Web page: http://www.ccoss.org
Other related posts:
- » [ccoss] Re: unmount cdrom, device is busy, what is using it,using fuser as a solution
- » [ccoss] Re: unmount cdrom, device is busy, what is using it,using fuser as a solution
- » [ccoss] Re: unmount cdrom, device is busy, what is using it,using fuser as a solution
- » [ccoss] Re: unmount cdrom, device is busy, what is using it,using fuser as a solution
- » [ccoss] Re: unmount cdrom, device is busy, what is using it,using fuser as a solution
- » [ccoss] Re: unmount cdrom, device is busy, what is using it,using fuser as a solution
- » [ccoss] Re: unmount cdrom, device is busy, what is using it,using fuser as a solution
- » [ccoss] Re: unmount cdrom, device is busy, what is using it,using fuser as a solution
- » [ccoss] Re: unmount cdrom, device is busy, what is using it,using fuser as a solution