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

Re: ltsp-usb



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08-12-2004 21:06, Ragnar Wisloff wrote:
> Jonas Smedegaard skrev:
> 
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 08-12-2004 15:41, Ragnar Wisloff wrote:
>>
>>  
>>
>>> I was able to access the pen having restarted floppyd with the
>>> devfs-device after having changed manually the permissions. But after
>>> removing and reinserting the pen no access was possible.
>>>
>>> So I wonder if it is correct for floppyd to use the static /dev/sda1 or
>>> whatever device, perhaps the correct device is the devfs one. And
>>> possibly floppyd does not handle devfs very well.
>>>   
>>
>>
>> With devfs /dev/sda1 is (or should be!) a symlink to the actual device.
>>
> 
> Right. It might be, I don't have the client here to test. The script
> that runs at boot does this:
> 
> mknod /dev/sda b 8 0
> mknod /dev/sda1 b 8 1
> chmod 666 /dev/sd*
> floppyd -d /dev/sda1
> 
> But it would probably be better to do somthing like
> 
> floppyd -d /dev/scsi/.../part1

Try instead adding the sfdisk and/or sleep lines before starting floppyd.

That gives you a quick'n'dirty solution, where you will probably need to
restart the thin client whenever you want to plug in a new USB key: Next
key will be attached to a different pseudo-SCSI device.


I suggest writing a /proc/sys/proc/hotplug script based on the scripts I
spoke about earlier, and start/stop floppyd dynamically, attaching to
the device actually there.


>> Either that symlink is not (yet?) created, or floppyd does not handle
>> symlinks to devices.
>>  
>>
> 
> Yes, it could be a timing problem. Floppyd is a bit of white area on my
> map.

The sleep is there in case of a timing problem between modprobe/insmod
and devfsd. Floppyd is even later on in the chain...


>> Check if /dev/sda1 actually exists after unplugging and re-plugging the
>> USB key. That is not always the case - guides for booting off of USB
>> keys tend to include adding the following after loading the USB modules
>> to "wakeup" the device:
>>
>> /bin/sleep 5
>> /sbin/sfdisk -R /dev/sda || true
>>  
>>
> 
> Yes, good point. But with the device /dev/sda1 being totally static it
> is there all the time. But perhaps just staring out into the wild blue
> yonder rather than at the usb pen.

Ahem - I don't think so. When using devfs you do _not_ have static
device entries, only ones generated on-the-fly by devfsd.

What is the reason for using sfdisk is that in some situations devfsd do
not generate the device file untill the device is "spoken to", and it
may be that floppyd does not speak blindly to a device, but first checks
if the device file of the device exists (which means floppyd does not
work untill something else pokes around with the device, waking up
devfsd to generate the device file).

Did that make sense?

Please (as I wrote) check if /dev/sda1 actually exists. Do not blindly
expect it to be there.


 - Jonas


- --
* Jonas Smedegaard - idealist og Internet-arkitekt
* Tlf.: +45 40843136  Website: http://dr.jones.dk/

 - Enden er nær: http://www.shibumi.org/eoti.htm
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBt20Yn7DbMsAkQLgRAiwmAJ4x5tLrbLD+1F9/2gwhDO33b/8Q/gCfRf86
OQcM+AlK3BPdzAjcozqDe8Y=
=GIqx
-----END PGP SIGNATURE-----



Reply to: