Manage your Blog

Create your blog now! Easy and Free

Ubuntuland

Get Paid to Blog About the Things You Love

Archive: May 2008

31/05/2008 GMT 1

VeritasNetBackup: Restores from multiplexed database backups

ubuntuland @ 19:34

NetBackup can run several restores at the same time from a single multiplexed tape. This is done by means of the

MPX_RESTORE_DELAY option, which specifies how long, in seconds, the server waits for additional restore requests of files or raw partitions that are in a set of multiplexed images on the same tape. The restore requests received within this period are executed simultaneously. By default, the delay is 30 seconds.
This may be a useful parameter to change if multiple stripes from a large database backup are multiplexed together on the same tape. If the MPX_RESTORE_DELAY option is changed, you do not need to stop and restart the NetBackup processes for the change to take effect.

mutuionline728x90.gif

When bprd, the request daemon on the master server, receives the first stream of a multiplexed restore request, it triggers the MPX_RESTORE_DELAY timer to start counting the configured amount of time. At this point, bprd watches and waits for rela ted multiplexed jobs from the same client before starting the overall job. If another associated
stream is received within the timeout period, it is added to the total job, and the timer is reset to the MPX_RESTORE_DELAY period. Once the timeout has been reached without an additional stream being received by bprd, the timeout window closes, all associated restore requests are sent to bptm, and a tape is mounted. If any associated restore requests are received after this event, they are queued to wait until the tape that is now “In Use” is returned to an idle state.

If MPX_RESTORE_DELAY is not set high enough, NetBackup may need to mount and read the same tape multiple times to collect all of the necessary header informa tion necessary for the restore. Ideally, NetBackup would read a multiplexed tape, collecting all of the header information it needs, with a single pass of the tape, thus minimizing the amount of time to restore.
Example (Oracle):
Suppose that MPX_RESTORE_DELAY is not set in the bp.conf file, so its value is the default of 30 seconds. Suppose also that you initiate a restore from an Oracle RMAN backup that was backed up using 4 channels or 4 streams, and you use the same number of channels to restore.

ipod_lord_ipod_by_kiubito.jpgRMAN passes NetBackup a specific data request, telling NetBackup what information it needs to start and complete the restore. The first request is passed and received by NetBackup in 29 seconds, causing the MPX_RESTORE_DELAY timer to be reset. The next request is passed and received by NetBackup in 22 seconds, so again the timer is reset. The third request is received 25 seconds later, resetting the timer a third time, but the fourth request is received 31 seconds after the third. Since the fourth request was not received within the restore delay interval, NetBackup only starts three of the four restores. Instead of reading from the tape once, NetBackup queues the fourth restore request until the previous three requests are completed. Since all of the multiplexed images are on the same tape, NetBackup mounts, rewinds, and reads the entire tape again to collect the multiplexed images for the fourth restore request.
Note that in addition to NetBackup's reading the tape twice, RMAN waits to receive all the necessary header information before it begins the restore.
If MPX_RESTORE_DELAY had been larger than 30 seconds, NetBackup would have received all four restore requests within the restore delay windows and collected all the necessary header information with one pass of the tape. Oracle would have started the restore after this one tape pass, improving the restore performance significantly.
MPX_RESTORE_DELAY needs to be set with caution, because it can decrease performance if its value is set too high. Suppose, for instance, that the MPX_RESTORE_DELAY is set to 1800 seconds. When the final associated restore request arrives, NetBackup resets the request delay timer as it did with the previous requests.
NetBackup then must wait for the entire 1800-second interval before it can start the restore.
Therefore, try to set the value of MPX_RESTORE_DELAY so it is neither too high or too low.

tiscali300x250_tiscalifamily.gifNetBackup storage device performance
This section looks at storage device functionality in the NetBackup data tra nsfer path.
Changes in these areas may improve NetBackup performance.
Tape drive wear and tear is much less, and efficiency is greater, if the data stream matches the tape drive capacity and is sustained. Generally speaking, most tape drives have much slower throughput than disk drives. Match the number of drives and the throughput per drive to the speed of the SCSI/FC connection, and/or follow the hardware vendors’
recommendations.
These are some of the factors which affect tape drives:
Media Positioning
When a backup or restore is performed, the storage device must position the tape so that the da ta is over the read/write head. Depending on the location of the data and the overall performance of the media device, this can take a significant amount of time. When you conduct performance analysis with media containing multiple images, it is important to account for the time lag that occurs before the data transfer starts.

Tape Streaming
If a tape device is being used at its most efficient speed, it is said to be streaming the data onto the tap e. Generally speaking, if a tape device is streaming, there will be little physical stopping and starting of the media. Instead the media will be constantly spinning within the tape drive. If the tape device is not being used at its most efficient speed, it may continually start and stop the media from spinning. This behavior is the opposite of tape
streaming and usually results in a poor data throughput rate.

Data Compression
Most tape devices support some form of data compression within the tape device itself.
Compressible data (such as text files) yields a higher data throughput rate than non-compressible data, if the tape device supports hardware data compression.
Tape devices typically come with two performance rates: maximum throughput and nominal throughput. Maximum throughput is based on how fast compressible data can be written to the tape drive when hardware compression is enabled in the drive. Nominal throughput refers to rates achievable with non-compressible data.
Note Tape drive data compression cannot be set by NetBackup. Follow the instructions provided with your OS and tape drive to be sure data compression is set correctly.
In general, tape drive da ta compression is preferable to client (software) compression such as that available in NetBa ckup. Client compression may be desirable in some cases, such as for reducing the amount of data transmitted across the network for a remote client backup.

