So here goes, every single step:
I make sata.i, install.1, install.2 and network.dsk disks on this desktop computer, all downloaded from the local linux ftp and up to date.
Reboot server, insert disk, slack starts booting. I don't give any boot options just press enter, also through the two install disks. When I can finally log in as root, I do that and run
I check the partition table with
and since I don't want to change anything, I leave it like that and use
to write the table.
It's as follows:
primary partitions:
hda1- /- 1GB
hda2- extended- 9GB
rest are logical inside hda2
hda5- swap- 512MB
hda6- /usr- 3GB
hda7- /home- 5.5GB
then I start configuring network since I'm going to use NFS install:
enter,enter and it finds eepro100
so
I choose the keyboard layout, format hda5 as swap, hda1 as /, hda6 as /usr and /hda7 as /home
start installing from NFS
all the slackware packages are on this desktop computer, checked to be up to date
I select everything exept KDE related stuff, X window things and games.
Installs...
I use the 2.4.33.3 kernel from bootdisk, configure lilo to boot from /dev/hda1, disable most services exept ssh, CUPS, and some defaults, change root's password and complete the install, I don't remember if there was anything more intresting, I guess not.
So I reboot and take the monitor and keyboard back to my desktop computer. The server now runs only with power, network and printer connections + bluetooth dongle.
I ssh to server from my computer:
first, new kernel.
Code:
root@SERVER:~#wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.7.tar.gz
root@SERVER:~# mkdir /usr/src/tar
root@SERVER:~# mv linux-2.6.20.7.tar.gz /usr/src/tar
root@SERVER:~# cd /usr/src/tar
root@SERVER:/usr/src/tar# tar -xzf linux-2.6.20.7.tar.gz
root@SERVER:/usr/src/tar# mv linux-2.6.20.7 ..
root@SERVER:/usr/src/tar# cd ..
root@SERVER:/usr/src# rm linux
root@SERVER:/usr/src# ln -s linux-2.6.20.7/ linux
root@SERVER:/usr/src# cd linux
I'm using the config from the previous install. I can't codequote it here, cause the message is too long to post then, if needed I'll post it later in two posts.
Code:
make oldconfig
make menuconfig
just to check that it's correct
good to go:
I modify lilo.conf to use old kernel too
Code:
root@SERVER:/usr/src/linux# cat /etc/lilo.conf
# Start LILO global section
boot = /dev/hda
prompt
timeout = 5
vga = normal
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/hda1
label = Slack-2.6.20.7
read-only
# Linux bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz.old
root = /dev/hda1
label = Slack-2.4.33.3
read-only
# Linux bootable partition config ends
Code:
make
make modules_install
make install
I fix all the links and stuff in /boot
Code:
root@SERVER:/boot# ls -l
total 4592
lrwxrwxrwx 1 root root 37 2007-04-21 20:36 README.initrd -> /usr/doc/mkinitrd-1.0.1/README.initrd
lrwxrwxrwx 1 root root 23 2007-04-21 21:23 System.map -> System.map-ide-2.6.20.7
-rw-r--r-- 1 root root 629105 2006-09-01 09:51 System.map-ide-2.4.33.3
-rw-r--r-- 1 root root 764029 2007-04-21 21:20 System.map-ide-2.6.20.7
lrwxrwxrwx 1 root root 23 2007-04-21 21:24 System.old -> System.map-ide-2.4.33.3
-rw-r--r-- 1 root root 512 2007-04-21 21:02 boot.0300
lrwxrwxrwx 1 root root 19 2007-04-21 21:24 config -> config-ide-2.6.20.7
-rw-r--r-- 1 root root 41810 2006-09-01 09:51 config-ide-2.4.33.3
-rw-r--r-- 1 root root 34939 2007-04-21 21:23 config-ide-2.6.20.7
lrwxrwxrwx 1 root root 19 2007-04-21 21:24 config.old -> config-ide-2.4.33.3
-rw-r--r-- 1 root root 5032 2006-08-08 08:34 diag1.img
-rw------- 1 root root 51712 2007-04-21 21:20 map
lrwxrwxrwx 1 root root 20 2007-04-21 21:24 vmlinuz -> vmlinuz-ide-2.6.20.7
-rw-r--r-- 1 root root 1313255 2006-09-01 09:51 vmlinuz-ide-2.4.33.3
-rw-r--r-- 1 root root 1818824 2007-04-21 21:20 vmlinuz-ide-2.6.20.7
lrwxrwxrwx 1 root root 20 2007-04-21 21:24 vmlinuz.old -> vmlinuz-ide-2.4.33.3
and reboot.
Code:
root@SERVER:/boot# reboot
Broadcast message from root (pts/0) (Sat Apr 21 21:28:39 2007):
The system is going down for reboot NOW!
root@SERVER:/boot# Connection to 192.168.1.2 closed by remote host.
Connection to 192.168.1.2 closed.
sander@SANDER:~$ ssh root@192.168.1.2
root@192.168.1.2's password:
Last login: Sat Apr 21 19:08:43 2007 from 192.168.1.3
Linux 2.6.20.7.
root@SERVER:~#
beautiful. So now the not so pretty part, I'll install bluez.
I use lynx to get latest dbus, bluez-utils and bluez-libs from their respective sites. That's dbus-1.0.2, bluez-libs-3.9 and bluez-utils-3.9. Alrighty:
Code:
root@SERVER:~# ls *.tar.gz
bluez-libs-3.9.tar.gz bluez-utils-3.9.tar.gz dbus-1.0.2.tar.gz
root@SERVER:~# mv *.tar.gz /usr/src/tar
root@SERVER:~# cd /usr/src/tar
root@SERVER:/usr/src/tar# tar -xzf dbus-1.0.2.tar.gz
root@SERVER:/usr/src/tar# tar -xzf bluez-libs-3.9.tar.gz
root@SERVER:/usr/src/tar# tar -xzf bluez-utils-3.9.tar.gz
root@SERVER:/usr/src/tar# mv dbus-1.0.2 ..
root@SERVER:/usr/src/tar# mv bluez-libs-3.9 ..
root@SERVER:/usr/src/tar# mv bluez-utils-3.9 ..
root@SERVER:/usr/src/tar# cd ../dbus-1.0.2/
root@SERVER:/usr/src/dbus-1.0.2#
I won't post all the ./configure,make and make install output but what I did was
Code:
./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc
Code:
D-Bus 1.0.2
==============
prefix: /usr
exec_prefix: ${prefix}
libdir: /usr/lib
bindir: /usr/bin
sysconfdir: /etc
localstatedir: /var
datadir: /usr/share
source code location: .
compiler: gcc
cflags: -g -O2 -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wfloat-equal -Wsign-compare -Wdeclaration-after-statement -fno-common -fPIC
cppflags:
cxxflags: -g -O2
64-bit int: long long
32-bit int: int
16-bit int: short
Doxygen: /usr/bin/doxygen
xmlto: no
Maintainer mode: no
gcc coverage profiling: no
Building unit tests: no
Building verbose mode: no
Building assertions: no
Building checks: yes
Building SELinux support: no
Building dnotify support: yes
Building X11 code: no
Building Doxygen docs: yes
Building XML docs: no
Gettext libs (empty OK):
Using XML parser: expat
Init scripts style: slackware
Abstract socket names: yes
System bus socket: /var/run/dbus/system_bus_socket
System bus address: unix:path=/var/run/dbus/system_bus_socket
System bus PID file: /var/run/dbus/pid
Session bus socket dir: /tmp
Console auth dir: /var/run/console/
Console owner file: no
Console owner file path:
System bus user: messagebus
Session bus services dir: /usr/share/dbus-1/services
'make check' socket dir: /tmp
make
make install
ldconfig
next, bluez libraries:
Code:
root@SERVER:/usr/src/dbus-1.0.2# cd ../bluez-libs-3.9/
./configure --prefix=/usr
make
make install
ldconfig
and finally
Code:
root@SERVER:/usr/src/bluez-libs-3.9# cd ../bluez-utils-3.9/
./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var --libexecdir=/lib
make
make install
ldconfig
updatedb
Done, let's get to it:
I configure hcid.conf like this:
Code:
root@SERVER:/etc/bluetooth# cat /etc/bluetooth/hcid.conf
#
# HCI daemon configuration file.
#
# HCId options
options {
# Automatically initialize new devices
autoinit yes;
# Security Manager mode
# none - Security manager disabled
# auto - Use local PIN for incoming connections
# user - Always ask user for a PIN
#
security auto;
# Pairing mode
# none - Pairing disabled
# multi - Allow pairing with already paired devices
# once - Pair once and deny successive attempts
pairing multi;
# Default PIN code for incoming connections
passkey "2486";
}
# Default settings for HCI devices
device {
# Local device name
# %d - device id
# %h - host name
name "SERVER";
# Local device class
class 0x3e0100;
# Default packet type
#pkt_type DH1,DM1,HV1;
# Inquiry and Page scan
iscan enable; pscan enable;
# Default link mode
# none - no specific policy
# accept - always accept incoming connections
# master - become master on incoming connections,
# deny role switch on outgoing connections
lm accept;
# Default link policy
# none - no specific policy
# rswitch - allow role switch
# hold - allow hold mode
# sniff - allow sniff mode
# park - allow park mode
lp rswitch,hold,sniff,park;
}
I'm really not sure of this step but I create a "messagebus" user for dbus with adduser
enter to everything else
I also give all rights of /var/run/dbus to it
Code:
root@SERVER:~# chown messagebus:users /var/run/dbus
root@SERVER:~# chmod u+rwx /var/run/dbus
No idea if that's even used.
so let's bring up the dongle
Code:
root@SERVER:~# hciconfig hci0 up
root@SERVER:~# hciconfig
hci0: Type: USB
BD Address: 00:02:72:02:27:63 ACL MTU: 1017:8 SCO MTU: 64:0
UP RUNNING
RX bytes:79 acl:0 sco:0 events:8 errors:0
TX bytes:30 acl:0 sco:0 commands:8 errors:0
All the extra stuff isn't enabled for some reason so:
Code:
root@SERVER:~# hciconfig hci0 piscan auth secmgr encrypt
root@SERVER:~# hciconfig
hci0: Type: USB
BD Address: 00:02:72:02:27:63 ACL MTU: 1017:8 SCO MTU: 64:0
UP RUNNING PSCAN ISCAN AUTH ENCRYPT SECMGR
RX bytes:97 acl:0 sco:0 events:11 errors:0
TX bytes:42 acl:0 sco:0 commands:11 errors:0
Looks better.
I use my cell now to look for available bluetooth devices. It finds BCM2045. Ah right, forgot to restart hcid:
Code:
hcid -f /etc/bluetooth/hcid.conf
Checking again with the cell. Still the same name. Oh yeah, I had to start dbus and stuff before. For checking I run:
Code:
root@SERVER:~# hcid -nsd
hcid[6314]: Bluetooth HCI daemon
hcid[6314]: Enabling debug information
hcid[6314]: Can't connect to system message bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
hcid[6314]: Unable to get on D-Bus
Yeah, that's it.
Code:
root@SERVER:~# /etc/rc.d/rc.messagebus start
Starting system message bus
root@SERVER:~# hcid -nsd
hcid[6320]: Bluetooth HCI daemon
hcid[6320]: Enabling debug information
hcid[6320]: HCI dev 0 registered
hcid[6320]: HCI dev 0 already up
hcid[6320]: Device hci0 has been added
hcid[6320]: Starting security manager 0
hcid[6320]: Device hci0 has been activated
hcid[6320]: Starting SDP server
hcid[6320]: Adding rec : 0x807e9e0
hcid[6320]: with handle : 0x1
hcid[6320]: Adding rec : 0x807ec68
hcid[6320]: with handle : 0x0
Way better. I repeat the
Code:
hcid -f /etc/bluetooth/hcid.conf
Third time is the charm, retrying with the cell. Oh great, now it doesn't find anything. Something's messed up.
Code:
root@SERVER:~# hcitool scan
Scanning ...
00:16:B8:23:A8:51 W810i
hmm.
Code:
root@SERVER:~# hciconfig hci0 down
root@SERVER:~# hciconfig
hci0: Type: USB
BD Address: 00:02:72:02:27:63 ACL MTU: 1017:8 SCO MTU: 64:0
DOWN
RX bytes:1149 acl:0 sco:0 events:42 errors:0
TX bytes:640 acl:0 sco:0 commands:32 errors:0
root@SERVER:~# hciconfig hci0 up
root@SERVER:~# hciconfig
hci0: Type: USB
BD Address: 00:02:72:02:27:63 ACL MTU: 1017:8 SCO MTU: 64:0
UP RUNNING PSCAN
RX bytes:1547 acl:0 sco:0 events:59 errors:0
TX bytes:957 acl:0 sco:0 commands:49 errors:0
root@SERVER:~# hciconfig hci0 piscan secmgr auth encrypt
root@SERVER:~# hciconfig
hci0: Type: USB
BD Address: 00:02:72:02:27:63 ACL MTU: 1017:8 SCO MTU: 64:0
UP RUNNING PSCAN ISCAN AUTH ENCRYPT SECMGR
RX bytes:1572 acl:0 sco:0 events:63 errors:0
TX bytes:972 acl:0 sco:0 commands:53 errors:0
Fourth time with the cell and it finds SERVER. Delicious.
Just for kicks I try to pair from cell once. The cell waits for about half a minute and asks to enter the pin. I enter 2486 as in hcid.conf, cell waits for another half a minute and reports pairing failed. Sounds familiar.
So what's next, let's mess with passkey agent a little.
Code:
root@SERVER:~# slocate passkey
/usr/src/bluez-utils-3.9/daemon/passkey-agent.c
/usr/src/bluez-utils-3.9/daemon/.deps/passkey-agent.Po
/usr/src/bluez-utils-3.9/daemon/passkey-agent.o
/usr/src/bluez-utils-3.9/daemon/passkey-agent
root@SERVER:~# cd /usr/src/bluez-utils-3.9/daemon/
so first
Code:
root@SERVER:/usr/src/bluez-utils-3.9/daemon# /usr/src/bluez-utils-3.9/daemon/passkey-agent --default 2486
Weird, it just stays running. That didn't happen before. Anyway now the cell can't find PC anymore.
Code:
root@SERVER:/usr/src/bluez-utils-3.9/daemon# hciconfig hci0 down;hciconfig hci0 up piscan auth encrypt secmgr
root@SERVER:/usr/src/bluez-utils-3.9/daemon# hciconfig
hci0: Type: USB
BD Address: 00:02:72:02:27:63 ACL MTU: 1017:8 SCO MTU: 64:0
UP RUNNING PSCAN AUTH ENCRYPT SECMGR
RX bytes:2100 acl:0 sco:0 events:96 errors:0
TX bytes:1334 acl:0 sco:0 commands:79 errors:0
Didn't fix it, now I'm worried.
Code:
root@SERVER:/usr/src/bluez-utils-3.9/daemon# hcid -nsd
hcid[6372]: Bluetooth HCI daemon
hcid[6372]: Enabling debug information
hcid[6372]: Could not become the primary owner of org.bluez
hcid[6372]: Unable to get on D-Bus
Hmm, is it because it's already using dbus or is something wrong with it.
Code:
root@SERVER:/usr/src/bluez-utils-3.9/daemon# /etc/rc.d/rc.messagebus restart
Stopping system message bus
Starting system message bus
Failed to start message bus: The pid file "/var/run/dbus/pid" exists, if the message bus is not running, remove this file
Yah, forgot
Wait it isn't there. It had to delete it itself somehow, whatever.
Code:
root@SERVER:/usr/src/bluez-utils-3.9/daemon# /etc/rc.d/rc.messagebus restart
Stopping system message bus
dbus-daemon: no process killed
Starting system message bus
And only after
Code:
root@SERVER:/usr/src/bluez-utils-3.9/daemon# hcid -nsdf /etc/bluetooth/hcid.conf
hcid[6394]: Bluetooth HCI daemon
hcid[6394]: Enabling debug information
hcid[6394]: HCI dev 0 registered
hcid[6394]: HCI dev 0 already up
hcid[6394]: Device hci0 has been added
hcid[6394]: Starting security manager 0
hcid[6394]: Device hci0 has been activated
hcid[6394]: Starting SDP server
hcid[6394]: Adding rec : 0x807a290
hcid[6394]: with handle : 0x1
hcid[6394]: Adding rec : 0x807ec60
hcid[6394]: with handle : 0x0
hcid[6394]: Stopping SDP server
hcid[6394]: release_services
hcid[6394]: Unregister path: /org/bluez/hci0
hcid[6394]: Unregister path: /org/bluez
hcid[6394]: Exit
root@SERVER:/usr/src/bluez-utils-3.9/daemon# hciconfig hci0 down;hciconfig hci0 up piscan auth encrypt secmgr
the cell can see the pc again.
Whew, that was fun, why not try that again:
Code:
root@SERVER:/usr/src/bluez-utils-3.9/daemon# /usr/src/bluez-utils-3.9/daemon/passkey-agent --default 2486
Can't register passkey agent
The name org.bluez was not provided by any .service files
Hmm, that I remember. Wonder what made it remain working the previous time.
Code:
root@SERVER:/usr/src/bluez-utils-3.9/daemon# /usr/src/bluez-utils-3.9/daemon/bluetoothd --debug --nodaemon
bluetoothd[6408]: Bluetooth daemon ver 3.9
bluetoothd[6408]: Enabling debug information
bluetoothd[6408]: Could not become the primary owner of org.bluez
And that I remember too.
Code:
root@SERVER:/usr/src/bluez-utils-3.9/daemon# /usr/src/bluez-utils-3.9/daemon/passkey-agent --default 2486
Can't register passkey agent
Method "RegisterDefaultPasskeyAgent" with signature "s" on interface "org.bluez.Security" doesn't exist
Been there, haven't got out yet.
I lurk around the system for some time and find
Code:
root@SERVER:~# cat /etc/dbus-1/system.d/bluetooth.conf
<!-- This configuration file specifies the required security policies
for Bluetooth core service to work. -->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- ../system.conf have denied everything, so we just punch some holes -->
<policy user="root">
<allow own="org.bluez"/>
</policy>
<policy at_console="true">
<allow send_destination="org.bluez.Manager"/>
<allow receive_sender="org.bluez.Manager"/>
<allow send_path="/org/bluez"/>
<allow send_destination="org.bluez.Adapter"/>
<allow receive_sender="org.bluez.Adapter"/>
<allow send_destination="org.bluez.Service"/>
<allow receive_sender="org.bluez.Service"/>
<allow send_destination="org.bluez.Database"/>
<allow receive_sender="org.bluez.Database"/>
<allow send_destination="org.bluez.Security"/>
<allow receive_sender="org.bluez.Security"/>
</policy>
</busconfig>
It has cool words like org.bluez and security in it, other then that I have no idea how it works. By now I'm also having serious trouble keeping my eyes open and I'm out of coffee. To be continued tomorrow...