[ltp] auto modloading as nonroot

Tod Harter linux-thinkpad@linux-thinkpad.org
Thu, 30 Oct 2003 12:42:03 -0500


On Wednesday 29 October 2003 6:21 am, Andr=E9 Wyrwa wrote:

Hmmmm. On my desktop system I have just

alias scsi_hostadaptor ide-scsi

and thats it...

However I do have also a real scsi card, so you may need a 'pre-install' ru=
le=20
still to load scsi_mod, like:

pre-install ide-scsi modprobe scsi_mod

(on a system with other SCSI that would most likely already have happened a=
t=20
boot time is all).=20

My fstab has:

none /mnt/cdrom supermount dev=3D/dev/scd0,fs=3Dauto,ro,--,iocharset=3Dutf8=
,umask=3D0=20
0 0

which if you aren't using supermount just translates to something like

/dev/scd0 /mnt/cdrom auto ...

which I can't see being different from what you have except the symlink, wh=
ich=20
should be unimportant. Maybe its just the extra 'pre-install' rules that ar=
e=20
getting you? I know various HOWTO's on cdrom burning tell you to have those=
=20
in there, but I don't know why they think its needed. Maybe its just that=20
these days with all the 'SCSI' stuff out there its unlikely they won't=20
already be in memory.


> Hi,
>
> I have some problem with my automatic modules loading when I try to
> mount some drives.
>
> When I try to mount my cdrw as non-root user I get "mount: /dev/cdrom is
> not a valid block device", obviously the modules don't get autoloaded.
>
> So I switch to root, mount and umount the
> drive, switch back to the user and now can
> mount the drive as non-root as well.
>
> I guess this isn't normal? Shouldn't the
> modules get loaded as non-root also?
>
> As an example there is my cdrw drive:
>
> I'm using scsi emulation, so I have the following entries in
> /etc/modules.conf:
>
> alias scsi_hostadapter ide-scsi
> alias scd0 sr_mod
> pre-install sg modprobe ide-scsi
> pre-install sr_mod modprobe ide-scsi
> pre-install ide-scsi modprobe scsi_mod
>
> According fstab entry is:
>
> /dev/cdrom	/cdrom		auto   \
> ro,users,noauto,unhide  0    0
>
> /dev/cdrom links to /dev/scd0 and this has
> permissions brw-rw---- and is owned by
> root.disk.
>
> My nonroot account is member of the disk group.
>
> Andr=E9.

=2D-=20
Tod Harter
Giant Electronic Brain
http://www.giantelectronicbrain.com