Scarica Biagio Antonaccio subito!

Multiplexing and multi-streaming.
Consider the following factors regarding multiplexing and multi-streaming.
When to use multiplexing and multi-streamingultiple data streams can reduce the time for large backups. The reduction is achieved by splitting the data to be backed up into multiple streams and then using multiplexing,
multiple drives, or a combination of the two for processing the streams concurrently. In addition, configuring the backup so each physical device on the client is backed up by a separate data stream that runs concurrently with streams from other devices can significantly reduce backup times.
Note For best performance, use only one data stream to back up each physical device on the client. Running multiple concurrent streams from a single physical device can adversely affect the time to back up that device because the drive heads must move back and forth between tracks containing the files for the respective streams.
Multiplexing is not recommended for database backups, when restore speed is of paramount interest, or when your tape drives are slow.
Backing up across a network, unless the network bandwidth is very broad, can nullify the ability to stream. Typically, a single client can send enough data to saturate a single 100BaseT network connection. A gigabit network has the capacity to support network streaming for some clients. Keep in mind that multiple streams use more of the client’s resources than a single stream. We recommend testing to make sure that the client can handle the multiple data streams and that the users are not affected by the high rate of
data transfer.
Multiplexing and multi-streaming can be powerful tools to ensure that all tape drives are streaming. With NetBackup, both can be used at the same time. It is important to distinguish between the two concepts:

Expect the duplication of a multiplexed tape to take a longer period of time if it is demultiplexed, because multiple read passes of the source tape must be made.
When you duplicate a multiplexed backup , demultiplex it.
By demultiplexing the backups when they are duplicated, the time for recovery is
significantly reduced.
Do not use multi-streaming on single mount points. Multi-streaming takes advantage of the ability to stream data from several devices at once. This permits backups to take advantage of Read Ahead on a spindle or set of spindles in RAID environments.
Multi-streaming from a single mount point encourages head thrashing and may result in degraded performance. Only conduct multistreamed backups against single mount points if they are mirrored (RAID 0). However, this also is likely to result in degraded performance.

Effects of multiple data streams on backup/restore
Multiplexing
To use multiplexing effectively, you must understand the implications of multiplexing on restore times. Multiplexing may decrease overall backup time when you are backing up large numbers of clients over slow networks, but it does so at the cost of recovery time. Restores from multiplexed tapes must pass over all nonapplicable data.
This action increases restore times. When recovery is required, demultiplexing causes delays in the restore process. This is because NetBackup must do more tape searching to accomplish the restore.
Restores should be tested, before the need to do a restore arises, to determine the impact of multiplexing on restore performance.
When you initially set up a new environment, keep the multiplexing factor low.
Typically, a multiplexing factor of four or less does not highly impact the speed of restores, depending on the type of drive and the type of system. If the backups do not finish within their assigned window, multiplexing can be increased to meet the window. However, increasing the multiplexing factor provides diminishing returns as the number of multiplexing clients increases. The optimum multiplexing factor is the number of clients needed to keep the buffers full for a single tape drive.
Set the multiplexing factor to four and do not multistream. Run benchmarks in this environment. Then, if needed, you can begin to change the values involved until both the backup and restore window parameters are met.

Read more Veritas NetBackup, Backup Planning and Configuration Guidelines
& Veritas NetBackup, Encryption, Java and Configuration Hardware

subito_728x90.gif

Latest Posts

Linux Links

25/05/2008 GMT 1

Ubuntu 8.04 Hardy Heron: Upgrade or clean install?

ubuntuland @ 19:47
Which path should you follow? Should you take advantage of Ubuntu's package manager and use it to upgrade your system to the latest 8.04 Hardy Heron release, or should you download a CD or DVD ISO image and do a clean install?
Common wisdom says that doing a clean install is the better, safer course of action.
There may be a little extra work involved configuring everything once the latest and greatest is installed, but that's nothing compared to the pain of an update gone wrong, according to traditional thinking.
But that cautious approach may no longer be necessary.

ipod_lord_ipod_by_kiubito.jpgI did a clean install of Ubuntu 8.04 recently on my development machine. It was a quick and easy process.

I backed up the data and configuration files residing in my /home directory, installed the new release, then copied my saved data back in place. Nothing to it, and everything worked when I was through.

But when the Ubuntu 7.10 package manager recently offered to upgrade me to release 8.04 when it was showing me the latest security updates available, I decided it was time to try the upgrade path as well.

I did this in spite of the advice I heard in the #ubuntu channel at irc.freenode.net. The unanimous opinion I received from the three people who responded was to do a clean install, although one of the three said he personally used upgrade because it left him with less to do afterward. The reasons for recommending a clean install included risk avoidance, better results for complex configurations, and speed. One of the three noted most of the 8.04 installation problems he had seen in the channel came from those taking the upgrade path.

no one deals like we do!

Back up early and often

Click to enlarge When you do a clean install, you know beforehand that you are going to lose everything you don't specifically back up and then restore after the install. When you do an update, you hope that everything will still be there and still work when you're finished. The most important thing to remember when doing an update is the same thing that's most important to remember when you do a clean install: back up everything before you begin.

I have two hard drives on my primary desktop. One is almost completely dedicated to backing up my email, photo, video, and text files from my /home directory. It has gotten quite large over the years. Before starting the upgrade process to Ubuntu 8.04, I made sure my backups were completely up-to-date.

I started the upgrade at 11:00 a.m. one morning, and finally finished the process at 6:30 a.m. the next day. Yes, I did take time off to sleep, but that's still a long time. In comparison, doing a clean install took only an hour on my alternate desktop machine.

