Archive for October, 2006

short answer is, “It depends on the system.”

Monday, October 30th, 2006

years from now. The /home partition can easily be the last on your disk; it doesn’t need to be fast. It also doesn’t need to be large; the only files on the drive will be the ones that you need. No te If yo u’v e be en ad din g thi s up, yo u sh oul d not ice tha t it’s ent irel y po ssi ble to hav e a co mp let e Op en BS D sy ste m (wit ho ut the X Wi nd ow Sy ste m) in les Page 48

Hint: This post is supported by Gama web hosting hrvatska services

short answer is, “It depends on the system.”

Monday, October 30th, 2006

short answer is, “It depends on the system.” General wisdom says that you should have at least twice as much swap as you have physical memory. This isn’t a bad rule, so long as you understand that it’s very general. More won’t hurt. Less might, if your system runs out of RAM. If you find that you need more swap space, you should probably buy more memory instead. If that’s not an option, you can use a regular file as a swap file. Still, if you have a reasonable amount of disk space, simply assigning an amount of swap equal to twice the amount of RAM you have is sensible. You should also consider possible future upgrades. If a computer has 500MB of RAM today, but you plan to upgrade it to 3GB of RAM in a couple of months, perhaps assigning 6GB of disk space to swap is a good idea. After all, if you can afford three gigs of RAM and you have the hardware to manage it, certainly that much disk is not an issue! Swap Splitting If you have multiple disks, you can vastly improve the efficiency of your swap space by splitting it among multiple drives. Put the first swap partition on the second-outermost ring of the drive with your root partition, and other swap space on the outermost edge of their drives. This splits reads and writes among multiple disk controllers. For swap splitting to work best, however, the drives must be SCSI. If you have IDE drives, the drives need to be on different IDE controllers. Remember, each IDE controller splits its total data throughput among all the connected hard drives. If you have two hard drives on the same IDE controller and you’re accessing both drives simultaneously, each disk will average half as fast as it would if you were running it alone. The major bottleneck in using swap space is data throughput speed, and you won’t gain speed by creating contention on your IDE bus. /tmp The /tmp directory is system-wide temporary space. If you do not create a separate /tmp partition, it will be included on your root partition. This means that your system-wide temporary space will be subject to the same conditions as the rest of your root drive. This probably isn’t what you want, especially if you plan to mount your root partition read-only! Requirements for a /tmp directory are generally a matter of opinion after all, you can always just use a chunk of space in your home directory as temporary space. On a modern hard drive, I like to have at least 500MB in a /tmp directory. Automated software installers frequently want to extract files in /tmp, and having to work around these installers when /tmp fills up is possible but tedious. /var The /var partition contains frequently changing logs, mail spools, temporary run files, the default website, and so on. If your server is a Web server, your website logs will go to this partition, and you may need to make it 1GB or more. On a small “generic Internet mail/Web server,” I’ll frequently give /var 20 percent of my remaining disk space. If the server handles only email or databases, I’ll kick this up to 70 percent or more, or just assign a space to the remaining partitions and throw everything else I have on /var. If you’re really cramped for space, you might assign as little as 30MB to /var. (Again, actual minimum requirements vary depending on your version of OpenBSD.) /usr The /usr partition holds the operating system programs, system source code, compilers and libraries, and other little details like that. Much of this changes only when you upgrade your system. On a modern hard drive, I recommend using about 6GB on your /usr partition. This should be more than sufficient for all the contents of /usr and just about any add-on packages you might desire, and should also leave room for any OpenBSD source you might want to install. Without the X Window System, you could make /usr as small as 200MB. If you need X, you should assign /usr at least 350MB. /home The /home partition is where users keep their files. If you have more disk space than is good for you, assign it here. Your home directory will quickly fill up with all sorts of stuff that you’ll be tripping across Page 47

Hint: This post is supported by Gama web hosting hrvatska services

Partitioning The most difficult part of installing OpenBSD

Monday, October 30th, 2006

