Monday, November 5, 2007

Install Ubuntu

Here I'll go into the steps of installing Ubuntu using the live cd. I'm assuming you are running a desktop PC and currently have Windows XP installed. If you are running a laptop, these steps shouldn't really be any different. If you currently have a different OS besides Windows XP, such as Windows Vista or Mac OS/X, you are going to have to do things a little differently.

STEP 1: BACK UP IMPORTANT FILES AND DOCUMENTS!

This cannot be stressed enough. Any time you're doing any crucial changes to your system, you should make sure you have any important personal files saved to an alternate media. You can use CDRs, DVDRs, flash drives, external hard drives, tape drives, etc. I have an extra hard drive in my machine where I keep all my personal files and I put operating systems on the smaller hard drive.

STEP 2: Understanding Partitions and Filesystems

Don't know what partitioning a hard drive(HDD) entails? You could probably guess by the term used. Partitions on a hard drive are separated parts or volumes(wikipedia).

To begin understanding how a hard drive works, I think it's better to learn that there are two parts to a HDDs disk space. The first 512 Bytes of a hard drive is reserved for the Master Boot Record(MBR), which can't be partitioned or used to format with any kind of filesystem or personal data(wikipedia). The MBR is reserved to index the rest of your hard drive so that your system knows where to go on the HDD when you boot it up. After this first 512 Bytes, the rest of the disk space can be modified to your liking. I'll go into explaining the MBR later.

Creating partitions is like taking a great big room and turning it into multiple rooms. If you delete data in one partition, it doesn't affect the data in the other partitions. A partition has to be at least 512 Bytes big(why you would want a partition remotely that small is beyond me, but it's good to know this fact). So, theoretically, depending on how many 512 Byte chunks you could break your disk space into, that's how may partitions you can have on your hard drive. Obviously, creating 512B partitions is quite unreasonable.

I don't want to confuse you. 512B is the smallest you can make a partition. You can make a partition as big as you want, depending on how much disk space there is available. If you bought a new hard drive and there was 80GB of free space, you could make one partition 80GB big if you wanted to.

There are 3 different types of partitions: primary, extended, and logical. This is a simple concept, yet it can be tough for one to explain and another to grasp. A HDD can only be broken up into 4 primary partitions. An extended partition is a type of primary partition. The difference is that an extended partition houses logical partitions. Think of it as a primary partition that can be divided and the divided parts are the logical partitions. It's like a room with multiple cubicles in it. The room is the extended partition and the cubicles are the logical partitions. However, there can only be one extended partition. So, if you had 4 rooms and one of them had cubicles in it, you can't have cubicles in any of the other rooms. You can create as many logical partitions as the extended partition can hold.

To sum things up:
  • there can be no more than 4 primary partitions
  • one of those primary partitions can be an extended partition
  • you can create as many logical partitions as the extended partition can hold