The process begins by downloading the upgrade tool. That's followed by something called "setting new software channels," which appears to be identifying which repositories you need in order to bring all currently installed applications up-to-date. Those two tasks combined took less than half an hour to finish.

The largest chunk of time -- about 12 hours -- was spent downloading new packages. I'm sure much of the reason for the slow speed can be attributed to the fact that many others were doing the same thing at the same time I was, with available bandwidth shrinking to fit demand. Downloading and burning a complete 8.04 ISO image took less than an hour a few days earlier. Because it took so long to download the new packages, I ran another backup of my email files when I was ready to start applying changes, then closed the email app -- just in case.

The next step was to install and configure the new packages. This, too, takes longer to do than starting from scratch with a new install -- about an hour on my machine. Early on, the progress bar advised I had 33 minutes remaining, but the remaining time shown increased the further it went. In the end, I went to bed and let it continue by itself. A couple of the applications (CUPS and PostgreSQL) required interactive participation, so when I returned to the computer the next morning, I had to choose between keeping the old configuration files or replacing them.

tiscali300x250_tiscalifamily.gifThe remaining upgrade steps (cleanup and reboot) went smoothly, and I finally found myself sitting across the keyboard from Ubuntu 8.04, almost 24 hours after my journey began. But my email accounts and data were there immediately, and my browser toolbar and bookmarks were present and accounted for as well.

Which is best?

Having installed Ubuntu 8.04 both ways, by upgrade and also with a fresh installation, which do I prefer and which would I recommend? The answers are not the same.

After having used both, I'm solidly in the "clean install" corner. It was faster by far, and not only seems to be a cleaner course of action, with fewer opportunities for a misstep, but offers greater control over how the new installation will operate, since any and all control decisions bubble up to the surface during the process.


Unusual Gifts ideas

But the clean install approach may not be the right choice for you. In my mind, the swing point in the decision is this: if you are an experienced Ubuntu user more interested in having a system ready to use and as identical to the previous installation as possible, consider an upgrade instead of an install. If you are not as confident in your Ubuntu-foo, or are more interested in having the latest and greatest packages rather than a system that behaves immediately just as the previous one did, go with a clean install.

The good news is that both processes seemed to work well for me.


Scarica Biagio Antonaccio subito!

Ubuntu 8.04 LTS ("Hardy Heron") HardyUpgrades

This document provides instructions and notes on upgrading to Ubuntu 8.04 LTS (Hardy Heron), released on the 24th of April 2008.

Before you start

  • You can directly upgrade to Ubuntu 8.04 LTS

18/05/2008 GMT 1

Debian and Ubuntu keys under attack

ubuntuland @ 10:14

A recently disclosed vulnerability in widely used Linux distributions can be exploited by attackers to guess cryptographic keys, possibly leading to the forgery of digital signatures and theft of confidential information, a noted security researcher said Thursday.

HD Moore, best known as the exploit researcher who created the Metasploit penetration testing framework, called the vulnerability in Debian and Ubuntu systems "ugly" and said it will be a big job for administrators to find every flawed key, and then re-issue them.

The bug, noted Tuesday by the Debian Project, is in the random number generator used to produce a variety of digital keys, including SSH (Secure Shell) keys and SSL (Secure Socket Layer) certificates.

The latter are widely used to secure traffic between users and secure sites on the Internet.

register728x90.gif

According to Moore, the bug makes it relatively easy to "guess" keys. In a posting to his blog Wednesday, Moore claimed he was able to generate 1024- and 2048-bit keys in about two hours.

Stronger keys, however, take considerably longer to create. He estimated that an 8192-bit RSA keyset would take some 3,100 hours (about 129 days) to generate.

Moore also published several key-generating tools - collectively dubbed "Toys" - that included a shared library and a key generation script.

ipod_lord_ipod_by_kiubito.jpgWith that information out in the wild, other researchers banged the warning drum. "This is very, very, very serious and scary," said Bojan Zdrnja, an analyst at the Internet Storm Center (ISC) in a warning posted on the organisation's site.

Symantec also warned customers of its DeepSight threat network of the vulnerability and Moore's follow-on information and tools disclosures. The California-based company also noted that another hacker, "Markus M," published a tool that automates brute force attacks of the key weakness to the Full Disclosure security mailing list.

That revelation pushed the ISC to up its INFOCon threat status to "yellow," a relatively rare occurrence. "The development of automated scripts exploiting keys looks like a real threat to SSH servers around the world," said Zdrnja in a later posting to the group's site.

It's not just users running Debian-based systems (which includes the popular Ubuntu Linux distribution), who are at risk, Moore cautioned, but virtually anyone. If data copied to other platforms has been secured by keys generated on a Debian distribution, that data could be snatched.

secondamano300x250_auto2set07.gif

"There's a lot of different areas that you're going to have to look, not just within Debian," Moore said. "Administrators will have to audit every single key. Even systems that do not use the Debian software need to be audited in case any key is being used that was created on a Debian system."

Moore, ISC's Zdrnja and others have recommended that Debian and Ubuntu users patch their systems - updates are available - and that users and administrators regenerate all keys produced on a Debian system between September 2006 and 13 May, 2008. The September 2006 date, said Moore, was when the first builds that included the flaw were made available.

Although he said the situation is serious, Moore doubted that there would be general and widespread attacks. Instead, he said the most likely outcome would be targeted attacks on systems that administered large numbers of Debian users.

Moore also discounted any connection between the Debian vulnerability and his disclosures, and brute force attacks some vendors, including Symantec, have been tracking the last 24 hours. "The timing is definitely funny," he acknowledged, but said the differences - the attacks have been against user-generated passwords, not authentication keys - means the two events are probably just coincidental.