Standalone OpenBSD Partitioning If you’re installing a dedicated OpenBSD machine, you don’t have to worry about sharing the hard drive with another operating system. This simplifies the partitioning process you only have to worry about OpenBSD’s requirements. The main partitions you’ll need to consider are / (root), swap space, /tmp, /var, /usr, and /home. If you forget to create any of these partitions, the installer will put the files that should go in the partitions into your root partition. This will quickly fill up your root partition! Root The root partition holds the main system configuration files and the most essential UNIX utilities needed to get a computer into single-user mode. Your system should have fast access to its root file system, so put it first on the disk. Because it holds only these basic utilities and configuration files it doesn’t need to be large; on a modern hard drive, I find a 500MB root partition comfortably roomy. I would recommend no smaller than 50MB for a root partition. (You could scrape by with a few megabytes smaller; the exact minimum size varies with the version of OpenBSD.) If you’re familiar with other some other UNIX-like operating systems, such as some distributions of Linux, you might be used to simply using a single large root partition and putting everything on it. This is a bad idea for a variety of reasons. With a partition safely constraining your log files, a process or user gone amok cannot fill your entire drive; while it could fill a partition, you would still be able to create and edit files on other partitions, giving you the flexibility you need to address the actual problem. Also, with a single partition, you cannot control where files are put on the disk. This hurts performance. Damage to the disk is probably spread across many different files in unrelated parts of the system, which means that your chances of recovering from a damaged disk or file system problems drop dramatically. Root Limitations Over the years, i386 systems have been expanded time and time again to surpass their own limits. They’re based upon an architecture that could originally handle a maximum of 640KB of RAM, after all! The OpenBSD kernel indeed, all modern operating system kernels work around these limits in a manner mostly transparent to the user, but when the system is first booting you’re trapped with the BIOS limitations. Many old i386 systems have a 504MB limit on hard drives, on which the BIOS cannot get at anything beyond the first 504MB of data on a disk. If your BIOS cannot find your operating system kernel in that first 504MB, it cannot boot the system. Check your hardware manual; if it makes any references to a 504MB limit, this affects you. You absolutely must place your entire root partition within the first 504MB of disk. Additionally, for some time i386 systems had a similar (not identical) 8GB limit. OpenBSD still obeys that 8GB limit. Even if your system is not susceptible to the 504MB limit, your entire root partition must be completely contained within the first 8GB of disk. Of course, if you follow my advice and make your root partition 500MB you will never have to worry about either of these restrictions and the potential damage that they can inflict. If you break these rules, your system will probably appear to work. The second you upgrade your system, or move the file /bsd, the computer will quite probably refuse to boot. Save yourself much pain; make the root partition 500MB, and the first partition on the disk, and this problem will never affect you. Swap Space The next partition on your drive should be swap space, the disk space used by virtual memory. When your computer fills its physical memory, it will start to move information that has been sitting idle in memory into swap. If things go well, your system will almost never need swap space, but if you do need it, it needs to be fast. So, how much swap space do you need? This is a matter of long debates between sysadmins. The Page 46
Note: If you are looking for reliable and quality webspace company to host and run your servlet application check Actions servlet hosting services

Partitioning The most difficult part of installing OpenBSD

Monday, October 30th, 2006

Partitioning The most difficult part of installing OpenBSD is deciding how to partition your hard drive. When you don’t know how partitions work, choosing a partition layout can be troublesome. Unlike many installers that have fancy menus or graphic tools, OpenBSD’s installer expects you to know how to use low-level disk management tools. Partitions are logical subsections of a hard drive. Different partitions can be handled in different ways and can even have different file systems or different operating systems on them. We’re going to discuss partitioning for both single-OS and multiple-OS installs. Note Get a piece of paper to make some notes about your partitioning. Start by writing down the size of your hard disk. This is the amount of space you have to divide between your partitions. Write down the size of every partition you want and the order in which you want those partitions to lie. This will make installing OpenBSD much easier! Why Partition? Partitioning might seem like a pain; why should you bother? Many commercial operating systems allow you to simply have one large partition over your entire hard disk, giving you a single 80-gig partition. What are the advantages of partitioning? Different operating systems have different partition types and different requirements for disk layout. A Microsoft operating system simply cannot recognize an OpenBSD disk format and will insist upon formatting it before using it. Although OpenBSD can mount partitions designed for most other popular operating systems, do not put the main OpenBSD system programs on a foreign partition. Let each OS run on its own section of disk. If you want to have multiple operating systems on your machine, you must partition. But when you’re running a dedicated OpenBSD machine, why should you bother to split up your hard drive? On a physical level, different parts of the disk move at different speeds. By putting frequently accessed data on the fastest parts of the disk, you can improve system performance. The only way to arrange this is by using partitions. Also, the operating system handles each partition separately. This means that you can configure each partition differently or set it to use different rules. The root partition is the only partition that should have device nodes, for example, so you can tell other partitions to not recognize device nodes. Partitions that contain user data should not have setuid programs, and you might not even want to allow them to have programs at all. Separate partitions enforce that easily. You want the main system configuration directory to be unchangeable, so an intruder or a clumsy user cannot alter it? That’s trivial with separate partitions. If one partition is damaged, chances are that damage will not extend to other partitions. You can boot the system using the intact partitions and attempt to recover the data on the damaged partition. Finally, correct use of partitioning can enhance security. Not only will hackers have a more difficult time if they do break into your machine, but your own users will find it more difficult to accidentally damage the system. Before partitioning a hard drive, decide what the system will be used for. Is this a mail server? A Web server? A desktop machine? We’ll discuss the requirements for each partition for different types of servers. Page 45
Note: If you are looking for reliable and quality webspace company to host and run your servlet application check Actions servlet hosting services

Distribution Sets Each architecture directory contains a variety

Sunday, October 29th, 2006

This contains dictionary files and typesettable documentation. If this system is intended as a desktop, you probably want these. If it’s a server, you probably don’t need them. xbaseXX.tgz This contains the core of XFree86, such as programs, headers, libraries, and so on. If you want to use X, you need this. Although you might not have a console or monitor on this system, remember that X will allow programs on this server to display on a workstation. These functions will not work without this distribution set. xbaseXX.tgz This contains the fonts for XFree86. If you plan to use X on a local display, install this. xservXX.tgz This contains all of the XFree86 video card drivers. If you plan to use X on a local display, install this. xshareXX.tgz XFree86’s documentation and text files are included in this distribution set. If you’re one of those few people who know everything there is to know about XFree86, you can get by without this. Page 44
Note: If you are looking for top 10 and very good webhost to host and run your jsp application check Actions jsp hosting services

Distribution Sets Each architecture directory contains a variety

Sunday, October 29th, 2006

Distribution Sets Each architecture directory contains a variety of documents and files containing instructions and programs applicable to that type of hardware. For example, in the 3.1/i386 directory you’ll see several INSTALL documents and a tutorial on the i386 boot architecture. You’ll also see several compressed files with names like comp31.tgz, misc31.tgz, and so on. These files are distribution sets, or compressed chunks of OpenBSD. Each distribution set contains a subsection of OpenBSD. By choosing the distribution sets you install, you can choose how much functionality your OpenBSD system will have. For example, the documentation is kept in a separate distribution set. If you’re short on space and have documentation elsewhere, you might choose to save a little space and not install them on this machine. If this is a secure machine, you probably don’t want a compiler on it. And if this is your experimental “learning OpenBSD” machine, you probably want to install everything. Each distribution set has a name and a version number. For example, one distribution set of OpenBSD in release 3.1 is base32.tgz. In the next release, these same tools will be called base33.tgz. Here are the distribution sets for OpenBSD. You’ll find these on all architectures, unless noted in the architecture’s release notes. If this is your first OpenBSD install, take a moment to decide which distribution sets you need. If at all possible, install them all while you’re learning the OS. You can always trim them down in future installs. bsd This small distribution set contains the kernel. The kernel is important. The installer will complain if you don’t have it and issue all sorts of dire warnings. Worse, your new system will not boot without it. baseXX.tgz This contains OpenBSD’s core programs, all the things that make OpenBSD UNIXish. All the programs in /bin, /sbin, /usr/bin, and /usr/sbin, the system libraries, and the miscellaneous programs you expect to find on a UNIX system are in this distribution set. Without this distribution set, your OpenBSD system will not work at all. etcXX.tgz You might guess that this distribution set contains the /etc/ directory, but it also contains assorted other files and directories that are required by the system, such as /var/log, as well as root’s home directory. You must install this distribution set if you want your OpenBSD system to actually run. manXX.tgz If you need the manual pages for the programs in the base and the etc set, install this distribution set. The manual pages for other sets are installed with the distribution set. compXX.tgz This distribution contains C, C++, and Fortran compilers, tools, and the associated toolchain for each. It also includes the manual pages and documentation for the compilers. You will want this set if you plan to develop or compile software on this system. You need this set to use the ports collection. While this distribution set isn’t large, you might choose to not install in on a secure machine such as a firewall. (Intruders are generally delighted to find a properly configured compiler on a firewall; such tools make a hacker’s life much easier.) gameXX.tgz This distribution set contains a variety of simple games and documentation for them, based on games originally distributed in the BSD 4.4-Lite software collection. Some of these, such as fortune(1), are considered UNIX classics, and old farts won’t be happy unless they’re installed. Others, such as rogue(6), have more advanced versions available as a port or a package. You don’t really need this, unless you want to see what us old farts called “computer games” back in the day. miscXX.tgz Page 43
Note: If you are looking for top 10 and very good webhost to host and run your jsp application check Actions jsp hosting services