As I hinted before, this does not mean that you must have 4 primary partitions. Usually, if you buy a pre-built PC with Windows installed, there will be only one primary partition covering the entirety of the HDDs disk space. You can even make that one partition an extended partition and use all the space to make one logical partition. However, note that Windows will not run on a logical partition, it requires a regular primary partition(I'm not sure about Mac OS/X, but Linux distributions can be installed on logical partitions).

Once you have a partition created, you must format it with a filesystem before any data can be written to it. A filesystem is
"A data structure or a collection of files. In Unix, filesystem can refer to two very distinct things, the directory tree or the arrangement of files on disk partitions." - http://www.emulex.com/support/glossary.htm

This definition points out how the term "filesystem" can be confused with the file hierarchy of an OS. "Filesystem" can refer to the way data is stored to a partition, or how the files and directories are arranged and organized in the OS. I'd rather use "file hierarchy" for the latter. Generally, different filesystems work in the same way. The only big differences are the speeds an OS can work and features like journaling(which helps an OS recover from a crash).

img

There are many different types of filesystems out there. Windows used to use FAT(File Allocation Table), first with the 16 bit version(FAT16), and then the 32bit(FAT32). This format can still be used, but newer Windows operating systems run better on NTFS(New Technology File System). Like there are different distributions of Linux, there are different types of filesystems Linux can run on. Currently, the most popular is "ext3." I'd suggest using this type for a few reasons, one because it's stable, another because there is a driver that allows an NTFS filesystem to communicate with it.

STEP 3: Determine Your Current Partition Table

There's a Disk Management tool for XP, but I wouldn't suggest using it, let alone learning from it. Partition Magic is pretty popular among Windows users, but I'd suggest using Gparted for a few reasons, besides the fact that it's free. You can find the latest version of Gparted by clicking here. Once it's done downloading, you do the same thing with it as you did with the Ubuntu Live CD.










I'M STILL WRITING ON THIS, PLEASE COME BACK

STEP 3: Prepare Your HDD

STEP 4: Install Ubuntu



https://help.ubuntu.com/

Friday, November 2, 2007

Try a Linux Distribution

Have you heard of Linux but have never seen it or tried using it? This post will explain how you can test drive Linux without having to install it on your system's hard drive. But first, I'll explain a few things so you'll have a better understanding of what's going on.


PART 1: A Basic Understanding of Operating Systems

For those who associate Microsoft Windows or Mac with the word "computer," I'll briefly explain what a Linux distribution is. Windows, Mac OS/X, and Linux are operating systems(OS). To make things simple, an operating system turns the binary
language(1s and 0s) a machine uses into something a human can understand, use, manipulate, modify, etc.

There are a few layers that make up an OS. One of these layers is called the "kernel." The kernel is the nucleus of an OS. An OS allows a user to interact with a machine's hardware through the use of software. The kernel is responsible for managing communication between the machine's hardware and software.


http://en.wikipedia.org/wiki/Kernel_(computer_science)
http://searchenterpriselinux.techtarget.com/sDefinition/0,,sid39_gci212439,00.html

Windows is probably the most popular of examples of a proprietary OS. The layers that make up the Windows OS are protected from manipulation or modification by anyone other than Microsoft. Linux, on the other hand, is maintained by the open source development community. That is, its source code, including its kernel, is free to the public to copy, manipulate, and use to make an OS to one's liking. As a result, there are a myriad of Linux distributions(a distribution is often called a "distro"), created by different groups and individuals.

http://en.wikipedia.org/wiki/Linux
http://en.wikipedia.org/wiki/Linux_kernel
http://en.wikipedia.org/wiki/Free_software


PART 2: Why Use Linux Over a Proprietary OS?

There are a few reasons why running a Linux OS has more advantages over running a mainstream, proprietary OS like Windows. The first reason, which probably hits home ANYWHERE, is that most Linux software is FREE. However, the term used here doesn't just mean that you don't have to pay anything for it, even though most sofware is free of charge. GNU, a free software organization, put it well by saying,
"'Free software' is a matter of liberty, not price. To understand the concept, you should think of free as in 'free speech,' not as in 'free beer.' Free software is a matter of the users' freedom to run, copy, distribute, study, change and improve the software."


Free software includes the freedom to run a program for any purpose, the freedom to study how a program works and adapt it to your needs, freedom to redistribute copies to family and friends, and the freedom to fix or improve a program and release your improvements to the rest of the free software community so that everyone benefits. GNU calls these the "four freedoms."
http://www.gnu.org/philosophy/free-sw.html

A large reason why using a free-software OS is more beneficial over using a proprietary OS is for security reasons. Most people don't seem to understand this concept, even those who really should. To run an OS like Windows, you better have an antivirus program, as well as some sort of adware/spyware removal program. Using a Linux Distro, this is really not needed because it is more secure.

Why? How? Because it is open-source. A big reason is because an OS like Windows is so popular, everyone and their brother uses it, so to spread a virus really has an effect. There's no single Linux OS, so writing a virus that would have any kind of punch would be hard to do. Even if a virus was written, the software is open source, meaning anyone can look at the problem and fix it. Chances are, if a virus was written, there would be a fix for it in your update manager before you even noticed anything wrong.

A virus on Windows, on the other hand, requires that you wait for Microsoft's programming team to work on a fix. How is that any different? Because there are a lot more people who maintain free software, people from almost every nation on Earth. Because open-source software is a lot easier to maintain, thus a fix is released quicker. Besides, if you think about it, why would Microsoft be in a hurry to send you a fix when they could profit off of anti-virus and other malicious content removal programs? (wink, wink) Also, let us not assume that Microsoft has nothing but rocket-scientists on it's team. Not to discredit anyone who does Microsoft's dirty work. Windows isn't something to point at and laugh about. But, open-source software has a bigger handful of professional programmers on it's side.

Another thing is that most Linux distros are usually a little more forgivable on older or less advanced hardware. For instance, I run Windows XP on a machine that has a Intel Celeron 2.4GHz processor and 512Mb of RAM and it runs, but it can chug if I try doing a couple different things at once. I run a few different distros on the same machine(including Ubuntu, openSUSE, Gentoo, PClinuxOS) and very rarely do I ever have any problems. Windows XP is a pretty sound OS, but I can't even run Windows Media Player on my machine:p However, try to run Windows Vista on a machine that doesn't have a dual core processor and at least 1.5Gb of RAM and let me know how it goes. ;)

http://www.foogazi.com/2006/12/19/5-advantages-of-using-linux-over-windows/
http://www.michaelhorowitz.com/Linux.vs.Windows.html
http://searchenterpriselinux.techtarget.com/ateQuestionNResponse/0,289625,sid39_cid557678_tax293414,00.html
http://ubuntuforums.org/showthread.php?t=20297
http://www.foogazi.com/2007/09/27/5-reasons-your-parents-should-use-linux/
http://www.foogazi.com/2006/11/10/alternatives-to-windows-programs/
A fun video comparing the Windows Vista GUI with Ubuntu's: http://justvidclips.com/view/82/vista-vs-ubuntu/


PART 3: Choose a Distro


Like I said earlier, there are dozens upon dozens of Linux distributions out there. Some of them are more stable than others. How do you know which distro to go with, or even how to get it. Distrowatch is a fantastic site for such inquiries. The site provides information on all documented distros, links to their official websites, snapshots, numerous ways of acquiring the distros, and even is updated daily with news on newly released distros.
http://distrowatch.com/

Most distros are available on Live CDs. A live CD allows you to boot an OS without installing it on your hard drive. So, you can download an OS' live CD version, burn it as an image, boot your pc with the disk and try it out before installing it. Of course, the functionality is somewhat limited and it's going to run a lot slower.

If you don't know much about Linux, I'd suggest going with Ubuntu first. Ubuntu is a distribution aimed at keeping things simple for it's users. I'll go into the steps of installing Ubuntu in the next section.

http://en.wikipedia.org/wiki/LiveDistro
click here to see Ubuntu's official site
http://en.wikipedia.org/wiki/Ubuntu_(Linux_distribution)


PART 4: Acquire and Try the Ubuntu Live CD

First, you'll need to have a disk drive capable of burning CDRs(can't imagine anyone wouldn't have one), a blank CDR, an internet service faster than dial-up(I'm only being slightly sarcastic), and a burning program capable of burning images. If you're on Windows, you can use most of the popular burners like Nero or Alcohol. I prefer using Deepburner because it's a lot smaller and easier to use. Infra Record is another light-weight program good for burning images. I'll be using Deepburner as an example when going into how to burn an image.

** When you download programs like Deepburner for Windows, you'll get an executable file(with the extension .exe). All you have to do is double click that executable to start the installer, then follow the steps.

The newest version of Ubuntu can be found at the official site:
http://www.ubuntu.com/getubuntu/download

Chances are you'll want the desktop edition and your computer is a standard x86 architecture computer. Otherwise, you would probably know. Most PCs are of 32bit. If you know you have a 64bit machine, choose to download the 64bit version. Under that section it will ask you the location to download from. Select a mirror closest to you. The individual mirrors aren't marked by specific location, just choose one from your continent and it should be fine. After that, start the download. If you're using Windows, make sure you're saving it to some location and not opening it with some program. The image file is about 700MB, so it may take a while. When it's finished, you should have a single image file such as "ubuntu-7.10-desktop-i386.iso."

If you'll notice, the last page you were on to download Ubuntu, there are some helpful links there. It's recommended that you check the file's checksum to make sure nothing went wrong while downloading. The tool to use is called Md5sum. Windows doesn't come with this tool, so you'll have to download it. There are a few places you could get it from, but the following is suggested if you're running Windows:
http://www.nullriver.com/index/products/winmd5sum

** NOTICE: You don't have to check the file's checksum, but it is suggested. If something went wrong during the download, you may be able to burn the image, boot from it, and even install from it without noticing anything until you go to run it and one of the system files aren't functioning right or such.

Once you've downloaded and installed the Md5sum program, just right click on the Ubuntu image file, go to "Send To" and you should see the option to use "winMd5sum." Click this and you're computer should start working on determining the hash of that image.

img

After it's done, you should get a window where you can compare the hash of the file with the hash provided by Ubuntu, which can be found here:
https://help.ubuntu.com/community/UbuntuHashes

If the two hashes match, then you should have a good copy. If not, get rid of that image and download another one from a different mirror.

Now we need to burn the image to a CDR. Open up Deepburner and select to "burn ISO image."

img

If you're using a different burner, the option may be called something else like "Image CD" or something. You don't want to burn a "data cd." You have to burn it as an image, otherwise your pc won't know to boot from it. In Deepburner, find where you've downloaded Ubuntu and select it. Make sure you have a CDR in the drive and burn.

When it's finished, leave the disk in the drive and reboot your PC to it. Your system's BIOS should check for bootable media before booting to your hard drive. If not, you'll have to access your CMOS setup utility and change the boot order(if CDROM is in fact before your hard drive in boot order, then you must not have burned the disk correctly). If you're given the option to press a key for boot options, you could do that as well and select CDROM. When your PC boots to the disk, you'll come to a menu with the following options:

img

Select "Start or Install Ubuntu" from the menu and it will boot to the desktop. Poke around a little bit, play around with a couple applications, read up on what Ubuntu offers. If you want to install, there's an icon on the desktop that will begin the installer. I'll go into installation in my next post.

https://help.ubuntu.com/community/BurningIsoHowto
https://help.ubuntu.com/community/HowToMD5SUM

My shared knowledge

I'll be using this as a sort of notebook, writing down anything I've learned to be shared with anyone interested. I'm not certified or employed in any kind of IT field, but I've been slowly self-teaching myself and I'm interested in possibly making a career out of it in the future.

I've learned more about Linux more than I have about Windows. I've only begun tinkering around with Windows, while I've been configuring different Linux distributions for the last couple years. I don't presume that everything I say or do is correct, I'm still learning. However, I hope my notes can be found helpful, and I'd really appreciate any feedback, suggestions, etc.