# xfburn cd0,acd0



## sk8harddiefast (Nov 10, 2010)

On /dev my FreeBSD recognise my cd as acd0.
On xfburn the same cd recognised as cd0
Without to be root I try to burn something:

```
xfburn: couldn't open /dev/xpt0: Permission denied
xfburn: couldn't open /dev/xpt0: Permission denied
xfburn: couldn't open /dev/xpt0: Permission denied

** ERROR **: Device address does not lead to a CD burner '/dev/cd1' (ret=0).
aborting...
Abort trap: 6
```
As root, just stuck. I cannot understand where is the fault.
I send a PR and the told me that is my hardware problem. But on all the other things, my cd works just fine!


----------



## graudeejs (Nov 10, 2010)

check this:
http://forums.freebsd.org/showthread.php?t=1195


however I don't know about /dev/xpt0 (never used it) [reading manual right now]


----------



## sk8harddiefast (Nov 10, 2010)

From http://forums.freebsd.org/showthread.php?t=1195

```
# kldload atapicam
# kldload cd
# kldload pass
```


```
[emberdaemon@area51 /]$ sudo kldload atapicam
Password:
kldload: can't load atapicam: File exists
[emberdaemon@area51 /]$ sudo kldload cd      
kldload: can't load cd: No such file or directory
[emberdaemon@area51 /]$ sudo kldload pass
kldload: can't load pass: No such file or directory
```

But my kernel:

```
device          cd              # CD
device          pass            # Passthrough device (direct SCSI access)
```
:OOO


----------



## SirDice (Nov 10, 2010)

Same issue, same solution.

Gnome FAQ 15: Brasero does not let me burn CDs or Totem/Rhythmbox/Sound-juicer cannot find my CD/DVD drive. How can I fix this?


----------



## sk8harddiefast (Nov 10, 2010)

camcontrol devlist return:

```
<Optiarc DVD RW AD-7200A 1.06>     at scbus1 target 0 lun 0 (cd0,pass0)
<Optiarc DVD RW AD-7200A 1.06>     at scbus1 target 1 lun 0 (cd1,pass1)
```
In fact I have 2 dvd drives.
I am a little confused. What exactly I should write on /etc/devfs.conf?
I tried this but didn't work 

```
perm    cd0     0666
perm    cd1     0666
perm    acd0    0666
perm    acd1    0666
perm    xpt0    0666
perm    xpt1    0666
perm    pass0   0666
perm    pass1   0666
```
Even this 

```
own     acd0    root:users
perm    acd0    0660

own     cd0     root:users
perm    cd0     0660

own     pass1   root:users
perm    pass1   0660

own     pass0   root:users
perm    pass0   0660
```


----------



## SirDice (Nov 10, 2010)

Forget about acd0 and acd1. If you're going to use atapicam you might aswell remove atapicd support. 

