Page 1 of 2 12 LastLast
Results 1 to 10 of 42

Thread: How to fix cd burning issues

Hybrid View

  1. #1
    Join Date
    Apr 2006
    Location
    Devon, UK
    Beans
    14
    Distro
    Ubuntu Karmic Koala (testing)

    How to fix cd burning issues

    I've noticed a number of posts regarding different issues with this and suffered from the same problem myself - namely that I could only successfully burn when running my chosen burning app as sudo. A lot of the posts suggest problems with K3b, Gnomebaker or Ubuntu itself but the problem is present in many distros and is related to cdrecord and kernel versions. I wouldn't expect a distro resolution anytime soon since Debian has these bugs as outstanding for over a year now.

    Anyway this is what I did to fix the issues I suffered from:

    Issue 1:
    Your chosen app or if running cdrecord -scanbus in terminal gives the following or similar error:
    Error trying to open /dev/sg0 exclusively (Permission denied)... retrying in 1 second.

    This threw me for a long time. /dev/sg0 is a device that is created at startup. You can change the permissions on this and burn successfully without running under sudo but the next time you start your machine the problem will simply come back again.

    After much research I found that is related to udev (which replaced the previous hotplug system). A look at 40-permissions.rules in /etc/udev/rules.d confirmed that the # SCSI devices section contained no entry for sg0. Therefore a new rule is required. You could simply add the necessary line in 40-permissions.rules but if there is an update to udev it will get overwritten and you'll be back where you started. So I created a new rule and called it 15-local.rules and put the following lines in the file:

    # SCSI devices
    BUS=="scsi", KERNEL=="sg[0-9]", NAME="%k", GROUP="cdrom"

    Note: I have a SATA disk with an IDE burner and my system therefore uses SCSI emulation. If you have a pure IDE system and have this permissions problem your fix may be slightly different but will still involve a udev rule.

    Restart the pc and then, in terminal, run cdrecord -scanbus expecting permissions problems to now be resolved but no - now get:

    Issue 2:

    Error: Cannot gain SYS_RAWIO capability.Is cdrecord installed SUID root?

    So now more research and a note of caution about running executables as suid root. A regular user will be able to run a program as root if it is set to SUID root. All programs and files on your computer with the s bits appearing on its mode, have the SUID -rwsr-xr-x or SGID -r-xr-sr-x bit enabled. Because these programs grant special privileges to the user who is executing them, it is important to remove the s bits from root-owned programs that won't absolutely require such privilege. Setting a program to run as suid root can create a vulnerability which could potentially grant unauthorized root access to an attacker.

    I don't believe that cdrecord will fall into this category but can't guarantee that this the case. If this concerns you then your only alternative is to run your burning app as sudo - if Gnomebaker or K3b the easiest way is to use the Alacarte Menu Editor and, in Command, place gksudo ahead of the executable name (e.g. gksudo k3b), you'll then be prompted for the sudo password properly in a GUI interface when you run the program. If you're happy to run cdrecord as suid root do the following:

    In terminal run the following commands:

    sudo chmod 4755 /usr/bin/cdrecord
    sudo chmod 4755 /usr/bin/cdrecord.mmap
    sudo chmod 4755 /usr/bin/X11/cdrecord.mmap
    sudo chmod 4755 /usr/bin/cdrdao
    sudo chmod 4755 /usr/bin/X11/cdrdao

    or if preferred type sudo nautilus in terminal, browse to the above files, go to the Permissions tab and check the box Set user ID under Special flags.

    That should fix all. Gnomebaker will run without issue. If your chosen burner app is K3b you'll get the message "System Configuration Problems - cdrecord = 2.6.8. Since Linux kernal 2.6.8 cdrecord Solution: use K3bSetup to solve this problem." This you mustn't do. If you run K3bSetup it will simply reset the permissionas back again. You can safely disable this message and K3b should work without issue.
    Last edited by wilko; July 17th, 2006 at 12:46 PM. Reason: Error in permission settings

  2. #2
    Join Date
    Sep 2005
    Beans
    762

    Re: How to fix cd burning issues

    I had the same in breezy, dapper.
    So I just put this in the /etc/rc.local file.

    Code:
    chown root:cdrom /dev/sg0
    Or if you have another device that are for the cdrom just add it.

    And after a reboot everything works like it should. Since the rc.local runs at startup

  3. #3
    Join Date
    Apr 2006
    Location
    Devon, UK
    Beans
    14
    Distro
    Ubuntu Karmic Koala (testing)

    Re: How to fix cd burning issues

    ALways more than one way to skin a rabbit - your way fixes issue 1 as well. I went for udev because it seems it's going to affect a lot in the future and I felt it was time to get stuck in and learn about it.

  4. #4
    Join Date
    Feb 2006
    Beans
    78
    Distro
    Kubuntu 9.10 Karmic Koala

    Re: How to fix cd burning issues

    i've made a fresh dapper install and i'm now having both issues.
    it's strage because i don't remember having issue 2 before...
    anyway, issue 1 is easily solved, but shouldn't there be another way of solving issue 2? i haven't tried the solution because i'm not able to burn cds under k3b or gnomebaker even with gksudo...
    but i can burn ISOs just fine using nautilus... and i've had no problem erasing cd-rws with k3b or gnomebaker...

  5. #5
    Join Date
    Apr 2006
    Location
    Devon, UK
    Beans
    14
    Distro
    Ubuntu Karmic Koala (testing)

    Re: How to fix cd burning issues

    Issue 2 is specific in that cdrecord needs root or suid root access to work. According to the cdrecord manual (http://www.linuxcommand.org/man_pages/cdrecord1.html) you can run cdrecord safely as suid root. Here's a couple of relevant extracts:

    "Cdrecord is completely based on SCSI commands but this is no problem as
    all CD/DVD writers ever made use SCSI commands for the communication.

    In order to be able to use the SCSI transport subsystem of the OS, run
    at highest priority and lock itself into core cdrecord either needs to
    be run as root, needs to be installed suid root or must be called via
    RBACs pfexec mechanism.

    If you don’t want to allow users to become root on your system,
    cdrecord may safely be installed suid root. This allows all users or a
    group of users with no root privileges to use cdrecord. Cdrecord in
    this case checks, if the real user would have been able to read the
    specified files."

    RBACS are role based access control lists. All I know about them is that they're extremely difficult to set up and can cause all kinds of problems if you don't get them exactly right. I know they're extensively used in Solaris but, if the problem is easily fixed by running cdrecord as suid root, it didn't seem necessary to go there.

    You obviously have another issue that needs fixing first, if you can't burn running as sudo - maybe a broken or missing package, maybe an unsupported burner. If in terminal you type sudo cdrecord -scanbus this should give you the info you need to track it down.

  6. #6
    Join Date
    Jan 2006
    Location
    Prato, Italy
    Beans
    12

    Re: How to fix cd burning issues

    When i had issues like those you mentioned (typically on fresh installs) i always did

    $ sudo dpkg-reconfigure cdrecord

    and set it suid root. it worked like a charm

  7. #7
    Join Date
    Oct 2005
    Location
    Newcastle NSW, Australia
    Beans
    111
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: How to fix cd burning issues

    Ubuntu 6.06 seems to be a real curse for my poor DVD burner, no matter what I try, it just won't reliably burn discs.

    Even when I follow you're guide, I can burn only one CD, then no more. Not only that I can't mount CD's for reading at all.

    You can find the relevant program outputs attached...


    Edit: I have just tried k3b with the same results...
    Attached Files Attached Files
    Last edited by deepspring; July 27th, 2006 at 09:23 AM.
    DEEPSPRING ::.
    Links: OCAU ::.

  8. #8
    Join Date
    Oct 2005
    Location
    Newcastle NSW, Australia
    Beans
    111
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: How to fix cd burning issues

    After spending two days ripping my hair out in frustration and going through no less than 20 CD's (all turned into useless coasters), I think I've narrowed down the primary issue...

    I believe it has something to do with the kernel SCSI/SATA driver and this particular DVD+/-RW/RAM. Unfortunately I wasn't able to keep logs of everything (flattening and re-installing does that)...

    The mainboard itself (Gigabyte GA-8I915G-MF) only has one PATA connector on the board, and 4 SATA connectors. Because of this (and the fact that my burner isn't that old), my system has a hybrid setup, with a SATA WD 250GB HDD and a PATA LG DVD+/-RW/RAM GSA-4163B.

    For the past two days, I have been trying to burn CDs using every trick listed on these forums and a few that aren't, to try and burn disks with the above setup. All I got was a crap load of coasters.

    So, I decided to do a quick test by replacing the SATA Drive with an old PATA WD 40GB one I had lying around and doing a fresh install of Xubuntu 6.06.

    Needless to say the burner worked flawlessly, I was able to burn a Kubuntu CD ISO at speeds of up to 35X without haven't to alter or tweak anything system or configuration wise.

    I checked the device names for the drives (all /dev/hd*) and dmesg, no SCSI drivers appeared to be being used only IDE ones...

    So, I removed the old PATA 40GB and put my swanky SATA 250GB back in and installed Kubuntu using the fresh copy I had just burned.

    To cut a long story short... I am making coasters again, no matter what I try.

    I've also noticed this message appearing in the dmesg output:
    "Driver 'sd' needs updating - please use bus_type methods"

    Now I'm starting to wonder if there is a way to force PATA drives to use the "ide_cd" driver, instead of the scsi one.
    DEEPSPRING ::.
    Links: OCAU ::.

  9. #9
    Join Date
    Aug 2005
    Beans
    7

    Re: How to fix cd burning issues

    I've been reading through this thread but cannot figure out why I cannot burn. Initially I also had the problem '2' but I've followed the commands to fix that. I'm trying to burn a Knoppix ISO onto 700MB CD-RWs rated as 16-24x with my DVD writer. Naturally it works great under Windows
    I've tried burning at a variety of speeds and settings in gnomebaker and K3b without effect.
    Any ideas?


    cdrecord: No write mode specified.
    cdrecord: Asuming -tao mode.
    cdrecord: Future versions of cdrecord may have different drive dependent defaults.
    cdrecord: Continuing in 5 seconds...
    cdrecord: Warning: Running on Linux-2.6.15-26-386
    cdrecord: There are unsettled issues with Linux-2.5 and newer.
    cdrecord: If you have unexpected problems, please try Linux-2.4 or Solaris.
    scsidev: '/dev/hdb'
    devname: '/dev/hdb'
    scsibus: -2 target: -2 lun: -2
    Warning: Open by 'devname' is unintentional and not supported.
    Linux sg driver version: 3.5.27
    cdrecord: Warning: using inofficial version of libscg (debian-0.8debian2 '@(#)scsitransp.c 1.91 04/06/17 Copyright 1988,1995,2000-2004 J. Schilling').
    SCSI buffer size: 64512
    cdrecord: This version of cdrecord does not include DVD-R/DVD-RW support code.
    cdrecord: See /usr/share/doc/cdrecord/README.DVD.Debian for details on DVD support.
    Cdrecord-Clone 2.01.01a01 (i686-pc-linux-gnu) Copyright (C) 1995-2004 Joerg Schilling
    NOTE: this version of cdrecord is an inofficial (modified) release of cdrecord
    and thus may have bugs that are not present in the original version.
    Please send bug reports and support requests to <cdrtools@packages.debian.org>.
    The original author should not be bothered with problems of this version.

    TOC Type: 3 = CD-ROM XA mode 2
    Using libscg version 'debian-0.8debian2'.
    Driveropts: 'burnfree'
    atapi: 1
    Device type : Removable CD-ROM
    Version : 0
    Response Format: 2
    Capabilities :
    Vendor_info : 'TSSTcorp'
    Identifikation : 'CD/DVDW TS-L532R'
    Revision : 'HA04'
    Device seems to be: Generic mmc2 DVD-R/DVD-RW.
    Current: 0x000A
    Profile: 0x0010
    Profile: 0x0008
    Profile: 0x0009
    Profile: 0x000A (current)
    Profile: 0x0011
    Profile: 0x0013
    Profile: 0x0014
    Profile: 0x001A
    Profile: 0x001B
    Profile: 0x002B
    Using generic SCSI-3/mmc CD-R/CD-RW driver (mmc_cdr).
    Driver flags : MMC-3 SWABAUDIO BURNFREE
    Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R96R
    Drive buf size : 1451664 = 1417 KB
    FIFO size : 4194304 = 4096 KB
    cdrecord: Trying to use ultra high speed medium on improper writer.
    cdrecord: fifo had 64 puts and 0 gets.
    cdrecord: fifo was 0 times empty and 1 times full, min fill was 0%.

  10. #10
    Join Date
    Oct 2005
    Location
    Newcastle NSW, Australia
    Beans
    111
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: How to fix cd burning issues

    Just a quick update...

    I re-installed Xubuntu from scratch and I've norrowed the problem down even further to a problem in the latest i686 kernel build. If you stick with the latest i386 kernel build, everything should work as it should.

    Also!

    I added the following to the "/etc/modules" file:
    Code:
    piix
    ide-core
    ide-cd
    And added the following to the "/etc/hdparm.conf" file:
    Code:
    /dev/scd0 {
            dma = on
    }
    DEEPSPRING ::.
    Links: OCAU ::.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •