Tag Archives: IBM

Using WPA on OpenBSD (2008)

The missing WPA support was something many users where missing on OpenBSD. I now tell some practical steps on how to connect to a WPA encrypted wireless network with OpenBSD. Again – and as often OpenBSD makes it simpler than other OSes. Firstly – during install OpenBSD gives the opportunity to configure networks. I had my Thinkpad R52 not connected to any network while installing. As the internal Intel chip did never work with WPA on my Ubuntu I had a Ralink card inserted. OpenBSD also had some problems, claiming it can not find the firmware. I have not even looked what this means – because I first wanted internet and the Ralink looked much more promising. So Ralink … this is the ral driver. The manual can be found on OpenBSD with ‘man ral’ – on the web: RAL(4). The essential example is here:

Configure ral0 to join network “my_net” using WPA-PSK with passphrase
“my_passphrase”:
# ifconfig ral0 nwid my_net wpa wpapsk \
$(wpa-psk my_net my_passphrase)

Anyway. I am not here to copy the manual. What they write there is not wrong – but does not give you any network on a new boot. So the first ral card is called “ral0”. The setup did create a file: “/etc/hostname.ral0”. Here is how its contents looked: “dhcp NONE NONE NONE” – Where do you find more? In hostname.if(5). There you will get the information that you can add “options” behind the dhcp. Those options are the same as the command ifconfig gives.

Back to the example above, what does this do? “$(wpa-psk my_net my_passphrase)” executes the command “wpa-psk” – with the options: 1. SSID and 2. the passphrase. It is able to generate a wpa pre-shared key. You can generate one and COPY that. You can then paste that into the ral0 config file. So a like could look like this:

dhcp nwid <your-network> wpa wpapsk <your-key>

Thats about all you need. And now how you connect to your Router? Nothing simpler. Read about netstart(8). This is actually a non-executable script. You can start your ral0 with “sh /etc/netstart ral0”. And this should be sufficient to get it on every time you boot. A successful connected wpa wireless then will look like this:

$ ifconfig ral0

ral0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:80:5a:39:f5:e1
groups: wlan egress
media: IEEE802.11 autoselect (OFDM54 mode 11g)
status: active
ieee80211: nwid <your network> chan 9 bssid 00:1c:10:c1:ab:40 120dB wpapsk <not displayed> wpaprotos wpa1,wpa2 wpaakms psk,802.1x wpaciphers tkip,ccmp wpagroupcipher tkip 100dBm
inet6 fe80::280:5aff:fe39:f5e1%ral0 prefixlen 64 scopeid 0x5
inet 192.168.200.102 netmask 0xffffff00 broadcast 192.168.200.255

Was that complicated? I would say no. The only think I have not tried is how to best set up multiple networks. Something that works more or less on Linux with the NetworkManager. But it does not work good on my Ubuntu box. I really think that OpenBSD has shown how elegant one can do things. This is now without multiple commands – essentially it is just ifconfig. And why shouldn’t ifconfig be able to do more. Why should we need to have iwconfig, iwpriv,… ?

Linux has tried hard to make some things usable – but on the way to accomplish that Linux developers often throw away old tools and constantly reinvent the wheel. Still maybe it is simple to quickly install an Ubuntu box – but for those who know about Unix and can handle the tools you need to remember less and can do some things MUCH easier. OpenBSD has taken its time to get WPA support – much later than Linux. But now its working. Hope this posting helps some posters to get it done.

As this is an important task I state explicitly that the whole text that I wrote is public domain, so you can reuse it wherever you like.

4 Comments

Filed under Browser, Free Software, OpenBSD, Technology

OpenBSD also on Notebook as Dual Boot

I had left some part of the hard disk free to try installing OpenBSD on my IBM Thinkpad R52 later. The later is now. I had some respect for trying the dual boot as last time I tried it was a mess. I now have working OpenBSD on sixth partition. That means if you read this I can confirm you can boot OpenBSD starts also from an extended partition. So my layout seen from Linux was a sda1(Ubuntu /boot)-sda5(Ubuntu SWAP). sda4 was the extended partition. I now did this:

  1. Add a sixth and seventh partition from Ubuntu (/dev/sda6) – sda7 is OpenBSD SWAP.
  2. Mark the sda6 as partition type “a6” for OpenBSD.
  3. Download a fresh OpenBSD install CD from snapshots.
  4. Start (I)nstalling but do not use the whole disk.
  5. OpenBSD thinks the partition name should be wd0a.
  6. Ok, go through the setup steps – I very much use all file sets as I think installing them later would be more troublesome. OpenBSD already is small (228 MB install CD)
  7. When all is finished you can reboot. I do not tell you how to install OpenBSD – read the FAQ – its good – also INSTALL.linux – but dont take that as a bible. Actually you should understand at least some of the stuff – sure you cant understand the whole FAQ. My suggesttion with starting with OpenBSD is to play with it – read the FAQ and repeat steps – if you come from Linux do not hurry. Take your time. Give yourself a break!
  8. Next step is the ‘evil’ GRUB. In the INSTALL.linux you will find an example which contains a line “makeactive”. Actuall you do neither need that – it will also break the boot process. As the GRUB docs state: “This command is limited to primary PC partitions on a hard disk.” – This means that does not work for extended partitions where I have my OpenBSD on. If you use Ubuntu there is a passage where Ubuntu autoupdates Linux kernels. I suggest adding the OpenBSD at the very much bottom below
    I had left some part of the hard disk free to try installing OpenBSD on my IBM Thinkpad R52 later. The later is now. I had some respect for trying the dual boot as last time I tried it was a mess. I now have working OpenBSD on sixth partition. That means if you read this I can confirm you can boot OpenBSD starts also from an extended partition. So my layout seen from Linux was a sda1(Ubuntu /boot)-sda5(Ubuntu SWAP). sda4 was the extended partition. I now did this:
  9. Add a sixth and seventh partition from Ubuntu (/dev/sda6) – sda7 is OpenBSD SWAP.
  10. Mark the sda6 as partition type “a6” for OpenBSD.
  11. Download a fresh OpenBSD install CD from snapshots.
  12. Start (I)nstalling but do not use the whole disk.
  13. OpenBSD thinks the partition name should be wd0a.
  14. Ok, go through the setup steps – I very much use all file sets as I think installing them later would be more troublesome. OpenBSD already is small (228 MB install CD)
  15. When all is finished you can reboot. I do not tell you how to install OpenBSD – read the FAQ – its good – also INSTALL.linux – but dont take that as a bible. Actually you should understand at least some of the stuff – sure you cant understand the whole FAQ. My suggesttion with starting with OpenBSD is to play with it – read the FAQ and repeat steps – if you come from Linux do not hurry. Take your time. Give yourself a break!
  16. Next step is the ‘evil’ GRUB. In the INSTALL.linux you will find an example which contains a line “makeactive”. Actuall you do neither need that – it will also break the boot process. As the GRUB docs state: “This command is limited to primary PC partitions on a hard disk.” – This means that does not work for extended partitions where I have my OpenBSD on. If you use Ubuntu there is a passage in ‘menu.lst’ where Ubuntu autoupdates Linux kernels. I suggest adding the OpenBSD at the very much bottom below:
    ### END DEBIAN AUTOMAGIC KERNELS LIST.
    And put something like this there. AGAIN: Think before you just copy and paste. If your setup is different it will not work:
    title OpenBSD
    root (hd0,5,a)
    chainloader +1

That should be it. I guess Debian should work exactly the same. Personally I think those autoupdating of menu.lst is stupid. You can imagine how delighted i was as I realised that the “makeactive” was actually the problem. I tried nearly everything before finding that all. And now I share. Not that OpenBSD is good for dual boot – but maybe many of you like me like to have a Linux as a backup system while we are progressing in how we can use OpenBSD.

As this post is already a little long I will talk about the new OpenBSD WPA wireless on my next post.

2 Comments

Filed under Free Software, Linux, OpenBSD, Technology