| 1 | <hr/> | 
| 2 |  | 
| 3 | - FreeBSD(stable): | 
| 4 | o read more about BSD package systems (pkg, cvsup) | 
| 5 | x for simple package installation/de-installation use pkg | 
| 6 | x install downloaded package: | 
| 7 | :# pkg_add {package}-{version}.tgz | 
| 8 | x install package via remote server(only if package is available as *latest*): | 
| 9 | pkg_add -r {package}.tgz | 
| 10 | x using cvsup | 
| 11 | x read http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvsup.html | 
| 12 | x newbies could use cvsupit: | 
| 13 | :# pkg_add -r cvsupit.tgz | 
| 14 | - cvsupit will proberly ask you for the default values it | 
| 15 | place at /etc/cvsupfile, which is used by cvsup | 
| 16 | - after that it will start cvsup to update your system | 
| 17 | x if /etc/cvsupfile already exists and you know what you do, | 
| 18 | this command will update your system (maybe run it via cron...): | 
| 19 | :# /usr/local/bin/cvsup -g -L 2 /etc/cvsupfile | 
| 20 | where '-g' tells cvsup not to use a GUI, '-L 2' sets default output level to 2 | 
| 21 | x for available cvs tags, look at http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvs-tags.html | 
| 22 | o whats about daemon start-stop scripts (like at linux: /etc/init.d/) ? | 
| 23 | x some daemons (only installed ports?) start-stop-scripts are placed at '/usr/local/etc/rc.d/' | 
| 24 | o how at '/etc/rc.conf' toogled start-up scripts can be run manually(e.g. /etc/rc.firewall)? | 
| 25 | x configure and compile custom kernel: | 
| 26 | x read http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-building.html | 
| 27 | x create custom kernel conf-file | 
| 28 | - cd usr/src/sys/i386/conf/ | 
| 29 | - copy default kenrnel GENERIC to eg MYKERNEL | 
| 30 | - edit/modify MYKERNEL | 
| 31 | x configure sources(really?) | 
| 32 | - run /usr/sbin/config MYKERNEL | 
| 33 | x build kernel | 
| 34 | - cd ../../MYKERNEL | 
| 35 | - make depend | 
| 36 | - make | 
| 37 | - make install | 
| 38 | x use packet fiters (firewall): | 
| 39 | x read http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/firewalls.html | 
| 40 | x some options at the kernel have to be enabled: | 
| 41 | - options IPFIREWALL | 
| 42 | Compiles into the kernel the code for packet filtering. | 
| 43 | - options IPFIREWALL_VERBOSE | 
| 44 | Enables code to allow logging of packets through syslogd. | 
| 45 | Without this option, even if you specify that packets should be logged in the filter rules, | 
| 46 | nothing will happen. | 
| 47 | - options IPFIREWALL_VERBOSE_LIMIT=10 | 
| 48 | Limits the number of packets logged through syslogd on a per entry basis. | 
| 49 | You may wish to use this option in hostile environments in which you want to log firewall activity, | 
| 50 | but do not want to be open to a denial of service attack via syslog flooding. | 
| 51 | When a chain entry reaches the packet limit specified, logging is turned off for that particular entry. | 
| 52 | To resume logging, you will need to reset the associated counter using the ipfw(8) utility: | 
| 53 | :# ipfw zero 4500 | 
| 54 | Where 4500 is the chain entry you wish to continue logging. | 
| 55 | - options IPFIREWALL_DEFAULT_TO_ACCEPT | 
| 56 | This changes the default rule action from ``deny'' to ``allow''. | 
| 57 | This avoids the possibility of locking yourself out if you happen to boot a kernel with IPFIREWALL support but have not configured your firewall yet. | 
| 58 | It is also very useful if you often use ipfw(8) as a filter for specific problems as they arise. | 
| 59 | Use with care though, as this opens up the firewall and changes the way it works. | 
| 60 | x firewall is enabled at /etc/rc.conf (or /etc/rc.conf.local) | 
| 61 | firewall_enabled = "YES" | 
| 62 | firewall_type = "{firewall_type}" | 
| 63 | x where {firewall_type} is either a case at /etc/rc.firewall (/etc/rc.firewall6 for ipv6) | 
| 64 | or some custom file to read rules from. | 
| 65 | x  Use firewall_type = "OPEN" for default policy 'OPEN' (allow all) | 
| 66 |  | 
| 67 |  | 
| 68 | - Linux & Wireless Lan: | 
| 69 | x install modules: | 
| 70 | x prims2 chipset based: | 
| 71 | - if debian kernel-image is used | 
| 72 | :#apt-get install linux-wlan-ng-modules-{your_arch} | 
| 73 | - if not, cd to some temp dir and | 
| 74 | :#apt-get source linux-wlan-ng   or wget sources manually if other dist is used | 
| 75 | :#cd linux-wlan-ng-{version} | 
| 76 | :#./Configure | 
| 77 | :#make all install | 
| 78 | x configure at debian: | 
| 79 | x add SSID to dev at /etc/wlan/wlan.conf e.g.: | 
| 80 | SSID_wlan0="WGATEWAY" | 
| 81 | ENABLE_wlan0=y | 
| 82 | x create and edit cutom config related to SSID | 
| 83 | :#cp /etc/wlan/wlancfg-DEFAULT /etc/wlan/wlancfg-WGATEWAY | 
| 84 | :#nano /etc/wlan/wlancfg-WGATEWAY | 
| 85 | x notes!: | 
| 86 | - prism2-based USB devices mostly needs hardware reset to get changes work! | 
| 87 | this is caused of the firmware and could only be solved by a firmware-upgrade | 
| 88 | of the vendor responsible for these devices. | 
| 89 | o get WEP really work at heterogen enviroments(eg. between Win and Linux) | 
| 90 | o WEP is unsecure! (see http://wepcrack.sourceforge.net/) | 
| 91 | o use IPSEC | 
| 92 | o or some other ideas? | 
| 93 |  | 
| 94 | - Linux & Bluetooth | 
| 95 | With some tweaking bluetooth works as expected. | 
| 96 | You will need the above mentioned patch patch-2.4.20-mh6 to have full functionality with 2.4.20. Then add | 
| 97 |  | 
| 98 | deb http://bluez.sourceforge.net/download/debian/woody/ ./ | 
| 99 | deb-src http://bluez.sourceforge.net/download/debian/woody/ ./ | 
| 100 |  | 
| 101 | to your /etc/apt/sources.list for woody and install at least the packages "bluez-bluefw" | 
| 102 | for loading the firmware into the usb bluetooth device. You will need "bluez-utils" for hci and rfcomm communications. | 
| 103 | You need to add this line | 
| 104 |  | 
| 105 | bluefw 0x0003 0x044e 0x3001 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 | 
| 106 |  | 
| 107 | to your /etc/hotplug/usb/bluefw.usermap to let the bluefw automatically load the appropriate firmware | 
| 108 | into your dongle once it shows up. | 
| 109 |  | 
| 110 | I am using bluetooth with a Siemens S55, but e.g. Nokia 6310i goeas the same way. | 
| 111 | For an initial pairing you will need a pin in /etc/bluetooth/pin which at least needs to have 5 digits which is documented near nowhere. | 
| 112 | Once you do the pairing (Entered pin on the X requester popping up and on the cellphone) you can set your phone to not "Ask on connection". | 
| 113 | Afterwards i put the rfcomm config into the /etc/bluetooth/rfcomm.conf | 
| 114 |  | 
| 115 | rfcomm0 { | 
| 116 | device 00:02:EE:B8:50:C5; | 
| 117 | channel 1; | 
| 118 | comment "S55 Dialup connection"; | 
| 119 | } | 
| 120 |  | 
| 121 | rfcomm1 { | 
| 122 | device 00:02:EE:B8:50:C5; | 
| 123 | channel 9; | 
| 124 | comment "S55 OBEX"; | 
| 125 | } | 
| 126 |  | 
| 127 | For dialing out via ppp you now can use /dev/rfcomm0 which should lead to your phone asking you to accept the connection. | 
| 128 | For debugging you can use these commands: | 
| 129 |  | 
| 130 | :~$ sudo hcitool scan | 
| 131 | Scanning ... | 
| 132 | 00:02:EE:B8:50:C5       6310i.rfc822 | 
| 133 | :~$ sudo hcitool info 00:02:EE:B8:50:C5 | 
| 134 | Requesting information ... | 
| 135 | BD Address:  00:02:EE:B8:50:C5 | 
| 136 | Device Name: 6310i.rfc822 | 
| 137 | LMP Version: 1.1 (0x1) LMP Subversion: 0x22c | 
| 138 | Manufacturer: Nokia Mobile Phones (1) | 
| 139 | Features: 0xbf 0x28 0x21 0x00 | 
| 140 | <3-slot packets> <5-slot packets> <encryption> <slot offset> | 
| 141 | <timing accuracy> <role switch> <sniff mode> <SCO link> | 
| 142 | <HV3 packets> <CVSD> | 
| 143 | :~$ sudo sdptool browse | 
| 144 | Inquiring ... | 
| 145 | Browsing 00:02:EE:B8:50:C5 ... | 
| 146 | Service Name: Fax | 
| 147 | Service RecHandle: 0x10000 | 
| 148 | Service Class ID List: | 
| 149 | "Fax" (0x1111) | 
| 150 | "Generic Telephony" (0x1204) | 
| 151 | Protocol Descriptor List: | 
| 152 | "L2CAP" (0x0100) | 
| 153 | "RFCOMM" (0x0003) | 
| 154 | Channel: 2 | 
| 155 | Language Base Attr List: | 
| 156 | code_ISO639: 0x656e | 
| 157 | encoding:    0x6a | 
| 158 | base_offset: 0x100 | 
| 159 | Profile Descriptor List: | 
| 160 | "Fax" (0x1111) | 
| 161 | Version: 0x0100 | 
| 162 | ................. | 
| 163 |  | 
| 164 | - Hardware Notes: | 
| 165 | x Broadcom 2033 chipset (tested with an ALLNET 7031 Class1 USB Adapter) | 
| 166 | - Make sure you have bluefw and hotplug installed, then everything works fine right out of the box. | 
| 167 | x on debian using default or for newer packages above sources: | 
| 168 | :#apt-get install bluez-bluefw | 
| 169 | - DO NOT enable the bluetooth.o module to avoid it being loaded by hotplug!! | 
| 170 | x this can be done by adding  'bluetooth' to '/etc/hotplug/blacklist' | 
| 171 |  | 
| 172 | The Bluetooth device in this laptop is a USB Bluetooth device. | 
| 173 | By default, Linux provides two different device drivers for USB Bluetooth devices: bluetooth.o and hci_usb.o. | 
| 174 | The hci_usb.o is the correct driver for this device. Both drivers are loaded when the Bluetooth button is pushed | 
| 175 | but unfortunately bluetooth.o obtains the device first, not allowing hci_usb.o to use the device. | 
| 176 | In order for the Bluetooth device to be function, the bluetooth.o driver must not load. | 
| 177 | One way to stop the bluetooth.o driver from loading is to remove the driver from the system. This is accomplished by doing: | 
| 178 |  | 
| 179 | :#rm /lib/modules/2.4.18-14/kernel/drivers/usb/bluetooth.o | 
| 180 | :#depmod -a | 
| 181 |  | 
| 182 | Now, if inserting th usb device only the hci_usb.o should be loaded. | 
| 183 |  | 
| 184 |  | 
| 185 | - ACPI | 
| 186 | x get suspend work | 
| 187 | - compile kernel with 'Software Suspend Support' | 
| 188 | - some interesting post: | 
| 189 | from http://lists.debian.org/debian-laptop/2002/debian-laptop-200208/msg00349.html | 
| 190 | #------- begin post ----------------------- | 
| 191 | From: "Bem Ajani Jones-Bey" <ajani@OCF.Berkeley.EDU> | 
| 192 | > On Fri, Aug 23, 2002 at 01:14:06PM +0200, Erich Schubert wrote: | 
| 193 | > > Well, S1 is sleep mode, so your BIOS claims to not support sleep mode! | 
| 194 | > > Try getting a bios update, that might help. | 
| 195 | > > S5 is poweroff... S3 or S4 are suspend levels i think... one might be | 
| 196 | > > power-off, maybe that was S3... | 
| 197 | S4 is suspend-to-disk, S3 is suspend-to-RAM. | 
| 198 | > So, last I checked, Linux ACPI didn't support suspend to memory or | 
| 199 | > suspend to disk; the software suspend patch is the only way to get an | 
| 200 | > ACPI laptop to do anything resembling sleeping. I was also under the | 
| 201 | > impression that this wasn't going to work for awhile; at least until | 
| 202 | > 2.6. I admit I haven't looked at ACPI in a couple months, but last time | 
| 203 | > I looked, they were projecting that suspend./sleep wouldn't happen any | 
| 204 | > time soon. | 
| 205 | Last I checked, ACPI does suspend to memory or disk, using swsusp.  It's | 
| 206 | even all integrated into the 2.5 kernels (though the CONFIG_SWSUSP option is | 
| 207 | buried in the kernel hacking section rather than ACPI). If you don't want to | 
| 208 | run an experimental kernel, then you can patch 2.4.x from the acpi.sf.net site. | 
| 209 | #-------- end post ------------------------------- | 
| 210 |  | 
| 211 |  | 
| 212 | - Backup: | 
| 213 | x bacula (http://www.bacula.org) | 
| 214 | Bacula is a set of computer programs that permit you (or the system administrator) to manage backup, | 
| 215 | recovery, and verification of computer data across a network of computers of different kinds. | 
| 216 | In technical terms, it is a network client/server based backup program. | 
| 217 | Bacula is relatively easy to use and efficient, while offering many advanced storage management features | 
| 218 | that make it easy to find and recover lost or damaged files. | 
| 219 | Bacula source code has been released under the GPL version 2 license. | 
| 220 | x created debian package, cause we can't found any other | 
| 221 | x wrote some notes about how to build an debian binary package | 
| 222 | http://www.netfrag.org/~jonen/computing/docs/build_bacula_deb.html | 
| 223 | o create 'postinst' and 'prerm' scripts for saving configs on update, etc. | 
| 224 | x tested network backup with Director, Storage Daemon and File Daemon(Client) | 
| 225 | at different hosts, works great! | 
| 226 | x tested backup to FileStorage, instead of using tapes drives | 
| 227 | (if someone would like to sponsor some tape drive, you're more than welcome!) | 
| 228 | notes: | 
| 229 | x remember to use different 'LabelFormat' filename at each pool ! | 
| 230 | x use compression at 'FileSet' definition, where GZIP is equal to GZIP6, means compression-level 6 (1-9) | 
| 231 | example: | 
| 232 | # ====== snip FileSet ============ | 
| 233 | FileSet { | 
| 234 | Name = "Full Set" | 
| 235 | Include = signature=MD5 compression=GZIP { | 
| 236 | /home | 
| 237 | } | 
| 238 | Exclude = { *.o } | 
| 239 | } | 
| 240 | # ====== snip FileSet ============ | 
| 241 |  | 
| 242 |  | 
| 243 | - misc: | 
| 244 | x finding processes using special device(module) and kill them(example for alsa modules): | 
| 245 | :# lsof -t /dev/{audio,dsp,midi,mixer,music,sequencer,sndstat} | xargs kill | 
| 246 |  | 
| 247 | <hr/> | 
| 248 | $Id: notes_2003-02.twingle,v 1.8 2003/04/05 21:24:28 jonen Exp $ |