Quick Overview of Bsd Systems With Main Focus on Openbsd

view full story

http://linux.bihlman.com – Quick Overview of Bsd Systems With Main Focus on Openbsd By Juraj Sipos Most users who use Linux use it because they hate Microsoft; people who use BSD use it because they love Unix History To say it metaphorically, the Internet sprung out of BSD. It is not because these systems can handle the biggest traffic as servers, but because the concept of IP addresses and the TCP/IP stack is a BSD invention. If you right click on the file “winsock.dll” in Windows 98 (C:Windowswinsock.dll), you will see “BSD Socket API for Windows” in the Properties > Version window; however, the “BSD” is not seen in newer Windows systems in the “version information” window of winsock.dll. But there is a lot of writing on the Internet about this if you Google both terms: “winsock.dll” AND “bsd”. BSD systems have a different licensing policy and anybody can take their code. BSD license gives more freedom to programmers. From the above it is clear that Microsoft, too, used or “stole” this code, not only Linux. BSD grew up in the 1970’s with a Defense Advanced Research Projects Agency (DARPA) support. Version 4.3 BSD (1986), 4.3 BSD Tahoe (1988), BSD Net 1 (1989), and so on followed. The history is well described also on BSD sites. FreeBSD, for example, started as a project in 1993 shortly after NetBSD; and OpenBSD is a fork of NetBSD, but these all are derived from 386/BSD. Linux versus BSD BSD: BSD systems are based upon an actual Unix variant called Berkeley Software Distribution, which has a long history. Linux: Linux is based upon a clone of Unix (Minix), which was far away in functionality in comparison to the above Unix at its time. Terminologically speaking, Linux is only the kernel. The “Linux-versus-BSD” discussion is very sensitive for some people – they may get very angry about any direction, either in favor of BSD or Linux. It is not a good idea to compare these systems as the whole, but it’s not a bad idea to compare their “usability” in various aspects, for example, as an “office solution”, “desktop solution”, “multimedia solution”, “server solution”, “firewall solution”, etc. The widespread use of Linux helped some users switch to BSD for good, as various opinions made the issue of “Linux-versus-BSD” visible to public eyes, which made the BSD world appear more attractive. If we talk in general, we can say that “BSD is much more stable, as it is a REAL Unix” and that “Linux is a very good desktop toy more adapted to users’ needs, as it has more drivers and apps”. Other global aspect that makes Linux and BSD systems look different is that BSD OS’s have everything under one hood and control. Linux is murky waters because it is not united. For example, you have a DEB (Debian Linux) package – you will not always install it if you use Mandrake or SuSE. A long list of problems ensuing from discrepancies among Linux distros may be written. Linux users surely remember the effort of UnitedLinux, but now it is devoid of life. In the chaos where one Linux system installs with various services and the other one does not, we see that the Linux community is broken as the whole. Linux is more developed in terms of its accessibility to various types of hardware like, for example, inkjet printers or WiFi USB solutions. But this is because, as I already said, various companies support it. Linux is good for desktop users who want to forget about Microsoft and BSD systems are best as server/router/firewall solutions. Many good administrators say that Linux behaves much worse as server than BSD systems. Something like Red Hat or SuSE Enterprise Server is rather a joke – these systems cost a lot of money. Every good administrator would only bet on BSD or other Internet solutions today. Slackware Linux is exception – it is one of the best. There are many reasons why BSD systems are less noticeable. The availability of Live CD’s and their easy-to-use presentation is something in which BSD systems lagged behind. You may download Linux ISO images at the drop of a hat. With BSD systems, this is a bit different. You could hardly find a desired BSD Live CD in the 1990’s. Only a few of them do appear now. OpenBSD I tackled the problem of building such a CD myself. I toiled with FreeBSD. I succeeded. Later I focused on OpenBSD, as it has a good reputation concerning its solid security structure. I succeeded too. But this would require additional writing and this article is not about making an OpenBSD Live CD; I only want to introduce this system a little and give advice how to make a simple OpenBSD bootable installation CD/DVD, which is also hard to get. Usability BSD systems work well with all kinds of standard hardware; however, some users say they are “less user-friendly”. On the other hand, others consider the so-called “user-friendliness” to be a hindrance in making needed configurations. In other systems, where many services run automatically, it is a bit irritating when administrators, with their own security policies in mind, must turn them off on a regular basis after every installation. OpenBSD could be, from a Linux user’s point of view, a can of worms. Some may disagree with me, but in the world where all mainstream operating systems bet on easiness-to-use and the graphical interactivity, this is surely the case. This means you must forget about graphical installers – your first touch with the system is the text mode. But the text is the best format some people like. OpenBSD can run Linux binaries on an emulation layer; DOS (and other systems) programs within the Qemu emulator, as well as FreeBSD and other BSD and Unix binaries. Albeit OpenOffice.org has not been ported yet (do you really need such a big bulk of software when there are more handy solutions?), you can easily write or open your MS Word documents in TextMaker for Linux, or in native OpenBSD AbiWord port. The system and packages The BSD family of operating systems consists of the base system and packages. The OpenBSD core – its kernel and the base system (system/network utilities, man pages, etc.) get cautiously, if not paranoically audited for security holes. The OS has a different packaging philosophy in comparison to Linux. It uses ports and prebuilt packages. Ports are fingerprints of applications on your disk. They contain the basic information where they can be downloaded from. You just “cd” somewhere to the hierarchy of the /usr/share/ports directory, where applications are divided by categories; then type “make install” and wait for sources to be downloaded, compiled, and installed. Prebuilt packages, too, can be installed with a breeze. Unlike RPM archives, which you must install in the consecutive dependency order, here you have everything on tap. And with the command pkg_add -v ftp address and the package name you download everything from the Internet even without specifying the package’s version. This is something most Linux packagers cannot do, only APT (Debian) and its clones. Installation The policy of the OpenBSD team is to sell CD’s. Unless you are prepared for a difficult network install, you have two options: either you buy their CD’s, or build them yourself. If you choose the latter option, download the core system from these FTP mirrors: http://www.openbsd.org/ftp.html. Pick out your architecture like AMD64 or i386 and the version (like 4.0, 3.9, etc.). Place all downloaded files in any directory (for example, in /usr/opbsd) and issue the following command to make the ISO image of it: mkisofs -b cdrom40.fs -c boot.cat -R -v -o /usr/my_openbsd.iso /usr/opbsd The above command may be used both in Linux and in BSD systems and possibly in any system to which mkisofs is ported. When ever in the future you are ready to download a newer version of OpenBSD with purpose to make a bootable CD/DVD of it, just change the “cdrom40.fs” in the above mkisofs command (4.0 is the current version of OpenBSD) to the version it agrees with, for example, “cdrom45.fs” (a future OpenBSD), which is a bootable image as the emulated big floppy. A CD or DVD burned with this ISO file will boot on any PC (not DVD in UDF format, but DVD in ISO format). The following files contain the basic OpenBSD installation – networking, Unix commands, X Window, man pages; not packages like KDE, Aspell, etc. OpenBSD 4.0 core systemPackages # you can create this directory and put packages in itCKSUM, INSTALL.i386, INSTALL.Linux, MD5, base40.tgz, bsd, bsd.mp, bsd.rd, cd40.iso, cdboot,cdbr, cdemu40.iso, cdrom40.fs, comp40.tgz, etc40.tgz, floppy40.fs, floppyB40.fs, floppyC40.fs, game40.tgz, index.txt, man40.tgz, misc40.tgz, pxeboot, xbase40.tgz, xetc40.tgz, xfont40.tgz, xserv40.tgz, xshare40.tgz It is important to say that the ISO file cannot be burned to a CD as an ordinary file like an MP3 file – it can be done this way, however, but you will not be able to boot from such a CD/DVD. If you use Windows, the proper way for burning ISO files is to use the “burn image” command in programs like Nero Burning ROM (or “burn ISO” in other programs). Under FreeBSD, you can burn the ISO image with the burncd command (if your CDROM is the master on the second IDE channel; “-s” is for speed): burncd -f /dev/acd0 -s 4 data my_openbsd.iso fixate It would be a good idea to make the bootable OpenBSD DVD with packages included in it – just download them and put them to a directory (for example, to a directory “Packages”) where you have your core OpenBSD installation files; then apply the above mkisofs command. Installation is quite easy. For newbies it is recommended to use a mobile rack and use some older disk (about 3 GB). This is because installing OpenBSD to an already partitioned disk requires a lot of knowledge and if users do not want to bother about numbers of sectors/cylinders and other things they must type in the text wizard, this solution is very handy. OpenBSD in action The system boots fast (much faster than Linux). If you selected the X Window environment during the installation text wizard, you only need to run the “xorgcfg” command from the console to configure your X Window environment. Did you lose yourself somewhere in the text-mode consoles? Use the F5 key (Ctrl+Alt+F5) to get back to the X Window. Are you a complete newbie? Type “man afterboot”. Are you accustomed to Linux and do you prefer a Linux terminal type? After every logon, OpenBSD asks you to type the terminal type you want to use, but the default one – vt220 – does not map keys like you got accustomed to in Linux if you use programs like Midnight Commander (for example, F7 behaves like F6, etc., but not in X). After typing “nxterm” everything should work OK. A manual text-mode configuration is the absolute preference here. Almost all services are turned off – a first choice for every good administrator, as he will have ultimate control over the whole system. Users, too, may familiarize themselves with Unix and see what is going on under its hood. To run the X Window, just execute the “startx” command. If you want to edit or re-edit the configuration files, peep into the /etc directory with vi as your editor. Do you want to add more packages? Just download them and issue “pkg_add -i package.tgz” command and that’s it! OpenBSD 4.0 is geared up for most of the network or desktop tasks. After I downloaded some fine MP3 players, I could instantly listen to music. The X Window’s look does not differ from any Unix-like box. VLC or MPlayer multimedia players will help you enjoy all your favorite music or film recordings. If you have euphoria from seeing the KDE or Gnome Desktop and other apps running smoothly, you may soon become disappointed – OpenBSD has fewer packages than FreeBSD or Linux. For example, running VMware on FreeBSD has been possible for quite a long time; OpenBSD (but not OpenBSD in the VMware environment) requires some smart tweaks to achieve this. New technologies and automation can also impose a risk Numerous companies want to earn the highest profit and they introduce various technologies that serve as a marketing competition strategy for most of the time and are often useless. A bluetooth or WiFi technology in your mobile phone brings a security risk when any good hacker can get to your most sensitive data within seconds right from your neighborhood. Most users do not have time to study various security datasheets and they often live happy without knowing they are unprotected. I do not want to say that newer technologies are always nonsensical; however, they deserve pertinent praise only if used on the right place. If a reader understands this, the mainstream world’s policy is to create the Matrix or a big web of dependencies – if hardware can run in Linux, users use Linux (and possibly buy Red Hat or Xandros). Numerous “terrific” companies that sell their “amazing security products” forget that using carrier pigeons for communication is by far a more secure solution than any computer communication – an encrypted e-mail, if you are already under suspicion, will always get intercepted, and governments have always enough resources and money to do their job well. Why BSD or OpenBSD? Today, when too many companies bring out various distros, it is hard to tell which of them best suits our needs and you may become mixed-up in such a huge list. If companies invest money to a software solution, they may become disappointed if its licensing policy changes. OpenBSD has one sturdy feature above everything – the system and packages are perfectly audited for security holes. The power of a good policy will make you feel somewhat sheltered from the bad behavior of the world, because you do not have to worry that network services, for example, contain security holes. Something like this often happens with Linux – its websites urge users to download important patches soon after distros are released. With this particular security point OpenBSD as a BSD system stands aside from the usual crowd. Source: My website and my esoteric karma/ (General)