Archive

Why you need a Linux Netbook now

Here are 10 really useful reasons to justify why you need a new Linux Netbook from eRacks.

Besides, a contributing member of this technological society is required to stay well-connected at all times. And in this economy, cost-effectiveness is imperative.

Top Ten Reasons why you need a Linux Netbook

  1. Lighten your load without compromise. The average laptop weighs 7 lbs. The average netbook weighs 2.5 lbs. How’s your back lately?
  2. Save money. The average laptop costs $1500+ while netbooks range from $300 to 500$.
  3. Take it with you and don’t get lost. Connect and find your destination. Google maps is a lifesaver.
  4. Keep in touch, even when you’re out. Connect with Facebook, Twitter, and Meebo.
  5. Finish your document/spreadsheet/presentation/homework at the cafe – eRacks Netbooks come with OpenOffice and many other useful applications.
  6. Waste time more effectively. Catch up on LolCats and then watch all the cat videos on YouTube. After all, isn’t that the underlying purpose of the Internet?
  7. Keep your job (or find a new job.) Manage your servers remotely anytime.
  8. Watch a film or video clip through your home network or from Hulu, in your favorite chair.
  9. Save a little more money. Find that book cheaper than in the store and order it.
  10. Portable Webcam possibilities are endless. Update your blog in real time.
  11. Bonus reason: eRacks is having a sale on rackmount servers that could likely save you the cost of a Netbook anyway.

Linux – a Premium, Secure and Unrestricted Alternative

At one point or another, you’ve probably asked yourself why you continue to spend hundreds (or perhaps thousands) of dollars on Microsoft products, especially in the downward economy we find ourselves faced with today. It could be that you’re worried about having to learn a new and unfamiliar environment. Or, maybe you feel that there aren’t enough applications available for anything other than Windows to justify switching to something else. Perhaps you’ve already invested a substantial amount of money in software that runs on Windows and don’t want that investment to go to waste.

Whatever the reason may be, there’s never been a better time to migrate away from proprietary software and make the move to Linux, a premium open source solution. Not only are the arguments outlined above irrelevant to the current technological climate, there are many other exciting reasons to consider giving Linux a try.

Linux Does More “Out-of-the-Box,” and It’s all Free!

After installing Microsoft Windows, your first task will always inevitably be to install a lengthy suite of applications before being able to do anything productive, and by the time you’ve finished, you’ll have potentially incurred hundreds of dollars in additional licensing costs. By contrast, any popular modern Linux distribution will come bundled with an office suite, fully-featured mail client, system administration tools and a host of other applications, saving you hours of installation time, all at no added cost. Even if you use a commercial Linux distribution with a price tag to match, the software bundled with it is almost always free and open source, meaning that you pay no extra licensing fees.

Thousands of Additional Applications, all Ready To Install at the Click of Your Mouse

We’ve all gone through the lengthy process of installing our initial set of applications, just to discover that we’ve either forgotten something or that we have additional needs. If you’re a user of Microsoft Windows and proprietary applications, you’ll get to fork out even more money, and be faced with the daunting task of manually downloading executable files and/or swapping CDs back and forth, with every installation method differing significantly from the last.

If you’re a user of Linux, with a few clicks of the mouse, you’ll find thousands of applications, all available from a single repository, ready to automatically download and install. Oh, and have I mentioned that they’re all free?

Running Windows Software on Linux

“I want to use Linux, but there’s one crucial application that’s holding me back.” Those of us who have moved away from Windows know all too well the pain of leaving behind old (or perhaps not so old) software investments. Whether it’s an in-house program for your workplace, an office suite or even a favorite game, you don’t want to lose your ability to run legacy Windows software.