source: Techworld

Scarica Biagio Antonaccio subito!

 

Latest Posts



AsteClick - iPod Touch 32gb

Linux Links



AsteClick - MacBook Air

13/05/2008 GMT 1

Ubuntu 8.04 Hardy Heron: Upgrade or clean install?

ubuntuland @ 14:44
Which path should you follow? Should you take advantage of Ubuntu's package manager and use it to upgrade your system to the latest 8.04 Hardy Heron release, or should you download a CD or DVD ISO image and do a clean install?
Common wisdom says that doing a clean install is the better, safer course of action.
There may be a little extra work involved configuring everything once the latest and greatest is installed, but that's nothing compared to the pain of an update gone wrong, according to traditional thinking.
But that cautious approach may no longer be necessary.

ipod_lord_ipod_by_kiubito.jpgI did a clean install of Ubuntu 8.04 recently on my development machine. It was a quick and easy process.

I backed up the data and configuration files residing in my /home directory, installed the new release, then copied my saved data back in place. Nothing to it, and everything worked when I was through.

But when the Ubuntu 7.10 package manager recently offered to upgrade me to release 8.04 when it was showing me the latest security updates available, I decided it was time to try the upgrade path as well.

I did this in spite of the advice I heard in the #ubuntu channel at irc.freenode.net. The unanimous opinion I received from the three people who responded was to do a clean install, although one of the three said he personally used upgrade because it left him with less to do afterward. The reasons for recommending a clean install included risk avoidance, better results for complex configurations, and speed. One of the three noted most of the 8.04 installation problems he had seen in the channel came from those taking the upgrade path.

no one deals like we do!

Back up early and often

Click to enlarge When you do a clean install, you know beforehand that you are going to lose everything you don't specifically back up and then restore after the install. When you do an update, you hope that everything will still be there and still work when you're finished. The most important thing to remember when doing an update is the same thing that's most important to remember when you do a clean install: back up everything before you begin.

I have two hard drives on my primary desktop. One is almost completely dedicated to backing up my email, photo, video, and text files from my /home directory. It has gotten quite large over the years. Before starting the upgrade process to Ubuntu 8.04, I made sure my backups were completely up-to-date.

I started the upgrade at 11:00 a.m. one morning, and finally finished the process at 6:30 a.m. the next day. Yes, I did take time off to sleep, but that's still a long time. In comparison, doing a clean install took only an hour on my alternate desktop machine.

The process begins by downloading the upgrade tool. That's followed by something called "setting new software channels," which appears to be identifying which repositories you need in order to bring all currently installed applications up-to-date. Those two tasks combined took less than half an hour to finish.

The largest chunk of time -- about 12 hours -- was spent downloading new packages. I'm sure much of the reason for the slow speed can be attributed to the fact that many others were doing the same thing at the same time I was, with available bandwidth shrinking to fit demand. Downloading and burning a complete 8.04 ISO image took less than an hour a few days earlier. Because it took so long to download the new packages, I ran another backup of my email files when I was ready to start applying changes, then closed the email app -- just in case.

The next step was to install and configure the new packages. This, too, takes longer to do than starting from scratch with a new install -- about an hour on my machine. Early on, the progress bar advised I had 33 minutes remaining, but the remaining time shown increased the further it went. In the end, I went to bed and let it continue by itself. A couple of the applications (CUPS and PostgreSQL) required interactive participation, so when I returned to the computer the next morning, I had to choose between keeping the old configuration files or replacing them.

tiscali300x250_tiscalifamily.gifThe remaining upgrade steps (cleanup and reboot) went smoothly, and I finally found myself sitting across the keyboard from Ubuntu 8.04, almost 24 hours after my journey began. But my email accounts and data were there immediately, and my browser toolbar and bookmarks were present and accounted for as well.

Which is best?

Having installed Ubuntu 8.04 both ways, by upgrade and also with a fresh installation, which do I prefer and which would I recommend? The answers are not the same.

After having used both, I'm solidly in the "clean install" corner. It was faster by far, and not only seems to be a cleaner course of action, with fewer opportunities for a misstep, but offers greater control over how the new installation will operate, since any and all control decisions bubble up to the surface during the process.


Unusual Gifts ideas

But the clean install approach may not be the right choice for you. In my mind, the swing point in the decision is this: if you are an experienced Ubuntu user more interested in having a system ready to use and as identical to the previous installation as possible, consider an upgrade instead of an install. If you are not as confident in your Ubuntu-foo, or are more interested in having the latest and greatest packages rather than a system that behaves immediately just as the previous one did, go with a clean install.

The good news is that both processes seemed to work well for me.


Scarica Biagio Antonaccio subito!

Ubuntu 8.04 LTS ("Hardy Heron") HardyUpgrades

This document provides instructions and notes on upgrading to Ubuntu 8.04 LTS (Hardy Heron), released on the 24th of April 2008.

Before you start

  • You can directly upgrade to Ubuntu 8.04 LTS ("Hardy Heron") from Ubuntu 7.10 ("Gutsy Gibbon") or from Ubuntu 6.06 LTS ("Dapper Drake"). This page contains instructions for both. (see UpgradeNotes)

  • Be sure that you have all updates applied to your current version of Ubuntu before you upgrade.

  • Before upgrading it is recommended that you read the [WWW] release notes for Ubuntu 8.04 LTS, which document caveats and workarounds for known issues in this version.

Note: If you have a version of Ubuntu other than 6.06 LTS or 7.10, please see Installation/UpgradeFromOldVersion for information on how to upgrade.

Upgrade from 7.10 to 8.04 LTS

Network upgrade for Ubuntu desktops (recommended)

You can easily upgrade over the network with the following procedure.

  1. Open System -> Administration -> Update Manager

    • update_manager_01.png

  2. Click the Check button to check for new updates.

  3. If there are any updates to install, use the Install Updates button to install them, and press Check again after that is complete.

  4. A message will appear informing you of the availability of the new release.

    • update-manager-upgrade-804.png

  5. Click Upgrade.

  6. Follow the on-screen instructions.

register728x90.gif

Network upgrade for Kubuntu desktops (recommended)

To upgrade from Kubuntu 7.10 to 8.04, over the internet, use the following procedure.

For a full graphical presentation of these steps, please review HardyUpgrades/Kubuntu.

  1. From the K-Menu run Adept Manager.

  2. Click Fetch Updates.

  3. The Version Upgrade button will appear. Click it.

  4. Follow the prompts

Network upgrade for Ubuntu servers (recommended)

  1. Install update-manager-core if it is not already installed:

    sudo apt-get install update-manager-core 
  2. login as root user:

    sudo passwd root 
  3. Enter passwords the change user to root:

    su 
  4. Launch the upgrade tool:

    do-release-upgrade 
  5. Follow the on-screen instructions.

Note: It's not recommended to upgrade your system through ssh

secondamano300x250_auto2set07.gif

Upgrade from 6.06 LTS to 8.04 LTS

This section describes how to perform 6.06 LTS ("Dapper") -> 8.04 LTS ("Hardy") upgrades.

Network upgrade for Ubuntu desktops (recommended)

  1. Make sure the "dapper-updates" software channel is enabled.

  2. Be sure that you have all updates applied before you upgrade.

  3. Press Alt-F2 and type gksu "update-manager -d"

    • update_manager_01.png

  4. Click the Check button to check for new updates.

  5. A message will appear informing you of the availability of the new release.

    • update-manager-upgrade-804.png

  6. Click Upgrade.

  7. Follow the on-screen instructions.

Network upgrade for Kubuntu desktops (recommended)

To upgrade from Kubuntu 6.06 to 8.04 over the Internet you can use a special mode in the server upgrade system.

  1. enable the "dapper-updates" repository

  2. install the new "update-manager-core" package - dependencies include python-apt, python-gnupginterface and python2.4-apt.

  3. run "do-release-upgrade -d -m desktop" in a terminal window

  4. follow the steps on the terminal window

blinkobonus_game_728x901.gif

Network upgrade for Ubuntu servers (recommended)

If you run an Ubuntu server, you should use the new server upgrade system.

  1. enable the "dapper-updates" repository

  2. install the new "update-manager-core" package - dependencies include python-apt, python-gnupginterface and python2.4-apt.

  3. run "do-release-upgrade -d" in a terminal window

  4. follow the steps on the terminal window

Upgrading using the alternate CD/DVD

Use this method if the system being upgraded is not connected to the Internet.

  1. Download and burn the alternate installation CD.

  2. Insert it into your CD-ROM drive.

  3. A dialog will be displayed offering you the opportunity to upgrade using that CD.

  4. Follow the on-screen instructions.

If the upgrade dialog is not displayed for any reason, you may also run the following command using Alt+F2:

gksu "sh /cdrom/cdromupgrade" 

Or in Kubuntu run the following command using Alt+F2:

kdesu "sh /cdrom/cdromupgrade" 

Upgrading from a torrent

If you're familiar with torrents and have an ISP that doesn't limit them, you can download the upgrade much more quickly. You'll also be sharing your bandwidth with other Ubuntu users and helping to reduce the load on the servers, which is especially useful on release days when the server overload causes problems. Basic instructions:

  1. Download the ISO file for the alternate installation CD using the .torrent[WWW] http://releases.ubuntu.com file found on

  2. Mount the ISO as a drive or burn it to a physical CD

  3. Follow the alternate CD upgrade instructions

[WWW] Detailed instructions here and [WWW] here.

source: linux.com & ubuntu.com

 

kingolotto_728x90.gif

Latest Posts

 

sky8_468x60.gif

Linux Links

 

Toys! Free 			shipping on Toys!

Free 			Shipping!

11/05/2008 GMT 1

Programming Linux Games: The Anatomy of a Game

ubuntuland @ 15:39

In 1991 a Finnish university student named Linus Torvalds began working on a new operating system in his spare time.

He didn’t work in isolation, nor did hemake a big deal about what he was doing; rather, he modestly invitedprogrammers from all over the world to join his project, which he dubbed “Linux.”

This loosely knit team of students, professionals, and hobbyistscollaborated through the Internet, with the expectation of learning a bit about programming and having a good time. Linus never thought that his project would spawn an entire industry.

games_god_of_war_2.jpg

Since then, Linux has grown into a general-purpose operating system for a wide variety of hardware platforms. With more than 10 million users (a number that is constantly growing), the Linux platform o ers a sizable audience for computer games. It is now capable of accelerated 3D graphics, environmental audio, and seamless game controller handling, in addition to the server tasks that UNIX-like operating systems generally carry out. Although Linux is still evolving, it is already a solid environment for serious game development.

 

love250x250.jpgThis book describes the toolkits and the environments that allow programmers to write 2D and 3D games for Linux. We will learn how to draw animated graphics on the screen, how to play high-quality digital sound through several di erent software libraries, and how to set up OpenGL to create uid 3D graphics. By the end of this book, you will know what makes Linux games tick,and how to create your own games for this platform.

This book is not about game design, the mathematics of 3D graphics, or advanced OpenGL programming. These topics are best left to books of their own; I could not hope to do them justice here. However, with the knowledge you will gain from this book, you will be prepared to tackle these topics later on.

Before we begin our discussion of Linux game programming, let’s take a quick glance at our surroundings in the gaming industry so that you can better understand what goes into this type of project.

A Quick Survey of Game Genres
Computer games tend to fall into any one of a number of distinct genres. Many players have strong preferences for certain genres, which makes this an important issue for game designers to consider. And, the presentation of a game concept can make an enormous di erence in its success.

fiat500_468x60.gif

Simulation Games
The simulation genre encompasses a wide variety of games, from ight simulators to Mech combat scenarios. An ideal simulator provides a high level of realism in graphics, sound, and game physics. Some popular simulation games are Heavy Gear II, MechWarrior, and Microsoft Flight Simulator. The basic goal of any simulation game is to put the player behind the controls of something exciting, something that he or she probably would not have access to in real life.

Simulations strive for immersion.
Simulation games (sims) are basically at two extremes. Some simulations aim for absolute realism, seeking to entertain the player with an almost completely accurate portrayal of real life. These “games” are sometimes even used for real-life training purposes. Other sims, like the Heavy Gear and MechWarrior series, trade realism for pure entertainment value. These games are based only loosely on reality; they simulate imaginary vehicles with extraordinary but rather impossible capabilities. (Interestingly, the MechWarrior and Heavy Gear computer games are based on pencil-and-paper role-playing games.)

Simulations pose a serious development challenge.
Since a good modern simulation requires high-quality 3D graphics, detailed vehicle models, a game physics system for simulating the physics of the real world, realistic input response, network capabilities, and possibly a certain amount of artificial intelligence for the computer-controlled players, a contemporay sim is not trivial to construct.

What makes a simulation game successful?
Let’s look at a couple of examples: a “realistic” simulator and an “action” simulator. Microsoft Flight Simulator is a popular ight simulator for the PC (and is in fact the current iteration of a long line of ight simulators by the same developers, dating back to the Commodore 64) that combines realistic control with excellent 3D graphics and interesting airplanes, and the terrain looks reasonably close to the real world’s.1 An experienced pilot could certainly tell the di erence between Microsoft Flight Simulator and a real airplane, but it’s nonetheless an enjoyable simulation.

Microsoft Flight Simulator tries to make the players feel like they were in the cockpit, not just collecting cellulite behind the keyboard of a fast computer.
Although this game will not run under Linux (except possibly under WINE2), it’s certainly worth a look if ou’re thinking of writing a ight simulator.
On another front, the Flight Gear project is presently developing a free ight simulator for Linux. The imulator already sports a realistic physics model and an excellent terrain engine, and it is slated to ventually become one of the best ight simulators ever. Flight Gear is portable to many platforms, as it is based lmost entirely on open technology.
tiscali300x250_tiscalifamily.gif

Heavy Gear II from Activision is a good example of an action simulator. It puts the player behind the controls of a multiton Gear (a two-legged walking vehicle with big guns) and succeeds because of its realistic graphics, simple but capable control system, damage simulation, and interesting gameplay. The player is in complete control of his or her Gear and is free to do anything during the game (although accomplishing the mission without getting killed is usually the best plan). Heavy Gear II creates a sense of power and euphoria in the player, and this makes it a pleasant experience. Activision has also published several MechWarrior titles that are very similar to the Heavy Gear series.
Finally, one of my personal favorite simulation games (from many years ago) is Corncob 3D, a completely unrealistic shareware, DOS-based ight simulator.
Guised as a ight simulator, this is a classic “Defend Earth from Space Invasion” game with lots of missions, missiles, and mayhem. By today’s standards, of course, this game is laughable. But it ran well on the low-end hardware of the day, and it was a lot of fun to play. Corncob 3D is a good example of a simulator
that trades realism for entertainment value.

First-Person Shooters
First-person shooters are some of the most popular games today. They typically involve a weak story line (with exceptions, of course), hordes of enemies, big explosions, and lots of blood. The basic premise of most first-person shooters is to give the player an adrenaline rush by putting him in the middle of a hostile environment with insidious monsters and powerful weapons. These games have improved in quality over the years and are beginning to reach a very high level of realism. Some popular ones are Quake 3, Half-Life, and Soldier of Fortune, all of which are available for Linux (although Half-Life is not native to Linux, and
requires the WINE library to run).

no one deals like we do!

High-quality first-person shooters are di cult to produce, not just because they’re hard to program (facilitated by standard 3D libraries such as OpenGL), but also because they require detailed 3D character models and levels. 3D game-engine programming requires a solid knowledge of linear algebra and a firm
grasp of certain types of data structures. However, mathematically inclined people are likely to find 3D game programming both challenging and rewarding.

Valve’s Half-Life is one of the most successful first-person shooters, combining the thrill of a typical FPS with a compelling storyline, amazingly realistic enemies, and an excellent multiplayer mode. Half-Life is based on Quake II’s rendering technology, but that is where the similarities end. Unlike the Quake series, Half-Life has a plot, an excellent single-player mode as well as network game support, and a more complex virtual environment (complete with moveable objects and vehicles).
Another interesting first-person shooter (also based on the Quake II engine) is Activision’s Soldier of Fortune. Decried by critics as gratuitously violent (and hence “indexed” in Germany and classified as an adult title elsewhere), Soldier of Fortune combines traditional first-person shooter action with frightening
realism, even going so far as to correctly simulate bodily damage due to gunshot wounds. It also has a solid plot that develops throughout the game. Overall, a very enjoyable title, if you’re not disturbed by the violence. (I won’t go into the highly emotional politics surrounding this subject.)
A current trend is to mix first-person 3D technology with the role-playing game.

Deus Ex is one such example, a role-playing game based on the Unreal engine.
Deus Ex has been ported to Linux, and I strongly recommend giving it a try.

Real-time Strategy Games
The genre of games known as Real-Time Strategy (RTS ) games includes such popular titles as StarCraft, Command and Conquer, and Total Annihilation—games that allow the player to command individual parts of an army from an overhead view, with success in battle usually leading to better equipment and soldiers. Because success is usually determined by a player’s tactics, these are considered strategy games. RTS games often have a high replay value; they’re fun to play again and again.

RTS games are comparatively easy to program, because, with some exceptions, they do not involve 3D graphics or complicated mathematics; however, good RTS games are hard to produce, and they tend to be few and far between. They often involve a certain amount of artificial intelligence (AI) programming for
controlling the simulated opponents in single-player games—a fascinating field, but one that we’ll leave to other sources.


Unusual Gifts ideas

StarCraft is by far the most successful RTS game, combining pleasing graphics, a large selection of well-balanced units, and interesting battlefields in a very well-rounded game and exciting game. Solid game design is by far the most important issue in creating a real-time strategy game, and StarCraft is an
excellent example. This is not the first notable game from Blizzard Entertainment, and it will be interesting to see what Blizzard comes up with in the future.

Turn-Based Strategy Games
Turn-Based Strategy (TBS ) games are like real-time strategy games, but the gameplay is divided into turns, usually with no time limit, thus giving the player time to think and relax, and lending the game an entirely di erent feel from the faster-paced strategy games. TBS games are not decided by re exes, but rather
by careful planning, which often makes them more di cult, and more attractive to many players. Sid Meier’s Civilization I I is widely regarded as the best turn-based strategy game, because of its balance and replay value.

Deceptively Complex
I once thought that TBS games were easy to write, but then I saw the source code to Sid Meier’s Alpha Centauri (SMAC). Most players don’trealize it, but SMAC actually uses a 3D technique called voxels to
render its units on the y and to draw a height-sensitive landscape with perspective texture mapping and dynamic palette mapping (made possible by self-modifying assembly code). Sid Meier’s Alpha Centauri
was obviously not easy to port to Linux. While it’s possible to write a good TBS game without such sophistication, don’t think of the TBS genre as an easy way out—its complexity can be deceiving.

