I installed from source on Kubuntu 14.04. No installation problems (Basic Installation, as show INSTALL file), but when I start gcdemu shows the message:
Daemon autostart failed. Error:
Errore nel chiamare StartServiceByName per net.sf.cdemu.CDEmuDaemon: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process /usr/libexec/cdemu-daemon-session.sh exited with status 255
What can I do?
thanks
there should be a file in your home folder
~/.cdemu-daemon.log
that has some info about what went wrong. what does it say?
is the vhba module loaded and what are the permissions on the device? info on how to set permissions can be seen on the webpage in the VHBA section... apparently this info haven't made it to the README, even though it should.
Thanks for you reply
the contents of the file is:
Starting CDEmu daemon with following parameters:
cdemu0: Kernel I/O: failed to open control device /dev/vhba_ctl: No such file or directory!
The module is not loaded because it is not signed:
Can't read private key
DEPMOD 3.13.0-24-generic
I tried to sign it, but without success. The kernel configuration file contains the following parameters
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODVERSIONS=y
CONFIG_MODULE_SRCVERSION_ALL=y
CONFIG_MODULE_SIG=y
CONFIG_MODULE_SIG_ALL=y
CONFIG_MODULE_SIG_SHA512=y
CONFIG_MODULE_SIG_HASH="sha512"
I also added the udev rules
KERNEL=="vhba_ctl", MODE="0660", OWNER="root", GROUP="cdrom"
thanks
Last edit: giubbe 2014-04-26
ok. if this module signing crap is the new default thats unfortunate. but i think i know how to bypass it.
sudo -i
echo "N" > /sys/module/module/parameters/sig_enforce
exit
this isnt permanent though :/
also make sure your user is member of the "cdrom" group. that should be default IIRC.
Last edit: Henrik Stokseth 2014-04-26
the directory is read-only:
root@PC01:~# echo "N" > /sys/module/module/parameters/sig_enforce
-bash: echo: errore in scrittura: File system in sola lettura
(write error: File system read-only)
I also tried with
root@PC01:~# sysctl module.sig_enforce="N"
sysctl: cannot stat /proc/sys/module/sig_enforce: File o directory non esistente
(File or directory does not exist)
root@PCH01:/proc/sys# sysctl sig_enforce="N"
sysctl: cannot stat /proc/sys/sig_enforce: File o directory non esistente
and in fact there is no such directory:
root@PC01:/proc/sys# ls
abi debug dev fs fscache kernel net sunrpc vm
mount
/dev/sda2 on / type btrfs (rw,subvol=@)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
thanks again
Is SecureBoot enabled on that machine? Unless you have it turned on intentionally, can you try disabling it in BIOS?
There also seem to be suggestions to pass "enforcemodulesig=0" or "module.sig_enforce=0" to kernel command-line, although according to [1], neither worked.
If you want to build a signed module, you will likely need to rebuild kernel with custom certificate. See [2] for details.
[1] http://systemtemplar.org/blog/2013/02/12/fedora-18-installation-notes/
[2] http://wiki.gentoo.org/wiki/Signed_kernel_module_support
sorry, I did not see the answer.
My PC does not have the secureboot (motherboard P5K-E). Now reboot and check on. Tomorrow I do the tests that you have shown me and I'll tell you.
I do not understand what happened, but now the value of sig_enforce is N.
This value becomes Y only adding kernel parameters "enforcemodulesig=1" and "module.sig_enforce=1"
Without parameters, or with "enforcemodulesig=0" or "module.sig_enforce=0" the value of sig_enforce is N
In the BIOS I just temporarily disabled the "execute disable bit", then bring it back as it was.
Now the module is only loaded manually with modprobe vbha and CDemu only works with the root user.
If the module is not loaded, this is not automatically loaded even if the program is started by the root user.
With sudo gcdemu (without module):
Starting CDEmu daemon with following parameters:
cdemu0: Kernel I/O: failed to open control device /dev/vhba_ctl: No such file or directory!
cdemu: Daemon: failed to start device #0!
cdemu: Daemon: failed to create device!
Daemon initialization and start failed!
if start gcdemu with load module:
Starting CDEmu daemon with following parameters:
cdemu0: Kernel I/O: failed to open control device /dev/vhba_ctl: Permission denied!
cdemu: Daemon: failed to start device #0!
cdemu: Daemon: failed to create device!
Daemon initialization and start failed!
The rights of my user are:
adm❌4:syslog,giubbe
cdrom❌24:giubbe
sudo❌27:giubbe
dip❌30:giubbe
video❌44:giubbe
plugdev❌46:giubbe
games❌60:giubbe
users❌100:giubbe
fuse❌105:giubbe
lpadmin❌108:giubbe
lightdm❌118:giubbe
giubbe❌1000:
sambashare❌124:giubbe
If I install the module with sudo make install I still get the message invalid key:
make -C /lib/modules/3.13.0-24-generic/build M=/home/giubbe/cdemu/cdemu-code/vhba-module modules_install
make[1]: ingresso nella directory "/usr/src/linux-headers-3.13.0-24-generic"
INSTALL /home/giubbe/cdemu/cdemu-code/vhba-module/vhba.ko
Can't read private key
DEPMOD 3.13.0-24-generic
Is there a way to make it work automatically as they did in kubuntu 13.10?
Thank you!
Last edit: giubbe 2014-04-29
At the moment, to have module automatically loaded at boot, you need to add 'vhba' to /etc/modules.
And you need to set up permissions on VHBA control device, which is usually done via following udev rule (this is the part that Henrik said is missing from the README):
KERNEL=="vhba_ctl", MODE="0660", OWNER="root", GROUP="cdrom"
(you need to create a file called (for example) 40-vhba-dkms.rules in /lib/udev/rules.d/ or /etc/udev/rules.d/, and put the line above in it)
Alternatively, you could build a deb package from vhba source (by running 'dpkg-buildpackage -b -uc -tc' from vhba source dir - make sure 'dpkg-dev' and 'debhelper' are installed first), which should do the above two steps for you.
Now it works perfectly.
Thanks to all
Glad to hear that. Cheers!