All of cd0, pass0 and xpt0 need to be writable. If you have another CD drive add cd1 and pass1 too (there's no xpt1). Keep in mind you need to restart devfs if you make changes to /etc/devfs.conf.


----------



## sk8harddiefast (Nov 10, 2010)

That means to remove atapicd from kernel and xpt1 from devfs.conf. Right?


----------



## SirDice (Nov 10, 2010)

Yeah, you can remove atapicd since it's fuctionality is taken over by atapicam. Having both shouldn't be a problem, it's just confusing.

And yes, you can remove xpt1, it'll never exist even if you have multiple CD drives.


----------



## sk8harddiefast (Nov 10, 2010)

But without atapicd:

```
sudo mount /cdrom
mount_cd9660: /dev/acd0: No such file or directory
```


----------



## sk8harddiefast (Nov 10, 2010)

I cannot understand why is so complicated to have just simple 2 dvd drives to see video on them and write things on them.
I am really stuck


----------



## SirDice (Nov 10, 2010)

sk8harddiefast said:
			
		

> But without atapicd:
> 
> ```
> sudo mount /cdrom
> ...



That's set in /etc/devfs.conf:

```
# Commonly used by many ports
#link   acd0    cdrom
```
Change it to:

```
link    cd0     cdrom
```

Here's the rest of mine:

```
perm   cd0  0660
perm   cd1  0660
perm   pass0 0660
perm   pass1 0660
perm   xpt0  0660
```

And make sure your user account is a member of the operator group.


----------



## sk8harddiefast (Nov 10, 2010)

> And make sure your user account is a member of the operator group.


my sudoers file:

```
root ALL=(ALL) ALL
emberdaemon ALL=(ALL) ALL

## Uncomment to allow members of group wheel to execute any command
%wheel ALL=(ALL) ALL

## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL

## Uncomment to allow members of group sudo to execute any command
%sudo   ALL=(ALL) ALL
```

It's ok?


----------



## SirDice (Nov 10, 2010)

The sudoers file has nothing to do with the groups your id is a member of. See groups(1).


----------



## sk8harddiefast (Nov 10, 2010)

I always have a problem with permissions, groups, etc. I can not understand them 
*groups emberdaemon* return this:

```
wheel vboxusers
```
Seems I am not on operator group.
But I changed /etc/groups and now:

```
id -Gn emberdaemon
wheel operator vboxusers
```


----------



## sk8harddiefast (Nov 10, 2010)

Continue to complain.
I set user on operator group.
I removed atapicd option from kernel and rebuild kernel.
I set atapicam_load="YES" on /boot/loader.conf.
I set this on my /etc/devfs.conf

```
link    cd0     cdrom

perm   cd0  0660
perm   cd1  0660
perm   pass0 0660
perm   pass1 0660
perm   xpt0  0660
```

I restart devfs, I did everything  but


```
sudo mount /cdrom 
mount_cd9660: /dev/acd0: No such file or directory
```

Also now xfburn is not complain about cd. just stuck. The same was doing running xfburn as root.


----------



## SirDice (Nov 10, 2010)

sk8harddiefast said:
			
		

> Continue to complain.


No worries, I have a feeling we're close 


> I set user on operator group.


That's good. Remember to log that user out and back in again. Try not to edit files like /etc/group and /etc/passwd directly. One day this will seriously bite you in the rear. Use pw(8).

```
root@williscorto:~#id dice
uid=1001(dice) gid=1001(dice) groups=1001(dice),5(operator),1004(mldonkey),920(vboxusers)
root@williscorto:~#pw groupmod test -m dice
root@williscorto:~#id dice
uid=1001(dice) gid=1001(dice) groups=1001(dice),5(operator),1004(mldonkey),920(vboxusers),1005(test)
root@williscorto:~#pw groupmod test -d dice
root@williscorto:~#id dice
uid=1001(dice) gid=1001(dice) groups=1001(dice),5(operator),1004(mldonkey),920(vboxusers)
```



> I removed atapicd option from kernel and rebuild kernel.
> I set atapicam_load="YES" on /boot/loader.conf.


You can just as easily add atapicam into your custom kernel while you're removing atapicd. 


> I set this on my /etc/devfs.conf
> 
> ```
> link    cd0     cdrom
> ...


Looking good.


> but
> 
> 
> ```
> ...


Shoot. We forgot to adjust /etc/fstab accordingly. You need to change the acd0 in there to cd0 too. The mount command checks this file when you enter it like you did.



> Also now xfburn is not complain about cd. just stuck. The same was doing running xfburn as root.


Tricky, don't have an answer for that one. At least not right now. Try running it from an Xterm, see if it complains about something.


----------



## sk8harddiefast (Nov 10, 2010)

Now seems to work better. Now can mount the cd. but not the second one  
I have cd0 and cd1 on /dev.

```
sudo eject /dev/cd1 
Password:
eject: Input/output error
```
I tried xfburn and opened it from urxvt. Is not complain for nothing! Just stuck


----------



## sk8harddiefast (Nov 12, 2010)

I found it! Xfburn stuck because have as default cd1 witch is that is not working. With cd0 work fine 
How make cd1 work too?


----------

