[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Live Squeeze system: ConsoleKit does not see serial console as active, cannot mount with udisk

I'm building a Debian Squeeze system with live-builder 3.0~a45 (from
Ubuntu 11.10). I'm running into a problem where I can't use udisk to
mount devices using a serial console on the live system (perhaps due
to problems with consolekit or policykit). Sorry for the cross-post -
I've already asked about this on the debian-live list, and they had no
idea, so I'm asking here.

I configure a serial console using the boot line and some boot-time
sedding to produce this line in /etc/inittab:

  T0:23:respawn:/bin/login -f user </dev/ttyS0 >/dev/ttyS0 2>&1

My problem is this: when I try to use udisk to mount an image via a
serial console, I get:

user@my-live-usb:~$ udisks --mount /dev/disk/by-label/image-data
--mount-options ro
Mount failed: Not Authorized

I read through a heap of forum postings and bug reports, and
eventually figured to try:

user@my-live-usb:~$ pkexec true
Error executing command as another user: Not authorized

This incident has been reported.

Then I ran "ck-list-sessions" and saw that only Session 5, on
/dev/tty1, has "active = TRUE" - the console I'm actually using
(Session 1 on /dev/ttyS0) has "active = FALSE".

Am I right in thinking that this is why udisk is failing to mount the
device when run on a serial console? I checked that my udisks command
worked with a video console, and it does. But unfortunately, this is
not practical - I need to be able to run the command at a serial
console OR a video console.

It's worth pointing out that under this live system, the default user
("user") is automatically logged in on every video console and the
serial console.

If I look in "/usr/share/polkit-1/actions/org.freedesktop.udisks.policy",
there's a group of keys under "<action


Changing the "allow_inactive" and "allow_any" keys to yes makes no
difference. I figure that I somehow need to tell consolekit that the
serial port is an active console. But how?

I dug around the ConsoleKit docs and played around with the DBUS
methods for activating the current session, but it didn't work:

user@mwa-live-usb:~$ dbus-send --system --print-reply
Error org.freedesktop.DBus.GLib.UnmappedError.CkSeatError.Code0:
Unable to activate session

So how do I get ConsoleKit to either recognise the serial console as
active, or let udisks mount the partition?

(udisks is 1.0.1+git20100614-3, consolekit is 0.4.1-4)


Reply to: