Skip to content

Scanner permissions in Ubuntu Karmic (udev libusb saned problem with udev-acl)

In Ubuntu Karmic (and possibly Jaunty ?), when you install libsane, it adds a file /lib/udev/rules.d/40-libsane.rules which contains rules that match on supported scanners and set the environment variable "libsane_matched" to "yes".

This in turn triggers the following in /lib/udev/rules.d/70-acl.rules:
# USB scanners
ENV{libsane_matched}=="yes", ENV{ACL_MANAGE}="1"
<snip>
# apply ACL for all locally logged in users
LABEL="acl_apply", ENV{ACL_MANAGE}=="?*", TEST=="/var/run/ConsoleKit/database", \
RUN+="udev-acl --action=$env{ACTION} --device=$env{DEVNAME}"

In the end, the result is that an ACL is created for the device, which allows locally logged in users to use it (read/write permission). eg for my scanner:
~# lsusb
Bus 001 Device 005: ID 04b8:011c Seiko Epson Corp. Perfection 3200
~# ls -l /dev/bus/usb/001/005
crw-rw-r--+ 1 root root 189, 4 2009-12-28 00:11 /dev/bus/usb/001/005
~# getfacl /dev/bus/usb/001/005
getfacl: Removing leading '/' from absolute path names
# file: dev/bus/usb/001/005
# owner: root
# group: root
user::rw-
user:crox:rw-
group::rw-
mask::rw-
other::r--
~#

However, I also wanted to allow access to the scanner from other workstations through saned. In older Ubuntu versions, you could just add saned (or whatever user the service runs as) to the scanner group. This no longer works since the device belongs to root:root, and ACLs are added for specific users. The solution that works for me is to create a file /etc/udev/rules.d/99-sane-group.rules with the following contents:
# change group to scanner for sane devices
ENV{libsane_matched}=="yes", GROUP="scanner"

Then you just need to run
sudo udevadm trigger
and the group of the device magically changes to scanner.

Of course you could also add a similar rule specifically for a certain device instead, in my case this would work too:
ATTRS{idVendor}=="1d6b", ATTRS{idProduct}=="0002", GROUP="scanner"


To check that it worked, run the following:
sudo su -s /bin/bash -c 'scanimage -L' saned



  • Twitter
  • Bookmark Scanner permissions in Ubuntu Karmic (udev libusb saned problem with udev-acl) at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Scanner permissions in Ubuntu Karmic (udev libusb saned problem with udev-acl)
  • Mixx Scanner permissions in Ubuntu Karmic (udev libusb saned problem with udev-acl)
  • Bloglines Scanner permissions in Ubuntu Karmic (udev libusb saned problem with udev-acl)
  • Technorati Scanner permissions in Ubuntu Karmic (udev libusb saned problem with udev-acl)
  • Fark this: Scanner permissions in Ubuntu Karmic (udev libusb saned problem with udev-acl)
  • Bookmark Scanner permissions in Ubuntu Karmic (udev libusb saned problem with udev-acl) at YahooMyWeb
  • Bookmark Scanner permissions in Ubuntu Karmic (udev libusb saned problem with udev-acl) at Furl.net
  • Bookmark Scanner permissions in Ubuntu Karmic (udev libusb saned problem with udev-acl) at reddit.com
  • Bookmark Scanner permissions in Ubuntu Karmic (udev libusb saned problem with udev-acl) at blinklist.com
  • Bookmark Scanner permissions in Ubuntu Karmic (udev libusb saned problem with udev-acl) at Spurl.net
  • Bookmark Scanner permissions in Ubuntu Karmic (udev libusb saned problem with udev-acl) at NewsVine
  • Bookmark Scanner permissions in Ubuntu Karmic (udev libusb saned problem with udev-acl) at Simpy.com
  • Bookmark Scanner permissions in Ubuntu Karmic (udev libusb saned problem with udev-acl) at blogmarks
  • Bookmark Scanner permissions in Ubuntu Karmic (udev libusb saned problem with udev-acl) with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Print this article!
  • E-mail this story to a friend!
  • Identi.ca

Making a Dell computer running Linux silent (Dell Precision noise problem)

Faced with a noisy Dell Precision 490 computer running Ubuntu Karmic, I found an easy way to reduce the noise level to an acceptable threshold. (fancontrol did not help since it seems not to be compatible with the chipset used by Dell at least on this computer.)

Step 1, install i8kutils:
sudo apt-get install i8kutils

Step 2, add i8k to /etc/modules:
sudo sh -c 'echo i8k >> /etc/modules'

Step 3, edit /etc/default/i8kmon so that it looks like this:
# /etc/default/i8kmon

# Change to one enable i8kmon
ENABLED=1
I8KMON_ARGS="--daemon --nouserconfig --auto"

Step 4, reboot and enjoy!

  • Twitter
  • Bookmark Making a Dell computer running Linux silent (Dell Precision noise problem) at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Making a Dell computer running Linux silent (Dell Precision noise problem)
  • Mixx Making a Dell computer running Linux silent (Dell Precision noise problem)
  • Bloglines Making a Dell computer running Linux silent (Dell Precision noise problem)
  • Technorati Making a Dell computer running Linux silent (Dell Precision noise problem)
  • Fark this: Making a Dell computer running Linux silent (Dell Precision noise problem)
  • Bookmark Making a Dell computer running Linux silent (Dell Precision noise problem) at YahooMyWeb
  • Bookmark Making a Dell computer running Linux silent (Dell Precision noise problem) at Furl.net
  • Bookmark Making a Dell computer running Linux silent (Dell Precision noise problem) at reddit.com
  • Bookmark Making a Dell computer running Linux silent (Dell Precision noise problem) at blinklist.com
  • Bookmark Making a Dell computer running Linux silent (Dell Precision noise problem) at Spurl.net
  • Bookmark Making a Dell computer running Linux silent (Dell Precision noise problem) at NewsVine
  • Bookmark Making a Dell computer running Linux silent (Dell Precision noise problem) at Simpy.com
  • Bookmark Making a Dell computer running Linux silent (Dell Precision noise problem) at blogmarks
  • Bookmark Making a Dell computer running Linux silent (Dell Precision noise problem) with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Print this article!
  • E-mail this story to a friend!
  • Identi.ca

Installing Ubuntu Netbook Remix over the network (UNR netboot - PXE install)

There is actually at least one very straightforward way to install Ubuntu Netbook Remix without a USB key, without even downloading the image, over the network.

Just follow the instructions in my previous article to get a working Ubuntu Installer over PXE. By default this installer will only setup a very minimal Ubuntu system, without any server or desktop packages.

At some point during the installation, you are offered the possibility to install additional software packages. At this stage you can just tick the box in front of "Ubuntu Network Remix" and that's it! You don't need to select any other package (eg Ubuntu Desktop) for a fully working UNR install. Personally I added "OpenSSH Server" because I want to be able to login remotely. Of course you could also add those packages later on.
  • Twitter
  • Bookmark Installing Ubuntu Netbook Remix over the network (UNR netboot - PXE install) at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Installing Ubuntu Netbook Remix over the network (UNR netboot - PXE install)
  • Mixx Installing Ubuntu Netbook Remix over the network (UNR netboot - PXE install)
  • Bloglines Installing Ubuntu Netbook Remix over the network (UNR netboot - PXE install)
  • Technorati Installing Ubuntu Netbook Remix over the network (UNR netboot - PXE install)
  • Fark this: Installing Ubuntu Netbook Remix over the network (UNR netboot - PXE install)
  • Bookmark Installing Ubuntu Netbook Remix over the network (UNR netboot - PXE install) at YahooMyWeb
  • Bookmark Installing Ubuntu Netbook Remix over the network (UNR netboot - PXE install) at Furl.net
  • Bookmark Installing Ubuntu Netbook Remix over the network (UNR netboot - PXE install) at reddit.com
  • Bookmark Installing Ubuntu Netbook Remix over the network (UNR netboot - PXE install) at blinklist.com
  • Bookmark Installing Ubuntu Netbook Remix over the network (UNR netboot - PXE install) at Spurl.net
  • Bookmark Installing Ubuntu Netbook Remix over the network (UNR netboot - PXE install) at NewsVine
  • Bookmark Installing Ubuntu Netbook Remix over the network (UNR netboot - PXE install) at Simpy.com
  • Bookmark Installing Ubuntu Netbook Remix over the network (UNR netboot - PXE install) at blogmarks
  • Bookmark Installing Ubuntu Netbook Remix over the network (UNR netboot - PXE install) with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Print this article!
  • E-mail this story to a friend!
  • Identi.ca

Install Ubuntu without cd-rom over the network (Ubuntu netboot install, works for CF or USB too)

It's quite easy actually, once you know where to look.

Just browse to http://archive.ubuntu.com/ubuntu/dists/[version]/main/installer-[arch]/current/images/netboot/ubuntu-installer/[arch]/ - eg http://archive.ubuntu.com/ubuntu/dists/intrepid/main/installer-i386/current/images/netboot/ubuntu-installer/i386/.

The two files "linux" and "initrd.gz" can be used with pxegrub to boot a PC with a fully-working Ubuntu-installer (text-mode). See my other posts about my diskless / network boot setup for details on how I configured the network booting part, based on dhcp, tftp and pxegrub.

Alternatively, if you have a CF card USB stick etc. with a working GRUB install, you can just copy the two files over there.

What I still haven't found is how to do an Ubuntu NFS install directly. For now I'm stuck with my diskless Ubuntu install procedure where I first do a hard disk install and then make it diskless.

Credits: the whole thing was inspired by this article.
  • Twitter
  • Bookmark Install Ubuntu without cd-rom over the network (Ubuntu netboot install, works for CF or USB too) at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Install Ubuntu without cd-rom over the network (Ubuntu netboot install, works for CF or USB too)
  • Mixx Install Ubuntu without cd-rom over the network (Ubuntu netboot install, works for CF or USB too)
  • Bloglines Install Ubuntu without cd-rom over the network (Ubuntu netboot install, works for CF or USB too)
  • Technorati Install Ubuntu without cd-rom over the network (Ubuntu netboot install, works for CF or USB too)
  • Fark this: Install Ubuntu without cd-rom over the network (Ubuntu netboot install, works for CF or USB too)
  • Bookmark Install Ubuntu without cd-rom over the network (Ubuntu netboot install, works for CF or USB too) at YahooMyWeb
  • Bookmark Install Ubuntu without cd-rom over the network (Ubuntu netboot install, works for CF or USB too) at Furl.net
  • Bookmark Install Ubuntu without cd-rom over the network (Ubuntu netboot install, works for CF or USB too) at reddit.com
  • Bookmark Install Ubuntu without cd-rom over the network (Ubuntu netboot install, works for CF or USB too) at blinklist.com
  • Bookmark Install Ubuntu without cd-rom over the network (Ubuntu netboot install, works for CF or USB too) at Spurl.net
  • Bookmark Install Ubuntu without cd-rom over the network (Ubuntu netboot install, works for CF or USB too) at NewsVine
  • Bookmark Install Ubuntu without cd-rom over the network (Ubuntu netboot install, works for CF or USB too) at Simpy.com
  • Bookmark Install Ubuntu without cd-rom over the network (Ubuntu netboot install, works for CF or USB too) at blogmarks
  • Bookmark Install Ubuntu without cd-rom over the network (Ubuntu netboot install, works for CF or USB too) with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Print this article!
  • E-mail this story to a friend!
  • Identi.ca

Diskless Ubuntu (Feisty Fawn NFS install)

Tonight I installed my first diskless Ubuntu system. The version I used is the latest available as of today, 7.04 "FeistyFawn". This article covers the client part.

My other diskless machines all run Gentoo (for the time being). I've described previously how I set up my SB 100, the rest of the setup was based on this article.

The following two articles were helpful:

https://help.ubuntu.com/community/Installation/OnNFSDrive
http://developer.novell.com/wiki/index.php/Feisty/HOWTO:_Convert_Ubuntu_to_Diskless

However I found some of the info to be uncomplete or outdated.

From what I have read, unlike with Gentoo, it seems that there is no easy way to get a working diskless Ubuntu system directly. Instead, you have to install to a disk first, and then make your setup diskless. I did not really want to open the box, so I tried first to install on a 2 GB CF card, which didn't work because the card was full before the install completed (du now reports that the system is 2.1 GB big). So I ended up putting a disk in the box, and I ran a regular install.

Note: As in the SB100 article, 10.0.0.10 will be my dhcp/nfs/tftp server ('fileserver'). 10.0.0.30 will be the Ubuntu desktop.

Once that was completed, instead of rebooting as suggested by the installer, I opened a shell (gnome-terminal), and ran:
sudo su -
mkdir /mnt/tmp
mkdir /mnt/nfs
mount /dev/sda1 /mnt/tmp
mount 10.0.0.10:/diskless/ubuntu /mnt/nfs
cp -a /mnt/tmp/* /mnt/nfs/

After that, there are just a couple of things that need to be changed:
chroot /mnt/nfs
mount -t proc proc proc
vi etc/initramfs-tools/initramfs.conf

and make sure you have:
BOOT=nfs

then run:
update-initramfs -u

Now check what you have in /boot, and update your network boot config files accordingly. I use pxegrub, and here is how /boot/grub.lst looks like:
default 0
timeout 10
title=Diskless Ubuntu
root (nd)
kernel /diskless/tv/boot/vmlinuz-2.6.20-15-generic ip=dhcp root=/dev/nfs nfsroot=10.0.0.10:/diskless/tv ro quiet splash
initrd /diskless/tv/boot/initrd.img-2.6.20-15-generic

Finally, don't forget to update etc/fstab and etc/network/interfaces. I've read several theories, here is what worked for me:

fstab:
# /etc/fstab: static file system information.
#
#
proc /proc proc defaults 0 0
/dev/nfs / nfs defaults 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0

network/interfaces:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 10.0.0.30
netmask 255.255.255.0
network 10.0.0.0
broadcast 10.0.0.255
gateway 10.0.0.1

(note: commenting out eth0 as suggested in some places made the system hang during the boot process.)
  • Twitter
  • Bookmark Diskless Ubuntu (Feisty Fawn NFS install) at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Diskless Ubuntu (Feisty Fawn NFS install)
  • Mixx Diskless Ubuntu (Feisty Fawn NFS install)
  • Bloglines Diskless Ubuntu (Feisty Fawn NFS install)
  • Technorati Diskless Ubuntu (Feisty Fawn NFS install)
  • Fark this: Diskless Ubuntu (Feisty Fawn NFS install)
  • Bookmark Diskless Ubuntu (Feisty Fawn NFS install) at YahooMyWeb
  • Bookmark Diskless Ubuntu (Feisty Fawn NFS install) at Furl.net
  • Bookmark Diskless Ubuntu (Feisty Fawn NFS install) at reddit.com
  • Bookmark Diskless Ubuntu (Feisty Fawn NFS install) at blinklist.com
  • Bookmark Diskless Ubuntu (Feisty Fawn NFS install) at Spurl.net
  • Bookmark Diskless Ubuntu (Feisty Fawn NFS install) at NewsVine
  • Bookmark Diskless Ubuntu (Feisty Fawn NFS install) at Simpy.com
  • Bookmark Diskless Ubuntu (Feisty Fawn NFS install) at blogmarks
  • Bookmark Diskless Ubuntu (Feisty Fawn NFS install) with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Print this article!
  • E-mail this story to a friend!
  • Identi.ca