Role-Playing Games
Role-Playing Games (RPGs) stem from the Dungeons and Dragons role-playing system.3 In this type of game, the player assumes the role of one or more 3 There are lots of similar role-playing systems; I just give DND as an example.
Role-playing games put the player in a world with many possibilities; a good RPG gives its players a sense of immersion and true interaction, and allows them to e ectively become someone else.
The quality of a role-playing game depends much more on its storyline, interaction, and depth than on its graphics. Ultima Online is an example of a good online RPG. While its graphics are not spectacular, the depth of its gameplay is incredible, because it allows for complex interactions between players in a virtual universe. Ultima is not exactly a “hard core” RPG, however; true die-hard RPG gamers often prefer other types of RPGs, such as those published by Simutronics (http://www.simutronics.com).

blinkobonus_game_300x250.gifPuzzle Games
Puzzle games receive less attention than the other game genres, but they deserve to be mentioned. Puzzle games challenge the player with problems that require thought and patience. This genre includes everything from simple box-pushing games (Boxxel and the dangerously addictive Sokoban) to the animated and
ubiquitous Tetris.
A successful puzzle game is usually challenging (but not impossible), pleasant to look at (graphics should not be ignored), and replayable (one-shot puzzle games are usually not very enjoyable the second time around, and players don’t appreciate that). The di culty involved in creating a puzzle game depends on the particular game; some are extremely complex, involving massive amounts of artwork and graphics processing, while others are simple to implement.

Multiuser Dungeons
Multiuser Dungeons (commonly known as MUDs) are massively multiplayer games, typically hosted on Internet servers and accessed with special MUD client programs. MUDs are extremely popular because one’s opponents are real people, not computer-controlled robots. MUDs are essentially text-based role-playing
games, immersing their players in worlds with magical objects, wizardry, and battle. MUD fans wishing to host a game of their own often obtain a prewritten MUD server program and develop their own “world” through configuration files and scripting languages. If they do a good job, they may attract lots of players,
which is very satisfying. Two popular MUD server programs are ROM and DikuMud, which may be downloaded from the Internet. There are untold thousands of private ROM-based MUDs on the Internet.
MUDs are relatively easy to create, though writing a MUD server is not trivial, requiring a solid background in C or similar and a knowledge of network programming. Creating MUD datafiles requires little programming knowledge but a lot of creativity. A good MUD has an interesting game world to explore and a good balance of races and abilities. Also, some MUDs are prone to “god moding,” or abuse by the person running the server; while this obviously depends on the players, good design can lessen this undesirable e ect.

If you’ve never been “mudding,” give it a try. A good MUD can provide a truly interesting experience. You can find MUDs all over the Internet; just search the Web for the word “mud.”

A Quick Look Under the Hood
Most games have a lot in common behind the scenes. The engine, or main code, of a “typical” game (if there is such a thing) can be logically divided into several subsystems: the input subsystem, the display subsystem, the audio subsystem, the networking subsystem, the update subsystem, and the main loop. These subsystems are rarely labelled as such, but you are likely to find all of these components in any given game engine. Each subsystem is most often implemented with several separate source files; two or three in small games, but easily a hundred or more in a large production. We’ll look brie y at each of
these subsystems now, and throughout the rest of the book we will explore possible ways to implement each.
This Code Is Awful!
If you ever get a peek at the code behind a major commercial game, please do not take it as a treatise on proper software design or co ding!
Games often start out as well-designed software, and they sometimes even make it to the shelves in a tolerable state of internal organization,but more often than not a game’s code falls into disarray during the last few months of development.
Why, you might ask? The gaming industry is volatile, dangerous, and extremely competitive. Game studios seem to find themselves in a perpetual struggle to meet release deadlines, get their games out ahead
of their competitors, and implement the features that players demand, lest they be left in the dust with a stack of unsold games. This often results in extremely hurried and sloppy code. Unfortunately, this often
causes serious problems if someone later tries to add an expansion pack to the game or port the game to another operating system.

The Input Subsystem
The input subsystem receives the user’s commands through an input device (like the keyboard or a joystick) and records these commands for further processing.
While input device programming is not di cult, it should be done carefully, because awed input processing can easily ruin an otherwise excellent game. The first version of Apogee’s Rise of the Triad (a first-person shooter from several years ago) su ered from particularly bad input handling, and the game was
aggravating to play until this problem was fixed.
One of the input subsystem’s most important jobs is to simultaneously support a variety of input devices. A well-written input subsystem should be able to integrate just about any type of oddball game controller with minimal e ort (this is made a bit easier by libraries like SDL, but it’s still something to keep in mind as you code). Some players prefer to use joysticks rather than mice, and an input subsystem should be able to accommodate this preference without modification to the main game code. As far as the game is concerned, the joystick should appear as a generic device, capable of producing “left,” “right,” “up,” and “down” commands. We will discuss SDL’s input handling and abstraction in Chapter 4, and we’ll touch on the lower levels of input handling in Linux later on.
Nearly every game on the market allows you to remap the keyboard and other input devices to your liking, and this is a feature that players demand. Many people have non-US keyboards with di erent key locations, and you’ll end up cutting o a lot of would-be players unless you allow them to configure the game
to work with their keyboards. Fortunately, this is not di cult; it can be accomplished with a simple lookup table. It is also a good idea to allow the player to store and retrieve multiple key mappings, in case a friend prefers a di erent configuration.

blinkobonus_game_728x90.gif

he Display Subsystem
The display subsystem conveys the game’s status to the player in a visually impressive way, whether through simple 2D graphics, or advanced 3D rendering (the type of graphics you use doesn’t matter, as long as they are appropriate for the game). Regardless of the type of graphics produced by the display subsystem, the structure of the code is substantially the same.

The display subsystem is responsible for taking advantage of the available display hardware. Serious gamers often equip their machines with snazzy 3D graphics cards, which can bring enormous performance and quality improvement to 3D games. However, this performance boost is no t automatic and requires special e ort by the programmer, which is usually accomplished through an API (application programming interface, essentially a big library of routines) like OpenGL. 3D acceleration is beyond the scope of this book, but we’ll
demonstrate how to get OpenGL up and running in Chapter 4.
Before you can show o your graphics code, you’ll need something to display.

Although it is common for programmers to develop temporary artwork for testing purposes, few are skilled artists, and they usually find it necessary to enlist the help of a skilled digital artist to produce acceptable game artwork.
Players are a finicky bunch, and they are most intolerant of subpar graphics.
Game programmers should spend a great deal of time developing a good graphics engine, and a designer should place a high priority on obtaining quality artwork for a game.

The Audio Subsystem
Although computer audio technology has not been hyped as much as computer rendering technology during the past few years, a game’s audio subsystem is every bit as important as its graphics subsystem. Fortunately, producing high-quality sound on a computer is not as di cult as producing high-quality graphics.

Sound is easy to play back (usually a simple matter of a few function calls with a multimedia toolkit), but creating production-quality sound e ects for a game is as much an art as creating graphics, and should be left to a specialist. Stellar sound e ects can boost a game’s atmosphere, and lousy sound e ects can
seriously damage a game’s potential.
3D enhanced audio is one of the latest trends in computer sound technology with modern sound cards (like Creative’s SB Live! series) supporting four-speaker surround-sound, and 3D-aware sound-processing to simulate the Doppler e ect and other complex sound wave interactions. (Simple two-channel stereo sound
just falls short of the immersive environments of today’s 3D games.) In fact, some sound cards can even accelerate these e ects in hardware.
The Network Subsystem
Multiplayer gaming is very popular these days, and it is reasonable to assume that this trend will continue. The network subsystem connects a game to other computers over a network so that multiple players can participate in the action.
Network programming is not as di cult as it used to be, especially with the advent of the Internet as we know it. Still, the network subsystem must be extremely robust and exible, as, not surprisingly, gamers are rather intolerant
of network failures during games. Basically, the network subsystem informs the other computers in a network of
the current state of the game so that the players stay synchronized. This can be quite a trick, and so it is wise to develop the game with network capabilities in mind. You may find that a networking library such as Apple’s OpenPlay makes this job a bit easier.
Above all, do not implement network support as an afterthought, because it often a ects the entire design of the game. Decide whether your game lends itself to netwok play and build this requirement into the fundamental game design; doing so will save headaches later on when the designer invariably demands that multiplayer capabilities be added.

The Update Subsystem
Games generally have to track a lot of rapidly changing data, including the state of the player and the condition of each enemy—information that must be updated frame by frame to keep the game moving. The update subsystem manages this data.

The update subsystem is the game’s b