Bash update cdrom status
Johnny Rosenberg
gurus.knugum at gmail.com
Sun Nov 24 15:46:37 UTC 2013
2013/11/24 Colin Law <clanlaw at googlemail.com>
> On 24 November 2013 12:32, Johnny Rosenberg <gurus.knugum at gmail.com>
> wrote:
> > 2013/11/24 Colin Law <clanlaw at googlemail.com>
> >> ...
> >> What does the udisks command in your script show before and after
> blanking
> >> it?
> >
> >
> > They showed the same thing before and after blanking. Just to be sure,
> I'll
> > test that again right now:
>
> Sorry, I was not clear enough, I meant you to look at the complete
> output from udisks to see if there is any change at all after the
> erase.
>
No, you wasn't clear enough… he he he… Well, now you are, so I'll try again…
Burning a nonsense-file to the disc right now with Brasero.
Burning finished, open tray, insert CD again, wait for CD to be detected,
then:
~$ udisks --show-info "${CdRom}"
Showing information for /org/freedesktop/UDisks/devices/sr0
native-path:
/sys/devices/pci0000:00/0000:00:1f.1/host0/target0:0:1/0:0:1:0/block/sr0
device: 11:0
device-file: /dev/sr0
presentation: /dev/sr0
by-id: /dev/disk/by-id/ata-Optiarc_DVD_RW_AD-5540A
by-path: /dev/disk/by-path/pci-0000:00:1f.1-scsi-0:0:1:0
detected at: söndag 2013-11-24 12:27
system internal: 0
removable: 1
has media: 1 (detected at söndag 2013-11-24 13:29)
detects change: 1
detection by polling: 1
detection inhibitable: 1
detection inhibited: 0
is read only: 0
is mounted: 0
mount paths:
mounted by uid: 0
presentation hide: 0
presentation nopolicy: 0
presentation name:
presentation icon:
automount hint:
size: 618496
block size: 2048
job underway: no
usage: filesystem
type: iso9660
version: Joliet\x20Extension
uuid:
label: Dataskiva (24 nov 13)
optical disc:
blank: 0
appendable: 0
closed: 1
num tracks: 1
num audio tracks: 0
num sessions: 1
drive:
vendor: Optiarc
model: Optiarc DVD RW AD-5540A
revision: 2.61
serial:
WWN:
detachable: 0
can spindown: 0
rotational media: Yes, unknown rate
write-cache: unknown
ejectable: 1
adapter: /org/freedesktop/UDisks/adapters/0000_3a00_3a1f_2e1
ports:
/org/freedesktop/UDisks/adapters/0000_3a00_3a1f_2e1/host0
similar devices:
media: optical_cd_rw
compat: optical_cd optical_cd_r optical_cd_rw optical_dvd
optical_dvd_plus_r optical_dvd_plus_r_dl optical_dvd_plus_rw optical_dvd_r
optical_dvd_rw optical_mrw optical_mrw_w
interface: scsi
if speed: (unknown)
ATA SMART: not available
Now erasing:
~$ cdrecord blank=fast dev="${CdRom}"
wodim: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK limits.
Device type : Removable CD-ROM
Version : 5
Response Format: 2
Capabilities :
Vendor_info : 'Optiarc '
Identification : 'DVD RW AD-5540A '
Revision : '2.61'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Using generic SCSI-3/mmc CD-R/CD-RW driver (mmc_cdr).
Driver flags : MMC-3 SWABAUDIO BURNFREE
Supported modes: TAO PACKET SAO SAO/R96R RAW/R96R
Speed set to 706 KB/s
Starting to write CD/DVD at speed 4.0 in real BLANK mode for single session.
Last chance to quit, starting real write in 0 seconds. Operation starts.
~$
Doing the same udisks command again:
~$ udisks --show-info "${CdRom}"
Showing information for /org/freedesktop/UDisks/devices/sr0
native-path:
/sys/devices/pci0000:00/0000:00:1f.1/host0/target0:0:1/0:0:1:0/block/sr0
device: 11:0
device-file: /dev/sr0
presentation: /dev/sr0
by-id: /dev/disk/by-id/ata-Optiarc_DVD_RW_AD-5540A
by-path: /dev/disk/by-path/pci-0000:00:1f.1-scsi-0:0:1:0
detected at: söndag 2013-11-24 12:27
system internal: 0
removable: 1
has media: 1 (detected at söndag 2013-11-24 13:29)
detects change: 1
detection by polling: 1
detection inhibitable: 1
detection inhibited: 0
is read only: 0
is mounted: 0
mount paths:
mounted by uid: 0
presentation hide: 0
presentation nopolicy: 0
presentation name:
presentation icon:
automount hint:
size: 618496
block size: 2048
job underway: no
usage: filesystem
type: iso9660
version: Joliet\x20Extension
uuid:
label: Dataskiva (24 nov 13)
optical disc:
blank: 0
appendable: 0
closed: 1
num tracks: 1
num audio tracks: 0
num sessions: 1
drive:
vendor: Optiarc
model: Optiarc DVD RW AD-5540A
revision: 2.61
serial:
WWN:
detachable: 0
can spindown: 0
rotational media: Yes, unknown rate
write-cache: unknown
ejectable: 1
adapter: /org/freedesktop/UDisks/adapters/0000_3a00_3a1f_2e1
ports:
/org/freedesktop/UDisks/adapters/0000_3a00_3a1f_2e1/host0
similar devices:
media: optical_cd_rw
compat: optical_cd optical_cd_r optical_cd_rw optical_dvd
optical_dvd_plus_r optical_dvd_plus_r_dl optical_dvd_plus_rw optical_dvd_r
optical_dvd_rw optical_mrw optical_mrw_w
interface: scsi
if speed: (unknown)
ATA SMART: not available
I copied the text to two files, ”BeforeErasing” and ”AfterErasing”, then
compared them:
~$ diff AfterErasing BeforeErasing
~$
So obviously, they are the same.
Ejecting:
~$ eject $CdRom
~$
Inserting manually. Udisks again:
~$ udisks --show-info "${CdRom}"
Showing information for /org/freedesktop/UDisks/devices/sr0
native-path:
/sys/devices/pci0000:00/0000:00:1f.1/host0/target0:0:1/0:0:1:0/block/sr0
device: 11:0
device-file: /dev/sr0
presentation: /dev/sr0
by-id: /dev/disk/by-id/ata-Optiarc_DVD_RW_AD-5540A
by-path: /dev/disk/by-path/pci-0000:00:1f.1-scsi-0:0:1:0
detected at: söndag 2013-11-24 12:27
system internal: 0
removable: 1
has media: 1 (detected at söndag 2013-11-24 16:41)
detects change: 1
detection by polling: 1
detection inhibitable: 1
detection inhibited: 0
is read only: 0
is mounted: 0
mount paths:
mounted by uid: 0
presentation hide: 0
presentation nopolicy: 0
presentation name:
presentation icon:
automount hint:
size: 2048
block size: 2048
job underway: no
usage:
type:
version:
uuid:
label:
optical disc:
blank: 1
appendable: 0
closed: 0
num tracks: 1
num audio tracks: 0
num sessions: 1
drive:
vendor: Optiarc
model: Optiarc DVD RW AD-5540A
revision: 2.61
serial:
WWN:
detachable: 0
can spindown: 0
rotational media: Yes, unknown rate
write-cache: unknown
ejectable: 1
adapter: /org/freedesktop/UDisks/adapters/0000_3a00_3a1f_2e1
ports:
/org/freedesktop/UDisks/adapters/0000_3a00_3a1f_2e1/host0
similar devices:
media: optical_cd_rw
compat: optical_cd optical_cd_r optical_cd_rw optical_dvd
optical_dvd_plus_r optical_dvd_plus_r_dl optical_dvd_plus_rw optical_dvd_r
optical_dvd_rw optical_mrw optical_mrw_w
interface: scsi
if speed: (unknown)
ATA SMART: not available
~$
Copied the output to AfterReload, then:
~$ diff AfterErasing AfterReload
11c11
< has media: 1 (detected at söndag 2013-11-24 13:29)
---
> has media: 1 (detected at söndag 2013-11-24 16:41)
25c25
< size: 618496
---
> size: 2048
28,30c28,30
< usage: filesystem
< type: iso9660
< version: Joliet\x20Extension
---
> usage:
> type:
> version:
32c32
< label: Dataskiva (24 nov 13)
---
> label:
34c34
< blank: 0
---
> blank: 1
36c36
< closed: 1
---
> closed: 0
~$
Johnny Rosenberg
>
> Colin
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20131124/e5ec372d/attachment.html>
More information about the ubuntu-users
mailing list