The OpenBSD Release If you look within the

Sunday, October 29th, 2006

Choosing Your Install Method While OpenBSD is available via CD-ROM and on the Net, you have an even wider range of choices for installation. The fastest and easiest way to install is from an OpenBSD CD-ROM. This eliminates many network issues that can complicate what should be a simple install. If you don’t have an OpenBSD CD-ROM, but you do have an Ethernet connection to the Internet, FTP installs are an excellent choice. If you choose to install from a reasonably close mirror site, and you have sufficient bandwidth, FTP installs are quite fast and reliable. You can also install over HTTP. You’re stuck with the inherent limitations of the HTTP protocol when installing via the Web; HTTP does not include the error-correcting protocols found in FTP. You might use this if you’re behind a Web-only proxy server or if your closest mirror only speaks HTTP. You can also install from a local FAT or EXT2 file system, such as found on many Microsoft or Linux machines. Your system must be partitioned properly for this to work (see “Partitioning”). This would allow you to “upgrade” part of your system to OpenBSD, which is especially useful on multiple-boot systems. To do this, just download the parts you need from the release directory on a FTP server. If you’re not sure which parts you need, you can safely download the entire release directory for your architecture it’ll take up a little more room, but will ensure you have everything you might need. Finally, you can download the files you need and make your own local OpenBSD install server. Local Installation Servers One reason ISOs are popular is that you can reuse them to install many machines at the cost of a single download. If you want to install a few (or many!) OpenBSD machines without buying a CD-ROM, and yet without using up bandwidth for each install, just download the entire release directory for your architecture. If you copy these files to a local FTP or HTTP [1] server, you can install any number of machines from these files. All you need to know is how to connect to this server, and any user names and password required to access it. You only need to download the directories for the architectures you need. If you know exactly what you want to install, you only need to download the installation sets you plan to install (see “Distribution Sets “). [1]Some architectures also support installs over NFS, but not all of them, so we won’t cover it here. Page 42

Hint: If you are looking for very good and affordable webspace to host and run your j2ee hosting application check Virtualwebstudio j2ee web hosting services

The OpenBSD Release If you look within the

Sunday, October 29th, 2006

The OpenBSD Release If you look within the release directory on either the FTP site or the CD-ROM, you’ll see the following: . A directory for each architecture OpenBSD supports. (On CD-ROM, this is scattered between different disks.) . A “packages” directory containing precompiled software for this release (see Chapter 13.) . A “ports.tar.gz” file containing the compressed ports tree (see Chapter 13.) . A compressed file containing the source code of the X Window System for this release. . A “tools” directory containing installation tools. Take a look through your CD-ROM or FTP site, and make sure you can find the directory for your hardware architecture. I’ll be using the i386 directory in the rest of this chapter; if you’re on a different hardware platform, substitute the correct architecture directory everywhere. Page 41

Hint: If you are looking for very good and affordable webspace to host and run your j2ee hosting application check Virtualwebstudio j2ee web hosting services

OpenBSD Project uses CD-ROM sales to fund OpenBSD

Sunday, October 29th, 2006

The 4 distfile directory contains the source code of a great deal of add-on OpenBSD software. Not all mirror sites carry this directory, as it’s quite large. The 5 ftplist file lists the official FTP and HTTP installation mirrors. When you install via FTP later, the install program will grab this file to allow you to choose a mirror site close to you. The 6 patches directory contains directories for each previous release of OpenBSD, and various patches for that release. Security problems and critical bugs can be patched after a release, and they are made available here. The 7 snapshots directory contains recent experimental versions of OpenBSD, generally from between releases. If you want to see what’s coming in future versions of OpenBSD, you can install a snapshot. Because these are works-in-progress, support is minimal. The developers appreciate bug reports on snapshots, but don’t support snapshots. The 8 songs directory contains the “soundtracks” for each release of OpenBSD. If all you want to do is browse the source code of the most recent release of OpenBSD, you can trawl through the 9 src directory. The source code is kept here in plain-text, human-readable format. There are easier ways to browse the source code, however: the OpenBSD website includes the source code on the Web, complete with revision history and developer comments. Finally, the tools directory contains odds and ends that are useful for the OpenBSD Project’s internal workings. Whether you have a CD-ROM or FTP access to the software, what you’re almost certainly most interested in is the release directory for the latest version of OpenBSD. Page 40
Note: If you are looking for reliable and quality webspace company to host and run your servlet application check Actions servlet hosting services

OpenBSD Project uses CD-ROM sales to fund OpenBSD

Sunday, October 29th, 2006

OpenBSD Project uses CD-ROM sales to fund OpenBSD development, and it would really prefer that if you want a CD-ROM, you purchase one. The disk images of the official install CD-ROMs is copyrighted by Theo de Raadt. The OpenBSD team adds some extras to the CD-ROM package, such as stickers and artwork, to make it more appealing. With a bit of searching, you will find OpenBSD ISO images on various Internet sites. Some of these are duplicates of the official ISO images, and are distributed in violation of Theo’s copyright. This is not only illegal in most parts of the world, it’s also just plain rude. Other ISO images on the Net are releases built by third parties who are not OpenBSD team members. While the release process is well documented, it still isn’t a very simple operation. You’re welcome to grab one of these ISO images and try to use it, but you should be warned that they have not been through the usual OpenBSD quality assurance process. Also, any joker can put up an ISO image, but you have no way to really know that such an image doesn’t contain a Trojan, backdoor, or other booby trap unless you thoroughly audit the image and compare it against an official OpenBSD install. If you’re going to go to that amount of trouble, you might as well shell out a few dollars and purchase an official CD-ROM anyway, or just try a FTP install! FTP Install Sites The main OpenBSD FTP site is at the University of Alberta, in Calgary, Canada. You can expect that the students are using all the bandwidth they can get for educational purposes, without sparing a thought for your OpenBSD needs. This makes the main FTP site slower that you might like. Fortunately, OpenBSD is mirrored all over the world. Go to the OpenBSD website and check the “FTP” link. This will bring up a whole list of mirror sites in a variety of formats FTP, HTTP, AFS, and so on. The list includes mirrors on every continent, including places such as Peru, Thailand, and Lithuania. There’s almost certainly one closer to you than the University of Alberta. OpenBSD FTP/HTTP Layout No matter how you get OpenBSD over the network, you’ll find the distribution site laid out much like this. 1 3.0/ 3.1/ 3.2/ 3.3/ 2 OpenSSH/ 3 README 4 distfiles/ 5 ftplist 6 patches/ 7 snapshots/ 8 songs/ 9 src/ tools/ The 1 numbered directories are for the various releases of OpenBSD. Above, we see that this FTP site contains versions 3.0, 3.1, 3.2, and 3.3. You’ll only have one release directory on a CD-ROM, of course the directory for the release you have. The 2 OpenSSH directory contains the OpenBSD team’s implementation of SSH, which has been adopted by many different software projects, both free and commercial (i.e., Solaris). OpenBSD includes OpenSSH, and so you really don’t have to worry about getting it separately. The 3 README file contains very basic information about obtaining OpenBSD and where to get more information on the software. Page 39
Note: If you are looking for reliable and quality webspace company to host and run your servlet application check Actions servlet hosting services