catch sda1 or /dev/scsi/host1/bus0/target0/lun0

catch sda1 or /dev/scsi/host1/bus0/target0/lun0

Post by Franc » Fri, 23 Jan 2004 23:30:31



Hello!

When I connect a usb device, dmseg tells me which special file the device is
attached on.
This is sda1 or something like : /dev/scsi/host1/bus0/target0/lun0

I would like to catch this information in a script.
Can anybody tell me how can i do ?
 I think this is a kernel information; how can I get it ?

Thanks for your help.

FRanck

 
 
 

catch sda1 or /dev/scsi/host1/bus0/target0/lun0

Post by M?ns Rullg? » Sat, 24 Jan 2004 01:29:13



> Hello!

> When I connect a usb device, dmseg tells me which special file the device is
> attached on.
> This is sda1 or something like : /dev/scsi/host1/bus0/target0/lun0

> I would like to catch this information in a script.
> Can anybody tell me how can i do ?
>  I think this is a kernel information; how can I get it ?

http://linux-hotplug.sourceforge.net/

--
M?ns Rullg?rd


 
 
 

catch sda1 or /dev/scsi/host1/bus0/target0/lun0

Post by Franc » Sat, 24 Jan 2004 01:36:28


Quote:>> When I connect a usb device, dmseg tells me which special file the device
>> is attached on.
>> This is sda1 or something like : /dev/scsi/host1/bus0/target0/lun0

>> I would like to catch this information in a script.
>> Can anybody tell me how can i do ?
>>  I think this is a kernel information; how can I get it ?

> http://linux-hotplug.sourceforge.net/

No hotplug only loads modules and executes particular scripts.

I want catch the device name (like sda1 or sdb1) of the connected device. I
think this information comes from the kernel but how to get it ?

FRanck

 
 
 

catch sda1 or /dev/scsi/host1/bus0/target0/lun0

Post by M?ns Rullg? » Sat, 24 Jan 2004 02:36:01



>>> When I connect a usb device, dmseg tells me which special file the device
>>> is attached on.
>>> This is sda1 or something like : /dev/scsi/host1/bus0/target0/lun0

>>> I would like to catch this information in a script.
>>> Can anybody tell me how can i do ?
>>>  I think this is a kernel information; how can I get it ?

>> http://linux-hotplug.sourceforge.net/

> No hotplug only loads modules and executes particular scripts.

> I want catch the device name (like sda1 or sdb1) of the connected device. I
> think this information comes from the kernel but how to get it ?

You can have hotplug run any script you like.  Read the hotplug
documentation/scripts to see how the device name is passed.

--
M?ns Rullg?rd

 
 
 

1. Copying Linux from /dev/sda1 to /dev/hda5

I need to copy my RedHat Linux 3.0.3 w/ Kernel 2.0 system (475Mb partition in an external SCSI disk) to a bigger
partition in my primary IDE drive.
I've already formated and created the Linux filesystem in then new partition (I can mount the partition under Linux now).  
What command do I issue to copy special files, hidden files, etc to the new filesystem?  I imagine I have to modify
the /etc/lilo.conf file to reflect the fact the that kernel resides on another bootdisk.  Do I just re-run lilo after the
modification of the /etc/lilo.conf?  What about re-creating /dev files?

Any help would be greatly appreciated.

Thanks,

Miguel Palacios

2. RCS, how to have a common RCS directory?

3. lost /dev/sda and /dev/sda1

4. Mac owners (& others) being victimized

5. LILO trouble with scsi /dev/sda1 (RH4.1 - Intel)

6. calentool 2.3X for Unix/Solaris/Linux released

7. Copying filesystem from /dev/hda2 to /dev/sda1

8. Backup - Help please!

9. LILO on /dev/hda1 booting to MBR on /dev/sda1

10. llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll

11. Reading or viewing the /dev/bus0 which contains POS registers

12. P L, PPCQAU7HGUTGG..........................VCCCCCCCCCCCCC AAAAAAAAAAAAAAAAAAAAANNNNNNNNNNNNNNNNNN777777777777777RRRRRRRRRRRRRRRRRBBBBBBBBBBBBBBBBBBBBBBB

13. TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT