From: Florian Kulzer on
Marc Shapiro wrote:

[...]

> I have a system with a fresh Debian install with KDE. It wants to
> automount things. I'm hoping I can correct this behaviour. Here are
> the problems that I am having:
>
> Data CDs will automount, but sometimes take so long to do so that I
> click on the icon again. I then end up with about a dozen konqueror
> windows open on the CD's directory. Then, the CD WILL NOT unmount. If
> I try to manually unmount it I get an error saying only root can do
> that. OK, I su to root and try again. Then it insists that the CD is
> busy. There is nothing using the CD and I HAVE NOT cd'd to /cdrom. The
> only way to unmount and eject the CD is to 'killall kdeinit'.

lsof -w /media/hdc
(or whatever your mount point is) should tell you which process is
blocking the drive. Often it is a KIO slave which can be killed without
interfering with the rest of the system. The "only root can do that"
error might indicate a problem with etc/fstab. The package "pmount" can
be used to mount/unmount pluggable devices without having to worry about
the entries in fstab.

[...]

> Is it possible to tell KDE NOT to automount anything? I am quite happy
> with commandline mount and umount commands. They just work and I know
> the state of my filesystems. I use fvwm on my own box, but this one
> will be for my 5 year old daughter, and since it came with KDE, I
> thought that it would be easier for her if I just left it that way and
> put icons on the desktop for those programs that I want her to have easy
> access to. There will be no need for removable devices on a regular
> basis, and if there is I can mount it myself, as needed.

If you want to get rid of the icons on the desktop, you can uncheck the
corresponding option(s) in "K-menu > Control Center > Desktop > Behavior
> Device Icons". The default actions for different types pluggable
media can be set to "Do Nothing" in "K-menu > Control Center >
Peripherals > Storage Media". If you want to disable the media notifier
daemon, then see "K-menu > Control Center > KDE Components > Service
Manager".

Regards,
Florian


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
From: Marc Wilson on
On Sun, Feb 05, 2006 at 09:06:19PM -0800, Rob Blomquist wrote:
> On Sunday 05 February 2006 7:50 pm, Andrew Sackville-West so eloquently
> stated:
> > Maybe because the error message from mount is correct? That
> > "special device /dev/sdb1 does not exist?"
>
> >do you have udev rules to create the device?
>
> Good question.

<deleted>

Debian by default does not provide rules to generically create devices for
flash drives. I have no doubt that if you were to actually *look* in /dev,
you do not have any reference to the sdb1 device.

This is, of course, why udev is an abomination. Persistent naming is all
very well, but whatever idiot decided that it was both a good thing that
people shouldn't be allowed to look in /dev (the Gnome camp... it's too
complicated for the idiot user), and to delete 90% of its contents, should
be shot.

--
Marc Wilson | I saw what you did and I know who you are.
msw(a)cox.net |


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
From: Andrew Sackville-West on
On Sun, 5 Feb 2006 21:06:19 -0800
Rob Blomquist <rob.blomquist(a)verizon.net> wrote:

> On Sunday 05 February 2006 7:50 pm, Andrew Sackville-West so eloquently
> stated:
> On Sun, 05 Feb 2006 20:42:09 -0700
>
>
> > > Device Boot Start End Blocks Id System
> > > /dev/sdb1 * 1 952 243696 6 FAT16
> > >
> > > Ah, so it is vfat on sdb1! no sweat!
> > >
> > > timmy:~# mount -t vfat /dev/sdb1 /media/flash
> > > mount: special device /dev/sdb1 does not exist
> >
> > OK, just in case: Do you actually have a device
> > special file /dev/sdb1?
> >
> > Just askin' . . .
> >
> > > Now this is silly!
> > >
> > > Is it still there?
> > >
> > > timmy:~# fdisk -l /dev/sdb
> > >
> > > Disk /dev/sdb: 249 MB, 249561088 bytes
> > > 16 heads, 32 sectors/track, 952 cylinders
> > > Units = cylinders of 512 * 512 = 262144 bytes
> > >
> > > Device Boot Start End Blocks Id System
> > > /dev/sdb1 * 1 952 243696 6 FAT16
> > >
> > > I will be darned. Still there, but mount can't find it!
> >
> > Maybe because the error message from mount is correct? That
> > "special device /dev/sdb1 does not exist?"
>
> >do you have udev rules to create the device?
>
> Good question.
>
> This is what is in my udev.rules:
>
> # USB devices
> BUS="usb", KERNEL="hiddev*", NAME="usb/%k"
> BUS="usb", KERNEL="auer[0-9]*", NAME="usb/%k"
> BUS="usb", KERNEL="legousbtower*", NAME="usb/%k"
> BUS="usb", KERNEL="dabusb*", NAME="usb/%k"
> BUS="usb", KERNEL="cpad[0-9]*", NAME="usb/%k"
> BUS="usb", KERNEL="lp[0-9]*", NAME="usb/%k"
> BUS="usb", KERNEL="ttyUSB*", SYSFS{product}="Palm Handheld*", SYMLINK="pilot"
>
> Now, I am not sure which of these would be used for a flash drive, but I can
> tell that a few won't be....

look in /etc/udev/rules.d/050_hal* and see what that says. That is the rule that creates sd* devices.

A

>
> Rob
>
> --
> Mountlake Terrace, WA, USA
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian..org
>
From: Rob Blomquist on
On Sunday 05 February 2006 9:36 pm, Marc Shapiro so eloquently stated:
Brendan wrote:
> On Sunday 05 February 2006 18:13, Marc Wilson wrote:
>>IMHO automount is an incredibly broken behavior. Gnome users swear that
>>it's desirable, though. Your mileage may vary.
>
> Why do you think that?

>with commandline mount and umount commands. They just work and I know
>the state of my filesystems. I use fvwm on my own box, but this one
>will be for my 5 year old daughter, and since it came with KDE, I
>thought that it would be easier for her if I just left it that way and
>put icons on the desktop for those programs that I want her to have easy
>access to. There will be no need for removable devices on a regular
>basis, and if there is I can mount it myself, as needed.

Yes, in the KDE Control Center, go to Desktop/Behavior and pick the Device
Icons tab. You can there either pick the stuff you want to appear, or uncheck
"Show Device Icons".

Rob

--
Mountlake Terrace, WA, USA


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
From: Rob Blomquist on
On Monday 06 February 2006 9:58 am, Andrew Sackville-West so eloquently
stated:

> Now, I am not sure which of these would be used for a flash drive, but I
> can tell that a few won't be....

look in /etc/udev/rules.d/050_hal* and see what that says. That is the rule
that creates sd* devices.

OK, in /etc/udev/hal.rules:
# put removable IDE/SCSI devices into the hal group instead of 'disk'
BUS="scsi",KERNEL="sd[a-z]*", PROGRAM="/etc/udev/scripts/device-removable.sh
%k", RESULT="1", NAME="%k", MODE="0640", GROUP="hal"
# BUS="ide", KERNEL="hd[a-z]*", PROGRAM="/etc/udev/scripts/device-removable.sh
%k", RESULT="1", NAME="%k", MODE="0640", GROUP="hal"
BUS="usb", KERNEL="ub[a-z]*", NAME="%k", MODE="0640", GROUP="hal"

In /etc/udev/rules.d/:
I have no 050_hal* files. I have a file called z_hal-plugdev.rules:
# put removable IDE/SCSI devices into the hal group instead of 'disk'
BUS="scsi",KERNEL="sd[a-z]*", PROGRAM="/etc/udev/scripts/device-removable.sh
%k", RESULT="1", NAME="%k", MODE="0640", GROUP="hal"
# BUS="ide", KERNEL="hd[a-z]*", PROGRAM="/etc/udev/scripts/device-removable.sh
%k", RESULT="1", NAME="%k", MODE="0640", GROUP="hal"
BUS="usb", KERNEL="ub[a-z]*", NAME="%k", MODE="0640", GROUP="hal"

Since they point to /etc/udev/scripts/device-removable.sh:
#!/bin/sh -e
# print "1" if device $1 is either removable, on the ieee1394 or on the usb
bus,
# and "0" otherwise.

check_bus() {
# check if the DEVICE is on the given bus
# This is done by checking if any of the devices on the bus is a prefix
# of the device
BUSDEVP="/sys/bus/$1/devices"
for x in $BUSDEVP/*; do
[ -L "$x" ] || continue
if echo "$DEVICE" | grep -q "^$(readlink -f $x)"; then
return 0
fi
done
return 1
}

DEV="${1%[0-9]*}"
BLOCKPATH="/sys/block/$DEV"

if [ ! -d "${BLOCKPATH}" ]; then
exit 1
fi

REMOVABLE="${BLOCKPATH}/removable"
DEVICE="$(readlink -f "${BLOCKPATH}/device")"
IS_REMOVABLE="0"

if [ -e "$REMOVABLE" ]; then
IS_REMOVABLE="$(cat $REMOVABLE)"
fi

if [ "$IS_REMOVABLE" = "1" ] || check_bus "usb" || check_bus "ieee1394" ; then
echo 1
else
echo 0
fi
exit 0


Nothing here leads me to believe this is how the automounting happens. I also
looked at my Ubuntu udev scripts and rules and saw nothing there.

Can someone enlighten me otherwise?

Rob

--
Mountlake Terrace, WA, USA


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org