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

Re: [K12OSN] Access to local CD ROM



Yes, as soon as I make myself sit down and make sure it'll actually work
. . . ;-)
I haven't had time to actually see if it works, but from what I've
worked out I see no reason it shouldn't be possible to both 1)do it and
2) make it automated, I just haven't actually sat down with a LTSP box
to do it yet :-(

However, for those interested in my thoughts, and perhaps with more
knowledge of the network block device...

There are three pieces that need to be taken into account:
1)mount points
2)nbd devices/clients per workstation on the server
3)running the nbd server on the client (yeah, I know, it sounds
backwards, think like X, the server runs on the client ;-))

3 is simple, you just have the workstation share its /dev/cdrom from a
startup script

2 is a little bit more difficult, but shouldn't be too hard to do from a
number of angles, you can generate all of the nodes in /dev from a
configuration file on startup, or you can wrap the actual tftp downloads
and create them at "boot" (much better solution, but requires more work
on my part, I have to figure out how to do that :-()

best of all answers 1 and 2: PreSession (yes, it runs as root)
from here you have access to all the information you need: the username,
and the remote host (albeit, indirectly through the DISPLAY environment
variable) armed with this information you can 
1: check to see if there is a dev entry already there, if so reuse it,
otherwise create it
2: start the nbd client (this is the hangup at this point, like I said,
the nbd stuff isn't documented that well and I REALLY haven't taken the
time to look into it)

and then we come to the ugly, but workable hack:
you have to create /etc/fstab entries for the mount points or the users
won't be able to mount them... my initial thought was to create the
mount points under /mnt/<ip>/cdrom, etc. and have a symlink from there
to $HOME/cdrom BUT mount doesn't dereference links, so that doesn't
work) which means you have to modify /etc/fstab through a script of some
kind, which is kind of ugly and potentially error prone, so solution:

/dev/auto_nbd/<ip> is the name of the nbd device created in step 1, and
we ONLY touch these entries

we make a line in /etc/fstab that allows the user to mount that device
in their home directory.  Yes it's a kludge, I know, however, once I get
time to sit down and iron this out it SHOULD be able to operate in a
relatively seemless manner, provided the scripts I write don't have any
bugs ;-)

On log out (PostSession) we remove all of this, the fstab entry, the dev
entry and the nbd client. Now if someone else wants to figure out the
nbd for me, I'd be much obliged.;-)
The kernel docs point to Pavel Machek's page, which doesn't have docs on
nbd, and RedHat, while it ships the nbd.o module, doesn't ship the
utilities to work with it, and I have managed to kludge up some
"Enhanced Network Block Device" rpms with the module and the utilities,
it conflicts with the kernel rpm and I don't like --force'ing it (that
won't be pretty on an install, and I have 0 desire to rebuild the kernel
RPM, I've looked into it and it isn't pretty)
And I'm not sure if the enhanced nbd utilities will work with the
"regular" one shipped by RedHat.  These are the things I'm currently
embroiled in (along with my regular work, school, and life ...)

--Shahms

On Tue, 2002-04-30 at 22:53, Eric Harrison wrote:
> On Tue, 30 Apr 2002, Kyle Herbert wrote:
> 
> >Hello Group,
> >
> >   Has anyone here dug into accessing a cd-rom local to the terminal client?
> >
> >   If anyone can point me to a "howto", I'd truly appreciate it.
> >
> >Thanks,
> >--Kyle
> >
> 
> 
> Shahms, the uber-hacker, has been playing around with this.
> 
> I have not had the chance to look at what he's done, but if I understood
> him correctly he has something working.
> 
> Shahms, wanna show us what you got? ;-)
> 
> -Eric
> 
> 






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