[brandz-discuss] Native Devices
Eric Enright
eric.enright at gmail.com
Mon Oct 30 22:03:58 PST 2006
On 10/31/06, Edward Pilatowicz <edward.pilatowicz at sun.com> wrote:
> On Mon, Oct 30, 2006 at 08:24:19PM -0500, Eric Enright wrote:
> > On 10/30/06, Edward Pilatowicz <edward.pilatowicz at sun.com> wrote:
> > >hey eric,
> > >currently there is no easy way to do this.
> > >
> > >is /dev/printers normally something found on linux?
> > >what kind of printer are you trying to hook up to the system?
> >
> > No, it's not. Linux USB printers end up in /dev/usb/lp?
> > The printer in question is a cheapo Lexmark Z517.
> >
> > >assuming that your linux zone has networking configured and can
> > >communicate to the global zone, what i would probably recommend
> > >trying is configuring the printer in the global zone and using the
> > >global zone as a print server. then you could print from within
> > >the linux zone to via the global zone. would this work for you?
> >
> > Unfortunately that does not work for me. I've had no end of trouble
> > getting this thing working in the global zone. That story is somewhat
> > chronicled here:
> >
> > http://www.opensolaris.org/jive/thread.jspa?threadID=16345
> >
> > The only reason I'm trying to now do this inside a Linux zone is
> > because Lexmark provides Linux drivers for CUPS. I tried simply using
> > the PPD in the global zone, but it seems like the filters (Linux
> > binaries) are needed as well.
> >
> > I have had success, though. I manually added the following line to
> > /etc/zones/linux.xml:
> >
> > <device match="printers/*" />
> >
>
> i'm actually really surprised this worked.
>
> first, i though the verification routine we had introduced was run
> before zone boot and would prevent you from booting a zone with this
> configuration. could you at least check that zonecfg will now
> fail to "verify" your zone with this bit of configuration added?
zonecfg fails to verify:
zonecfg:linux> verify
lx_support error: lx zones do not support added devices
linux: Brand-specific error
The boot verification routine seems to miss basic <device /> entries,
but adding "name=" or using <symlink /> fails to boot the zone. It
fails with, IIRC, "zone not configured", which is rather misleading.
"zone incorrectly configured" would be a bit more informative, I
think.
> second, i guess that the usb printer interfaces are common for solaris
> and linux (not something i would have ever expected, give how much time
> i've spent writing device ioctl translators for this project. ;)
No clue :)
> > and then modified the Linux zone's cupsd.conf to use /dev/printers/0
> > rather than /dev/usb/lp0. The CUPS web tool hardcodes the device name
> > if it's a USB device. Printing from the Linux zone works nearly
> > flawlessly. I can lpr plaintext and postscript with no problem, but
> > PDFs seem to have font problems .... only a minor hassle. Unless a
> > better solution presents itself I'll probably write a replacement lpr
> > for the global zone to ssh in to the Linux zone and run my job.
> >
> > Ideally, I'd rather use something like:
> >
> > <device match="printers/0" name="usb/lp0" />
> >
> > as per the design document, but that doesn't work. Is this something
> > not yet implemented?
> >
>
> well, this is implemented but it's only supported in the brand
> platform.xml specification file (which applies to _all_ zones of
> a given brand.) you can check it out in /usr/lib/brand/*/platform.xml.
> (note that if you make any modification to this file they will be lost
> upon any upgrade.)
Hmm, I'll look at that. Thanks.
One thing to note, and I do not know if this is related, but attaching
the printer now gives me this:
Oct 31 00:16:01 yamano genunix: [ID 936769 kern.info] usbprn0 is
/pci at 0,0/pci1179,1 at 1d,1/printer at 1
Oct 31 00:16:01 yamano genunix: [ID 408114 kern.info]
/pci at 0,0/pci1179,1 at 1d,1/printer at 1 (usbprn0) online
Oct 31 00:16:01 yamano devfsadmd[1120]: [ID 498820 daemon.error] mkdir
failed for /dev/printers 0x1ed: No such file or directory
Oct 31 00:16:01 yamano last message repeated 2 times
Oct 31 00:16:01 yamano devfsadmd[1120]: [ID 162798 daemon.error]
cannot create link: /dev/printers/0 ->
../../devices/pci at 0,0/pci1179,1 at 1d,1/printer at 1:printer. max attempts
exceeded
I haven't gotten around to rebooting and trying again.
Another note maybe of interest, but not entirely unexpected, is that
if I attach the printer *after* booting the zone, the device does not
show up in the zone.
--
Eric Enright
More information about the brandz-discuss
mailing list