Put in remaining pages and wiki contents.
[ikiwiki.git] / docs / howtos / HowToDevice.mdwn
1  **Index** 
2
3 # Device-specific information for DragonFly BSD 
4 Sometimes, a device can be made working only with some "tricks". Here you can find mini-howto's for that.
5
6 ## ACPI 
7 Some computers and notebooks have an "inaccurate" ACPI implementation which requires a work-around. Here you can find informations about the necessary ACPI settings
8
9
10 ### ASUS V6800 notebook 
11 When booted with ACPI enabled, the keyboard doesn't work. To make it work, add this line to your /boot/loader.conf file:
12     
13     debug.acpi.disabled="sysresource"
14
15
16 ## PATA(IDE) & SATA disk controller tuning 
17
18 To speed up disk access, you may want to set this parameters in your /boot/loader.conf:
19     
20     hw.ata.atapi_dma="1"
21     hw.ata.ata_dma="1"
22     hw.ata.wc="1" (Write caching, may cause data loss on power failure!)
23
24 For more details, look here: http://leaf.dragonflybsd.org/cgi/web-man?command#ata&section4
25
26 ## Graphic cards 
27
28 Informations for specific graphic cards
29
30 ### ATI & NVidia 
31
32 Currently, there are no drivers from ATI or Nvidia available. You must use the Xorg device drivers. This means that you won't have hardware accelerated OpenGL support.
33
34 ## Input devices 
35
36 Informations for input devices (e.g. mouse, keyboard, touchpad)
37
38 ### Synaptics touchpad 
39
40 You can use synaptic touchpads with Xorg. Your section "Input Device" should contain this lines:
41
42     
43         Option "Protocol"    "Auto"
44         Option "Protocol"    "/dev/psm0"
45
46
47 There's currently no support available for the the scrolling functionality on touchpads.
48
49 ## Intel Pentium-M processors 
50
51 ### Controlling the CPU frequency 
52
53 DragonFlyBSD has a kernel module for Enhanced Speedstep, named est.
54
55 If you want to load the est module on boot time, place this line in the file /boot/loader.conf:
56     
57         est_load="YES"
58
59
60 When the module is loaded, you can set and read the CPU frequency settings with sysctl machdep.est.
61
62 There's also a patch available for the pkgsrc package sysutils/pkgsrc from Johannes Hofmann. You can download it here
63 http://www.ecademix.com/JohannesHofmann/estd_pkgsrc-1.patch.gz .
64
65 To apply the patch, do a
66
67     
68         cd /usr/pkgsrc
69         patch -p0 < /path/to/estd_pkgsrc-1.patch
70
71
72 Now compile and install the pkgsrc-package sysutils/estd.
73
74 estd automatically sets the processor speed, depending of the current CPU usage.
75 To use estd, start it with
76
77     
78         estd -d -s
79
80
81 for example. Look at the manpage of est for further explanation.
82
83 ## WLAN 
84
85 ### Intel ipw2200 WLAN adapter & WPA 
86
87
88 * You must have compiled the if_iwi module for using the ipw2200.
89
90
91 * You must have compiled the wpa_supplicant. It is included in DragonFlyBSD since Jun-25-2006. If you have an earlier version of DragonFlyBSD, you have to download the necessary files from http://leaf.dragonflybsd.org/~sephe/wpa/ - including all subdirectories -, put them into a subdirectory on your machine, cd into wpa_supp, do a "make" and copy the file wpa_supplicant to /usr/bin/ and do a "chown root:wheel" on that file (the make install is broken).
92
93
94 * Install the firmware with the pkgsrc-package sysutils/iwi-firmware.
95
96 Add this line to your /boot/loader.conf file:
97     
98     if_iwi_load="YES"
99
100
101 This will load the driver on boot time. Create a file, like start_if.iwi0, in your /etc directory and make it executable. This is an example for setting an IP address and the default gateway and enabling WPA:
102     
103     ifconfig iwi0 up
104     wpa_supplicant -B -i iwi0 -c /etc/wpa_supplicant.conf > /var/log/wpa.log
105     route add default 192.168.2.1
106
107
108 Create a file /etc/wpa_supplicant.conf for the WPA configuration. This is an example:
109     
110     network={
111             ssid="myESSID"
112             scan_ssid=1
113             key_mgmt=WPA-PSK
114             psk="myPreSharedKey"
115     }
116
117
118 If you've done everything correct, you should get a WLAN connection after reboot automagically.
119
120 Known issues with if_iwi:
121
122
123 * Some channels, which will work under Linux, may not work under DragonFlyBSD (for me: channel 13). So, try out to switch your channel, if you don't get a connection.
124
125
126 * May be you can't get a connection, if the ESSID of your access point/router is hidden. Try to make it visible.
127
128 ## Users mounting and using block devices 
129
130 Ordinary users can be permitted to mount devices. Here is how:
131
132 As root set the sysctl variable vfs.usermount to 1.
133     
134     # sysctl -w vfs.usermount=1
135
136 As root assign the appropriate permissions to the block device associated with the removable media.
137
138 For example, to allow users to mount the first floppy drive, use:
139     
140     # chmod 666 /dev/fd0
141
142
143 To allow users in the group operator to mount the CDROM drive, use:
144     
145     # chgrp operator /dev/acd0c
146     # chmod 640 /dev/acd0c
147
148 You will need to alter /etc/devices.conf to make these changes permanent across reboots.
149
150 As root, add the necessary lines to /etc/devices.conf. For example, to allow users to mount the first floppy drive add:
151     
152     # Allow all users to mount the floppy disk.
153     fd0    root:operator    666
154
155
156 To allow users in the group operator to mount the CD-ROM drive add:
157     
158     # Allow members of the group operator to mount CD-ROMs.
159     
160 *cd0*   root:operator    660
161
162
163 Finally, add the line vfs.usermount=1 to the file /etc/sysctl.conf so that it is reset at system boot time.
164
165 All users can now mount the floppy /dev/fd0 onto a directory that they own:
166     
167     % mkdir ~/my-mount-point
168     % mount -t msdos /dev/fd0 ~/my-mount-point
169
170 Users in group operator can now mount the CDROM /dev/acd0c onto a directory that they own:
171     
172     % mkdir ~/my-mount-point
173     % mount -t cd9660 /dev/acd0c ~/my-mount-point
174
175 Unmounting the device is simple:
176     
177     % umount ~/my-mount-point
178
179 Enabling vfs.usermount, however, has negative security implications. A better way to access MS-DOSĀ® formatted media is to use the emulators/mtools package in the ports collection.
180
181 Note: The device name used in the previous examples must be changed according to your configuration.
182
183 ## Mounting a FS image 
184
185 Here is how to mount a FS image under DragonFly, the most used ones are .ISO for cd and dvd media.
186
187 If you have an .ISO image created with mkisofs or any other app, there is a method for mounting it without burn the image to some physical media. 
188
189 In the next example, let'a assume the File System image is iso9660 named image.iso and it resides in the current directory.
190
191     
192     vnconfig /dev/vn0c ./image.iso
193     mount -t cd9660 /dev/vn0c /cdrom
194
195
196
197 When you're finished with the image, here's how you reverse the above:
198
199     
200     umount /cdrom
201     vnconfig -u /dev/vn0c
202
203
204
205 You can use this method for mounting images of other File Systems too. If you want to mount, say an msdos image, you could do it like this:
206
207     
208     vnconfig /dev/vn0c ./image.fat
209     mount -t msdos /dev/vn0c /cdrom
210
211
212 Use the same steps as shown in the previous example to umount it. Have a look at man mount for more info about the various image types which you can mount.
213
214 NOTE: Once mounted, you cannot write to an ISO image. ISO images are readonly by design. If you want to change what is in your ISO image, use mkisofs. If you didn't create the ISO, then you could mount the image, copy everything from the image to disk, then use mkisofs to create a new ISO.