This used to be a very good reason for abandoning open source migration efforts, but fortunately, it’s no longer a serious issue. The WINE project (http://www.winehq.org/), which represents fifteen years of hard work and dedication on the part of open source developers across the globe, has grown to be a very mature, nearly drop-in replacement for the Windows environment, and runs quite a few Windows programs out-of-the-box, including Microsoft Office. In addition, those applications that don’t will often run with minimal tweaking, and for those situations where native Windows libraries are required to make an application work, you have the option of using them in place of or in addition to WINE’s own bundled libraries.

For those rare instances where WINE fails to meet your needs, Linux sports a competitive suite of virtualization solutions (for more information, look up KVM or Xen), which will enable you to run a properly licensed Windows installation on top of your Linux environment at a level of performance comparable to that attained by running Windows natively on hardware.

Security and Your Peace of Mind

Anybody who’s had to manage a Windows machine will know what a hassle it is to have to keep up with anti-virus and anti-spyware updates, and how worrying it can be when we learn about new critical vulnerabilities that could result in a malicious third party gaining control of our software.

By using Linux, you have the dual advantage of working on a minimally targeted platform and of working on a platform that was built on a solid, simple and time-tested security model. Unlike Windows, there is little if any real need for anti-virus software (unless you’re running a mail server that hosts messages which might be read by people using Windows.) In addition, due to the rapid pace of open source software development, if a security vulnerability is discovered, a fix follows quickly. Instead of relying on any single organization to inspect and patch their code — a single point of failure, you have an entire global community with access to the source code, eager to support the software they maintain with a passion for writing good code.

Conclusion

With today’s uncertain economic climate, now is the perfect time to consider migrating to an open source solution. The arguments against it continue to dwindle as open source operating systems such as Linux increasingly prove not only to match Windows for functionality, but surpass it.

We here at eRacks specialize in open source solutions, and are ready to cater to your needs. Whether you’re purchasing servers or desktops running open source software, or you’re looking for help with your open source migration efforts, eRacks provides the services you need to get the job done.

Putting SSH Keys to Work

There may be situations where you’d like to login to a remote machine via SSH and not have to enter a password to do it. Perhaps you have some sort of automated file transfer that makes use of SCP. Or, perhaps you frequently login to the same machine and get tired of having to enter a password each time. Whatever the reason may be, an attractive alternative to using passwords involves making use of cryptographic keys.

To give you a general idea of what’s involved, you’ll first generate a public/private key pair. Your public key is what you would copy to every machine you want to be able to log into. You can think of the public key as the lock on a door to a house. The reason why we call this a public key is that it’s safe to share it with the public, just as the lock on your door is safe to display from the outside. By contrast, your private key can be thought of as the key that fits into the lock. Unlike your public key, you should never copy it to machines that are either untrusted or to machines that you yourself don’t administer — this would be a bit like placing the key to your front door outside your house for strangers to use! Anybody who possesses your private key can access every machine to which you’ve made your public key accessible, so exercise extreme caution and guard your private key with your life.

SSH makes generating your keys very simple. From the command line, you’ll simply enter the following command:

$ssh-keygen

You’ll then be asked a series of questions. Accept all the defaults. If you don’t desire to password protect your key pair (which would require you to enter a password when you use it), hit enter when asked for the password, without typing anything in. At the end of the process, you should discover two new files in ~/.ssh, id_rsa and id_rsa.pub, where ~ stands for your home directory. From here, you’ll copy your public key (id_rsa.pub) to every machine you wish to log into and append its contents to a file called ~/.ssh/authorized_keys, where ~ stands for the home directory of the account you wish to log into.

To test your newly generated key pair, try to connect to one or more of the remote machines you copied your public key to. You’ll find that you’re sent straight to a command prompt, without the need for a password.

Now, there are situations where using keys without passwords can potentially be hazardous, so some significant thought should be given to the circumstances in which your key pair will be used. For example, I will never copy my laptop’s public key to my personal server at home, because if my laptop is ever stolen, the thief (if he knew how to use *NIX) would not only have access to all my local data, but would also have complete SSH access to my network at home, since he would have my laptop’s private key. Thus, I choose to sacrifice convenience for security in that particular situation. As with all things in life, the amount of relative security versus convenience is a trade off, so make sure you choose wisely.

Enjoy!

Ubuntu LiveCD Won’t Boot? No Problem!

This blog is the result of at least two hours of pain and suffering while trying to boot off of an Ubuntu-based CD. If it saves even one person from the same laborious fate, it has served its purpose.

How many times have you attempted to boot from an Ubuntu CD, only to find yourself sitting in front of a very intimidating (initrd) prompt with no clue as to why the system failed to boot or how to fix it? Unfortunately, the causes of this dreaded phenomena are many, which often makes troubleshooting this problem very difficult. I myself have run into this issue on occasion, though up until a couple weeks ago it had never been caused by anything too difficult to fix. Most of the time it was simply a matter of using unsupported hardware. That all changed with my latest install.

Now, before I go any further with this, I should probably note that the distribution I had trouble with was NOT Ubuntu; it was an Ubuntu derivative, Eeebuntu, developed by a third party that is not in any way affiliated with Ubuntu. In fact, I later tried installing from an official Ubuntu CD and it booted just fine!

That being said, it’s quite possible that you have found yourself faced with the (initrd) prompt on at least one occasion. If so, you hopefully figured out what went wrong and were able to fix it. But, what if you’ve exhausted all of your obvious options? It’s quite possible that you’ll ask questions on the Ubuntu forums, only to find that nobody has an answer that solves your problem. That isn’t in any way meant to disparage the Ubuntu community. In fact, I think you’ll find that the forums are very helpful and that the community is very friendly and knowledgeable. Rather, it’s quite possible that, for whatever reason, you’ve run into a problem the community hasn’t yet encountered or been able to solve, which on some rare occasions may even turn out to be a bug. Whatever the reason may be, short of finding another Linux distribution, you may be thinking that all is lost. Fortunately, there’s another way!

When you see the (initrd) prompt, it’s because, for whatever reason, Ubuntu was unable to find or mount the root filesystem. The solution is to manually do the mounting for the Ubuntu CD. Assuming you can get the filesystem mounted, you should have no problem breaking out of what at first glance may have seemed to be a hopeless situation.

Now, you may be tempted to believe that the root filesystem of the Ubuntu CD is the same root filesystem you would see after booting the Ubuntu LiveCD, but that’s actually incorrect. Ubuntu uses a special compressed filesystem called SquashFS. If you mount your Ubuntu LiveCD, you should find it in /path/to/cdrom/casper/filesystem.squashfs. With this information in mind, we can proceed.

Step 1: Manually mount the CD

From the (initrd) prompt, manually enter the following command:

mount /dev/scd0 /cdrom
(scd0 should be replaced by the device name that refers to your optical drive.)

If you can’t find a device name for your optical drive, that may be why the initrd (short for initial RAM disk) failed to mount it. If you’re sure there’s no device in /dev for your optical drive, copy the contents of the Ubuntu disc to an external hard drive or USB thumb drive (either should be recognized immediately by the initrd after being plugged into a USB port.) Mount it instead of the CD to complete this step. To do so, use the command:

mount /dev/your_device /cdrom
(note that the device name usually shows up as sda1, sdb1, sdc1, etc.)

Step 2: Manually mount the root filesystem

Again, from the (initrd) prompt, enter the following command:

mount -o loop /cdrom/casper/filesystem.squashfs /mnt/root

At this point, things may or may not get tricky. Most likely, the command will be successful and you’ll be ready to continue booting the Ubuntu LiveCD. If that’s the case, skip directly to step 4.

Step 3: I can’t mount the root filesystem; HELP!

It’s possible that you’re more than just a little unlucky, and that for some very strange reason that I haven’t yet figured out, you don’t have support for loopback devices. Fear not! You will have some extra work to do, but the following steps should work just fine.

First, you’ll need access to another Linux machine. You’ll also need a spare hard drive or USB thumb drive. Please note that if using a thumb drive, you’ll need one larger than 2GB, as the SquashFS filesystem included on the CD will take up more than 2GB of space when decompressed. Finally, make sure that squashfs support is installed on your system, as it most likely isn’t by default. Depending on your Linux distribution, yo u may or may not have to patch your kernel and compile the squashfs module manually. If you’re using a distribution like Ubuntu, you shouldn’t have to.

Now, mount the block device you’re going to extract the filesystem’s contents to (we’ll refer to it henceforth as /dev/sda1.) We’ll assume for the sake of this tutorial that we’re mounting it to the directory /mnt/tmp. To do so, you would enter the following command:

mount /dev/sda1 /mnt/tmp

Next, we must mount the SquashFS filesystem. Assuming we’re using the mount point /mnt/squashfs, we would do so with the following command:

mount -o loop /path/to/cdrom/casper/filesystem.squashfs /mnt/squashfs

Finally, copy the contents of /mnt/squashfs to /mnt/tmp. Note that simply using the command cp will result in symbolic links being treated as real directories, which is not desirable. Instead, we’ll use tar and pipes. Enter the following commands, in order:

cd /mnt/tmp
tar -jcvp /mnt/squashfs/* | tar -jvxp

When the above commands are completed, enter this one last command:

mv /mnt/tmp/mnt/squashfs/* /mnt/tmp; rm -rf /mnt/tmp/mnt

Now, just unmount the volumes and you’re done!

umount /mnt/tmp
umount /mnt/squashfs

Step 4: Success!

At this point, you’ve succeeded in mounting the root filesystem that, for whatever reason, was unable to be mounted automatically by the LiveCD. Just type the command “exit” from the prompt and watch as Ubuntu continues where it left off. Note that you will no longer have a splash screen during the boot process, so expect to see the output of init for a few seconds as it starts background processes before seeing a graphical login.

Wrapping Things Up

Hopefully, this blog will prove useful to someone. Even if you haven’t run into this issue before, it’s good information to have on hand for the day when that changes. In addition, the techniques outlined in this blog aren’t just useful for getting a cranky LiveCD to behave. If you’re using a device that’s bootable via the BIOS but which isn’t supported by Ubuntu, and you’d rather not take the time to modify the LiveCD to make it work, simply follow the steps above to copy the contents of the CD to another device and manually mount the real root filesystem.

Custom-Built Quiet Machines: No Job Too Tough!

Hello again.

It’s Max, your favorite Op. Manager here at eRacks. Today, I am going to talk a bit about quiet computing, something eRacks knows a lot about!

In today’s world, not every small business, home office, studio or gaming lounge has the ability to put up with what sounds like twin 747s taking off right next to you. However, proper cooling is paramount, and for some reason, quiet and cooling seem to be at opposite ends of the spectrum, much like chaos and order, orcs and humans, or tofu and steak.

Performance vs. Decibel Level

So, you ask, what can I do? You could buy low power embedded designs like Via, but then you sacrifice performance. You could buy liquid cooling, which we like, but there is a chance of it leaking if you decide to move it or if you don’t take good care of the pump and tubing. By contrast, you could do what we do, which is to find the best components for the job. Unfortunately, I can’t give all the company secrets — I would probably get punished by a very intimidating penguin (or spiky blowfish) if I were to spill the beans.

An eRacks customized quiet computer

Specialized Low-Noise Components

A SilenX Quiet Fan

A SilenX Quiet Fan

However, I can provide some generalities. First of all, we have a great partner in SilenX that provides fans and power supplies with super airflow at a noise level that is almost undetectable! We also know the power of rubber, grommets and hard drive placement. Dual or triple layered walls and chambered chassis also help to reduce noise, and if you are really serious, use foam and vibration dampening.

Quiet and Overclocked ?

eRacks can help you avoid spending hours testing and retesting combinations of components, in your effort to achieve quiet computing. We may be one of the few vendors that is known for our customized quiet systems with overclockability, for rendering, gaming, simulation or studio work. Even, say, Quad-core CPU with SLI graphics (overclocked), yet still quiet? It can be done, and done well. Also, eRacks’ cooling and quietization process is warrantied – Try finding that elsewhere – Not going to happen!

Lower Electric Bill

Added benefit: Quiet computers actually require less power and save money. Adjusting the voltage of certain components lowers the load on the power supply, which in turn lowers your energy bill.

This eRacks chassis has rubber grommets for vibration dampening, isolated PSU, and fan speed-controllers.

This eRacks chassis has rubber grommets for vibration dampening, isolated PSU, and fan speed-controllers.

Audio Bliss

In audio or production settings, any bit of noise or interference can turn a master work into something that goes straight to the trash. By quietizing your computer, you can avoid vibrations and fan noise that would otherwise make your Mozart sound like, well, amplified intestinal vocalizations.

Advancements in cooling, thermal wattage, performance and piping technologies have made it so that eRacks has perfected the art of constructing a quiet monster-gaming, or audiophile computer system. eRacks has numerous configurations, special designs and company expertise that gets it done within budget and exceeds expectations.

Silence, customized

If you have any questions or comments, want a more in depth idea about what we do, or if you have a configuration you think we can help you on, just let us know. I personally can help you out with whatever questions you have, and the rest of the eRacks staff is happy to discuss your options. Next time someone shows up at your LAN party with their dual CPU box that sounds like a tank rumbling over a heard of screaming shrews, just remember, eRacks can build a similar system that’s quieter than a graveyard at midnight (which is where your opponent’s avatar will end up when you no scope him from across the screen.) No hacks; just pure performance, cooling and engineering to provide you the very best in rendering, gaming and application-based work.

Max, signing out.

What’s your dream developer system?

We at eRacks are designing a new model geared specifically toward the developer, and want to hear from you, the customer, about what you would like to see in the system (please leave detailed comments for this blog post!)

We’ve been batting around a few ideas, both software and hardware related, and would like to share them here for your consideration.

1. IDE, Revision Control System and your Operating System of Choice

Our development model would (of course!) come pre-installed with the best in open source development-related software. Do you have a favorite IDE, or do you prefer to simply invoke your text editor, compiler and makefiles directly? Would you like us to install a revision control system such as CVS, Subversion, Mercurial or Git? What’s your operating system of choice? Are you a fan of Linux, FreeBSD, OpenBSD, NetBSD, OpenSolaris, etc.?

2. What Kind of Developer are you?

While there are usually at least some applications common to most developers, a great deal of the software you’d like to be installed will probably depend significantly on the kind of development you do. Are you a kernel developer? If so, we’ll install the kernel source and headers for you. Are you an applications developer? If so, are there any open source libraries you’d like us to pre-install for you? What about you web developers out there? We could, at your option, install a local web and database server for testing purposes, as well as your scripting engine of choice (PHP, Ruby, Python, Perl, etc.) Do you not fit exactly into any of these categories? Have we missed something? Let us know!

3. Hardware

Do you prefer to develop on a laptop, or do you like to do your programming on a desktop machine? What would you think about having the option of two or more monitors to help you spread out your work, configured to your unique specifications (would you like 2 or more individual displays, or 2 or more monitors tied together into a single virtual display?)

Anything we haven’t mentioned that you’d love to see in a development-specific model? Again, just let us know! Be sure to leave us a comment sharing your thoughts.

Recession-Proof Your IT Infrastructure

from The Open Source Newsletter – July 2008

Aside from all the usual green advice, what can a conscientious SysAdmin do to save money during this time of rising energy prices and a challenging economic situation?

Here is eRacks’ top-ten list of recession-proofing strategies:

  • 1 – Update the Linux OSes if they are older than kernel 2.6.21, to take advantage of the ACPI tickless idle. Install PowerTOP (on Intel-based desktops & notebooks) or other similar tools that examine power consumption by application.
  • 2 – Basic maintenance: vacuum the vents (from the outside of the chassis, with the computer off). The buildup of dust and dirt prevents airflow. After cleaning, the systems will cool more easily. The vacuum and/or the little bottle of compressed air are your friends. A word of caution though: don’t even think about reversing the vacuum to blow the dust inside the computer case. The household dust inside the vacuum is not a good thing for the computer (or you). In fact, don’t stick the vacuum inside the computer case at all, since vacuums create static electricity which can also damage your system.
  • 3 – Re-think your network diagram. Old systems are often wasteful of energy.
    • Consider consolidating systems; Own your own virtualization system:
      eRacks/SOLO and eRacks/SUITE are capable of running several virtual machines simultaneously.

      eRacks/SOLO Virtualization Server

      Your physical host server can be configured with your choice of a virtualization host, including the freely available version of VMWare or Linux-native KVM (Kernel-based Virtual Machine), as well as a large number of possible virtual operating systems and applications, including web, DNS, email, proxy and other infrastructure services.

      You’ll save power, save money, and also allow for more centralized administration and ease of backup. eRacks will even pre-install the targeted configurations of your choice. Just ask.

    • Or take advantage of a hosting solution like Libre Hosting. Get full (root) use of your own virtual server fast. This is a great way to test out a new project, minimizing both your financial investment and configuration effort.
    • Or use newer low power servers like the eRacks/LITE, eRacks/QUIET, and any of our desktop line. eRacks will happily customize a system for low power usage, with your requirements.
  • 4 – Plan for upgrades. Buy systems that use only industry-standard components (like eRacks!) so that you can upgrade without being tied to a manufacturer and higher prices.
  • 5. Plan for efficient scaling. This depends on the most likely way(s) your company/institution would require expansion in the future. An increase in number of users, production, machine power, etc would each create different infrastructure requirements. Planning longer term, could enable growth while minimizing costs. Using hosted virtualized servers could allow for more flexibility in scaling, up and down, – very handy in peak demand time.
  • 6. Rethink security and firewalls. Use preventive measures now, rather than costly fixes later. Read summaries of firewall logs to gauge how busy your firewall system is. Consider options like eRacks’ failover redundant firewall:

  • eRacks/TWINGUARD Redundant Firewall

  • 7. Update your sysadmin tools. Make a bootable DVD or USB drive with your favorite sysadmin utilities on it. Save time by setting up system monitoring and detect any issues before they become big problems.
  • 8. This one is for the marketing/sales dept: Find clients that are recession-proof. Where are your main profits coming from? Do you have a few clients in markets that are recession-proof? If not how can you attract those clients, now and get on their vendor lists? – Educational institutions are usually somewhat stable in their purchasing because people tend to return to school in times of a recession.
  • 9. Again to the marketing guys: Globalize your products and presentation. Keep in mind that a weak dollar may increase your international customers.
  • 10. Always wise: Keep notes – keep an internal company wiki. From our experience, this can be a great tool and reference, saving time, effort and money!

Remember, recession isn’t permanent, but can be long. And playing it smart now will help, and quite possibly make all the difference.

Six Tips for Effective Virtualization Security

A secure environment is absolutely crucial for a virtualization server connected to the Internet. If the host is compromised, all its virtual machines are at risk and their services will be affected.


eRacks virtualization experts have put together a useful list of security considerations for virtualization migration planners. TIP #1. Use an open source virtualizer if possible. Open source software vulnerabilities are documented clearly, are well-known, and fixed quickly.
Proprietary-software bugs usually take longer to get fixed, and are even sold on black markets for illicit hacking. In fact, there are documented cases of closed source software companies purchasing security hole information of their own applications. Open source software vulnerabilities have less value on the black market, because of their shorter shelf-life.
TIP #2. Use open source guests wherever possible. New drivers for open source applications improve security as well as performance. Open source guests are more cooperative with the host, leaving less room for attack. Windows is inherently less secure, since a – it is closed source and updated less frequently. b – widely used and thus a big target. c – statistically has more severe vulnerabilities than open source OSes which take longer to fix.
TIP #3. Minimize the host footprint, making less surface area available for hackers. A small target is harder to hit than a large one. eRacks typically recommends KVM because of its small footprint, simple design, and ease of use.
The virtualization host provides services in the form of ports and packages, which should only include those required by the VMs. An effective security plan should minimize the number of open ports, narrowing the possibilities of illicit entry.
TIP #5. Use an external physical firewall. It is also possible to use a virtualized firewall, running as a guest, but it can only protect the downstream systems, and not the host. A virtualized IP-less bridging firewall is also possible but it is more difficult to implement, and still doesn’t protect the host. The safest solution is an external firewall, such as the eRacks/TWINGUARD, a redundant 1U system, with failover, running a very secure OpenBSD.
TIP #6. Assess your security level, including regular port scans (Nmap), and OS fingerprinting, keeping track of any changes. A hardened system will not give out versions of running services, otherwise it would be too easy to know exactly where the vulnerabilities lie. eRacks can give you a head start by building, installing, and configuring your system for you. Your physical host server can be configured with your choice of a virtualization host, including the freely available version of VMWare or Linux-native KVM (Kernel-based Virtual Machine), as well as a large number of possible virtual operating systems and applications, including web, DNS, email, proxy and other infrastructure services.
virtualizer description complexity level of open source
KVM built into the kernel, uses the standard Linux scheduler, memory management and other services simple, non-intrusive, very stable, easy to administrate -
KVM hypervisor about 10-12K lines of code (2007)
released under the GNU GPL
free
Xen external hypervisor, supports both paravirtualization and full virtualization, has its own scheduler, memory manager, timer handling, and machine initialization. specially modified kernel – has 10x more lines of code as KVM => raises the vulnerability level released under the GNU GPL
free
VMware fully virtualizes using software techniques only, very good performance, stability. very large and complex; more than 10x lines of code of Xen proprietary,
player open (teaser-ware),
fees

How to Avoid Pain and Suffering when Upgrading Desktop-Oriented Linux Distributions

This article is geared toward eRacks customers who have a desktop or laptop system, i.e. a personal workstation.  It is not intended to serve as a guide for customers wishing to upgrade a server.

With the above in mind, for those who use Linux on  such a machine, your choice of distributions that cater to this niche is growing nicely.  You have the “Big Boys” such as Ubuntu, Fedora, Mandriva or OpenSUSE, as well as a host of more specialized distributions, the main focus of most being on user friendliness and “up-to-dateness.”  What this usually leads to is a faster upgrade cycle than what you would typically find on a server oriented distro such as Debian (stable), RedHat Enterprise, SuSE Enterprise or CentOS.

I myself have been tracking RedHat (including Fedora) since version 5.0, doing a mix of upgrades and fresh installs.  I have also kept up with Ubuntu since 6.04, and have had similar experiences with it.  I have found that one way of making regular upgrades easier is to keep a separate /home partition.  This way, you have a choice of an upgrade or a fresh install, without losing valuable data.

My experience, and that of many other salty seasoned Linux gurus, is that upgrading from a previous version tends to be a bit messier and usually takes longer to do than a fresh install.  This can be true, especially if you use third party repositories, if you install software not maintained by your distro package manager (DEB or RPM) or if you do a lot of tweaking.  Doing so may leave you looking at a broken system when the upgrade finishes.  For this reason, it is usually more desirable to do a clean installation and install your third party applications afterward.

How then to keep from losing your data?  Many system admins would suggest the multiple partition method, which has been used on servers a lot, yet not so much on the desktop.  The multiple partition method can have advantages and disadvantages, but since hard drives are so big these days, many of the disadvantages are no longer prevalent.

While most modern desktop distros have a default partitioning scheme that gives you just a swap partition (usually about 2x the amount of RAM, or physical memory) and a large root partition for everything else, most server configurations have multiple partitions for directories like /usr or /var, which can have many advantages.  For example: if you wanted to have /usr mounted as read-only to prevent unauthorized system-wide software installs, if you wanted to keep /boot separate for a RAID array or if you wanted to keep /var and /tmp separate to avoid corrupting the core system files; these are all examples of why one might want to make use of multiple partitions.  In this case, however, the partitioning must be very carefully planned according to the intended use of the server, what programs need to be installed, how many users will be logging in, etc.

Luckily, there is a happy medium that works well for desktops, and that is to use a swap partition with 2x the amount of RAM, a root partition for your operating system and a very large /home partition for all your data.  When you do a fresh install, all you have to do is make sure you don’t format /home, and your data will be safe across installations.  If you want to save any system-wide tweaks, you will, of course, also have to backup important configuration files and check them against their replacements, making changes where necessary.

In my case, I have a 120GB hard drive for Linux, which makes use of the following partition scheme:
20GB /
75GB /home
1GB /swap
14GB “other” (at times it has a Gentoo install, other times it has FreeBSD, depends on my mood…)

I have found through experience that this setup works well.

When I do an OS update, such as my recent one to Fedora 9, I usually backup important configuration files to /home, do a fresh install and finally install any third party programs I need.

In the past, when upgrading systems without doing a fresh install, things for me have tended to get rather wonky.  However, I have recently tried upgrading Ubuntu, and I must say that the recently improved Upgrade Manager, a graphical front end to the apt-get dist-upgrade functionality, is a nice touch.  It allows you to upgrade to the next version of Ubuntu, while still allowing you to run your system so you can go about your business as it downloads and installs all the packages.  When it’s done, you simply reboot, and voila, new version!  Upgrades on Fedora, by contrast, are still usually done by the tried and true method of booting the install disk and running the upgrade procedure.  Fedora does have the capability to do upgrades using the yum package manager, but that functionality isn’t as mature as apt-get dist-upgrade, and thus is not for the faint of heart.

So now, what if you have an existing Linux installation utilizing only a single partition and you want to do a fresh install while keeping your data safe?

Of course, you could just back your data up to a large external hard drive, but not everyone has one at their disposal.  In this case, what you could try is resizing your root partition, create a new partition for /home and copy your personal data to it before starting the upgrade.  Then, just run through the installation as usual.  This is, of course, only if you have enough space to resize.  If not, you may still require an external drive, at least temporarily, to copy your data to before starting the installer.

If you want to make use of multiple partitions on a new eRacks system purchase, just ask for it during your order.  This way, your system will be ready when the next OS update rolls around!

Matt

Useful commands for backing up filesystems

Have you ever needed to backup the contents of one or more filesystems to another machine, yet you only had a single hard drive in the machine being backed up and found that you lacked the temporary disk space necessary to create your backup before shuttling it across the network to its final destination?

As an example, when I backup my laptop, I have too many gigabytes of data to realistically store my data on DVD-R’s, and my only option is to create a tarball of the root filesystem and store it on another machine on my network. The problem is that if I try to create a backup of my laptop’s contents, I find that the resulting tarball backup is too large to fit on the hard drive along with all the data.

One solution that I’ve found to this problem is to avoid storing the backup on the source machine altogether. Through stdin and stdout, along with the magic of *NIX pipes, we can stream the data in realtime over to its destination, and only then write it to disk.

Before we begin, it is very important to note that in most situations, you’ll have to boot into another environment and manually mount your partition before proceeding, particularly when dealing with an operating system’s root filesystem. Otherwise, not only will tar choke on certain directories like /proc and /dev, the contents of the disk will also continue to change as the backup is being made, leading to inconsistencies between the data on your filesystem and the data in the backup.

With that in mind, assuming that you have ssh installed and configured correctly on both the source and destination computers, you can create a backup with the following commands (as root):

#cd /path/to/your/mounted/filesystem
#tar -jcvp | ssh username@destination “cat > /path/to/backup.tar.bz2″

If you prefer to use gzip as opposed to bzip2, replace the above tar command with the following:

#tar -zcvp | ssh username@destination “cat > /path/to/backup.tar.gz”

Now, let’s say that you’ve created a new partition and want to restore a previous backup. Again, assuming that ssh is configured properly on the source and the destination machines, and assuming that you’ve mounted your partition, you would recover your backup with the following commands (again, as root):

#cd /path/to/your/mounted/filesystem
#ssh username@destination “cat /path/to/backup.tar.bz2″ | tar -jvxp

If the backup is a gzipped archive, then replace the above tar command with the following:

#ssh username@destination “cat /path/to/backup.tar.gz” | tar -zvxp

Note that the user specified by ‘username’ above should have read/write permissions on the directory where the backup is to be stored for this procedure to work.

The astute reader will probably notice the missing -f option, which one usually passes to tar. The reason for this is that it tells tar to write its data to, or read its data from, a file. However, by ommitting it, we tell tar to send its output to stdout, or to receive its data from stdin when reading from an archive, which allows us to make use of pipes. It’s situations like these where the power of *NIX really shines!