Re: [SLUG] finding a device attachment

From: Ronald KA4INM Youvan (ka4inm@tampabay.rr.com)
Date: Fri Jun 27 2003 - 02:24:54 EDT


> I'm having trouble finding where new hardware attaches to a software
> system/kernel.

   I don't think "hardware attaches itself" I think you connect your
new hardware to controller chips that are pre-set to particular buss
addresses.

> Now, I have a floppy tape drive (installed during power-off),
> and I have no idea where it went or if there are drivers
> loaded at all.

   It would be unwise to load useless drivers every time you boot up.
LINUX drivers are generally compressed "object" files.
  (compiled but un-linked) Slackware keeps them in:
   /lib/modules/2.4.20/kernel/drivers which contain 22 directories,
(sub directories to winders folks) and theirs abouts AND compiled
into your kernel. (the most frequently used, needed drivers)
(you can speed up you booting {a tinny bit} by re-compiling your
kernel with just the drivers YOU need.

   It is up to you to have new optional drivers loaded from now on
by uncommenting what you need (in Slackware it's in:)
   /etc/rc.d/rc.modules (just "run" the file, no need to reboot!!!)
   It is up to you to provide a "mount point" for devices that are to
be mounted (attached to THE file system), mount points are simply
directories. (they don't have to be empty, but while something is using it as a
mount point it will be inaccessible.
  Then you by manually mount the device every time you need it, or add a line
to: (in Slackware it's:) /etc/fstab (file system table)

   I have a 100 meg. ZIP drive listed as:
(#fs_spec fs_file fs_vfstype fs_mntops fs_freq fs_passno
  /dev/sda4 /zip msdos noauto,rw,defaults 0 0
(it was pre formatted, and I have been too lazy to re-format it)
it does not auto mount, I have to:" mount /zip <ENTER> " to mount it,
and " umount /zip <ENTER> " to umount it. (to change disks) but my
second hard drive is:
/dev/hdb1 /y reiserfs defaults 0 0
and it auto mounts. See man fstab + man mount if this is new to you.

   Hardware is devices and in /dev there are psuto??? files that link
the controller chips (IC's) to the software, this is far to complex
for me to understand. I found a cross reference that links the two.
(I have no idea where it is or what it is called.)
   The trick is the major number and the minor number for each device.
you can see them thus:

ka4inm ~> ls -l /dev/fd0
brw-rw---- 1 root floppy 2, 0 May 14 1996 /dev/fd0
major 2, minor 0
and
ka4inm ~> ls -l /dev/hda1
brw-rw---- 1 root disk 3, 1 Jun 9 2002 /dev/hda1
ka4inm ~> ls -l /dev/hdb1
brw-rw---- 1 root disk 3, 65 Jun 9 2002 /dev/hdb1
ka4inm ~> ls -l /dev/hdc1
brw-rw---- 1 root disk 22, 1 Jun 9 2002 /dev/hdc1
ka4inm ~> ls -l /dev/hdd1
brw-rw---- 1 root disk 22, 65 Jun 9 2002 /dev/hdd1
   How this got worked out, I don't understand. It works.
Now what was the question?

-- 
        73 (= Best Regards) de: Ron ka4inm@tampabay.rr.com
     100% Slack. since July, 1997 (still free!) SENT D&T are UTC
        Visit my HAM Web SITE at: http://www.qsl.net/ka4inm



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 17:40:16 EDT