Monday, August 24, 2009

Linux and the file system

While it's not news for most people I'm studying the detail of the Linux file system. It's interesting to know about the details, so I wrote up some listings I read in my Ubuntu book.

/bin - binaries that are used by admins and normal users. Commands such as cp, mkdir.

/sbin - binaries that are used only by admins or uses with higher privileges. Such as mkfs.

/lib - core system libraries that are used for the boot process.

/usr - Short for UNIX System Resource, storing all of the noncritical binaries for the system. Normally files here do not change and normally stay the same.

/usr/bin - similar to /bin but stores binaries that are not as important.

/usr/lib - program libraries.

/usr/local - used by the admin to install software locally.

/opt - similar to /usr/local, some applications install here while others use /usr/local.

/boot - files for the GRUB and boot configs.

/etc - configuration files for system admins.

/var - files that are variable in size, such as log files.

/var/log - system logs.

/var/spool - directories for contabs, print spools and mail spools.

/var/www - root directory for web servers.

/home - location of the home directory for users.

/root - home directory reserved just for the root user.

/dev - location of the device files.

/mnt - location of the mount disk or device for temp use.

/media - similar to /mnt but typically used for removable media such as CD-ROM or USB flash.

/proc - virtual file system that resides in memory, live system information.

/sys - virtual file system that holds information about devices and drivers on the system.

/tmp - are for storing data on a short term.

For more detail about each file location visit the site Linux Filesystem Hierarchy which has a great amount of information.

Saturday, August 22, 2009

Some good job information from Microsoft

While I don't like some of the things Microsoft has done in the past, I have to give them credit for offering a lot of free videos and great tips on their sites. After searching around about certifications I found a Microsoft web site with lots of information about find a job, changing a career and where to go next.

It's focused for people in the IT world but I watched the videos and they honestly would work with anyone, it's basic job hunting skills.

The videos are under the "Get Started" section, listed as "Thrive Live" parts 1 to 3.

Microsoft Thrive - Getting Started

At first seeing all of this information focused on finding a job worried me but honestly, I like that a big company like Microsoft offers these small videos. I know they are pushing to sell their books and certifications for more sales of their software. Eh, it's still free.
Features of Windows 7

Windows 7 is coming soon and like previous versions of Windows, should be some good things and bad, mostly changes. I played with Windows 7 for a little bit, then recently I finally bought a TechNet subscription to download the other versions of Windows 7. After installing on my main workstation, I have to say that it's already more impressive than Vista.

But one feature which I have been really waiting for with Vista, is backwards compatibility with Windows XP applications. In Vista, while you could run applications as Windows XP using the "compatibility" function, I think Windows 7 went further and should work with more XP applications. I am really excited about this and once I have it installed will give it the ultimate test.

If I can install my copy of Adobe Photoshop CS2, I will be so happy! I haven't used Photoshop in so long due to both of my main computers running on Vista, which I could never get Photoshop running correctly. Ironically it was working better in Linux under Wine, than in Vista.

The download is about 500MB but should be worth it if it works. :)

Windows XP RC

Tuesday, August 18, 2009

Experience from Linux as a desktop, short term trial

In my previous posting I mentioned that I spent about 4 weeks with a Linux system as my full time computer. I still have Vista running on my notebook but my main computer is where I browse and apply for work, so it does a bunch of work for me. After the 4 weeks I wanted to write out some of the pros and cons of working with Linux and what might help out to transition Linux to full mainstream.

First, the installers of Linux has been so much better than when I first installed Linux. I think I first was exposed to Linux Red Hat version 3. I saw the box and read about it on-line but at the time was connected to the Internet with a 56K line, so downloading the entire cd set would taken hours. I instead bought the set from Fry's Electronics and begain the install process.

After installing Linux I ran into a few problem, the video card was not working, the modem did not work either (even though I bought a non-Winmodem) so I was not able to download any drivers or work around this issue. At the time I only had one computer and made things tough to get around. I think I did try Linux again later when I got broadband Internet but didn't venture further than getting the GUI to run and play some simple games.

Now after looking for work I'm finding that many jobs are asking for basic knowledge of Linux, either for Windows system admin positions or even help desk support jobs. I was also curious about getting to know Linux better. After I took a few classes about UNIX and a certification class for Linux, but really wanted to know more.

The installer now is much much smoother. My Fedora and Ubuntu installers found all of the drivers, except for the audio and video drivers but I was still able to work and access the Internet for the drivers. After locating the drivers I was able to find Linux 64bit drivers for my hardware, something a bit rare 8 years ago. I started the install of the drivers but it's not as simple as in Windows.

In Linux you will either have a run file or a gzip file for the driver download. Here's where it gets a bit technical, in order to run the files you might need to make some commands on the command line. Now, in all honesty it's very simple, just run this command and you're done but it's another part of why Linux might not be for the casual computer user.

Another problem I found was the driver install could render your desktop with the wrong display settings and the only way to change this is starting the command line start up, editing the config files and then you should be good to go. This happened to me in Fedora but not Ubuntu.

Going on to application, I feel this is where Linux shines, there are many applications that are open source and able to run typically paid-only applications from Windows. For example, I found a great IRC chat application but on Windows I always couldn't find something that would work the same AND cost nothing. I also liked that with Wine, you could run Windows applications under Linux. This includes games, basically most applications. I was able to get my Photoshop CS2 running while it does not run at all on Vista.

There are some problems with Wine, for one I installed it on Fedora and Ubuntu, Wine only worked on Fedora with no problems while on Ubuntu there were many issues. I couldn't start any Windows applications, even after patching and updating. Of course I'm sure it's a problem of configurations but shows an example of out of the box it needs some work.

What is a really nice feature of Linux is the ability to install packages using the YUM or APT-GET command. These commands pull down the application files and install the application in one command line. This really makes it easy to install most command applications or even other third party applications if you include the source of the applications.

On the topic of applications there were some issues that I found. Since I was editing my resume and sending out applications to jobs, I was often using Sun's Open Office Suite. With Open Office you can save documents as DOC but not the new DOCX format. I was working on my resume when I sent a copy to my girlfriend, after a few minutes she called that the formatting was off. To be sure, I sent the same version to my Vista machine and opened it up in Office 2007, sure enough all of my formatting was off by a page or so.

Now, many people send resumes in many formats but I think it's a valid point that not all documents will save the same formatting as they are opened by different applications. In turn, there are more Office users than there are Open Office users, so to make my resume the most compatible I can either use Office or send the resumes in a new format. I started to send out resumes in PDF format but quickly I found out that Craiglist blocks attachments beyond a certain size, and my PDF documents were beyond that size. So I restored back to sending my resume and cover letters in standard text format, which worked but had a few people ask for a DOC format instead.

I really considered sending the documents in the Open Document standard that Office 2007 can now open but if my guess is correct, many people do not patch their Office suite and can not open any other document format. Either way, I sent out my cover letters and resumes in text format but when they ask, it's in DOC format created from my Vista computer. I rather do a bit extra work just in case to get that job.

From my using Linux experience I found that while it's grown to a great OS I'm still not sure if it's ready for the standards of a Dell or Gateway PC. There is going to be required knowledge to install drivers, and since the GUI is not always the ideal tool to use, some command line knowledge as well.

Does this mean Linux could never become main stream?

Well no. Linux has a huge bonus that it's free to use and deploy. I see an ideal Linux desktop install for netbooks, where the user is only using the the system for Internet or simple chat applications. Linux is also proven in areas where a stable OS is needed that does not have any security issues, such as the file share devices or home routers. But in the world where people constantly install games, applications and share files that need to be the same format, I don't see Linux taking over soon.

Now, this argument is not the same on the server side. Microsoft has already mentioned that they know about the growth of Linux and adding Linux to their virtual software. We'll see how this turns in the next few years but looks to be very interesting.
The strangest computer problem solved!

For a few weeks I've been battling this strange issue on my main yellow computer. I call it the yellow computer because it's a Cooler Master case in yellow and black, a special edition color I picked up from Fry's Electronics. After I had the computer running for about two years, I wanted to install a distro of Linux so I downloaded Fedora 11 and Ubuntu 9, installed them including the drivers to have a running system.

After a few days of running my Linux system, I wanted to play some video games and the Wine Windows emulator was not as stable as I liked, so I decided to reinstall with my Vista Ultimate.

This is where the problems started. I first ran the installer as normal but suddenly the OS would hang upon first boot up. I kept wondering maybe there's some files still left on the hard drives? So I used a USB to SATA device, then Acronis Disk Director to erase the drives and confirm there is no hidden partitons or MBR's left on the disk. Once I confirmed by using a full data wipe method, I restarted the install, then was stuck at the same point. I even bought a new 1TB hard drive I saw on sale, figured I might as well add some drives while I have the computer case opened. Still installing on the brand new drive had the same results.

I started to think maybe there's something hanging on the system. I posted some threads and found out people mentioned it could be the memory, drives are holding a MBR from Linux, my computer might be destroyed. After thinking about the problems, I went back and reinstalled Ubuntu 9, since I had no problems with the install I figured I keep it on until I found a real solution.

From using Linux full time I felt like I wanted to go back and run my Windows apps, so I installed Vista again. I figure since the computer was running with no problems for the past month I would be ok. Well, Vista installed to the same point but instead of hanging, it would blue screen and crash.

The system would install fine, reboot and upon startup, that "Windows is starting" message, it would instantly reboot, flashing a blue screen. So I restarted the startup in safe mode, and found out it was hanging on the install of CRCDISK.SYS.

I searched Google for the solution but found many articles pointing out random problems caused by this from error. Many of the users listed fresh installs, changing hardware, to even the error randomly happending on a new system. Basically none of the solutions worked and I was still stuck with the same problems.

For a wild idea, I flashed my motherboard BIOS to the latest version. This seemed to work as I was able to get Windows to boot but the OS was extremely slow, even moving the mouse was stuttering and barley working. Something still wasn't working right.

At this point I was frustrated, I already tried everything I could think of, my next step would be to disassemble the entire computer and test each component, which could take hours.

While playing on-line game World of Warcraft, I was chatting with some guild members about the problem. Two people mentioned that it sounds like a issue with the DVD drive or the media. I was thinking, how could the media be so problematic, doesn't the Windows installer check the files before installing?

To test the theory I needed another copy of Vista. Since I was going to purchase the subscription someday, I figured I start a TechNet subscription and use the unlimited trials of Windows 7 Ultimate. Downloaded the ISO and key, burned to a DVD and started the install process again. This time success!

After I was up and running with Windows 7, I took some time to rethink my trouble shooting process and why I didn't think of using a new media?

Part of the problem was the install with Linux. When I was installing Linux I used two different versions on two different medias, one was on a dvd and that was Fedora 11, while the other was on a cd and that was Ubuntu 9. The Fedora 11 installed fine, then I reinstalled Ubuntu 9, but after that the Fedora 11 didn't install correctly. I think instead of checking the dvd of Fedora I instantly assumed it was the computer hardware. So I switched to Vista and the same error, which made me believe it was something related to what was the similar hardware, the hard drives.

I really enjoy working on computers, I think even after years of support I still find that I'm new and always learning skills. Of all of the possible technical solutions, it was the easiest, just a 10 cent dvd fixed the problem.

Wednesday, August 12, 2009

Backups

Recently a friend mentioned to me a UNIX workstation at his work could not start the GUI or xwindows. The OS could start but since the desktop was limited to a command line, there was a bit of problem getting back to the applications on the desktop since the windows could not be started. Unfortuntaley my friend did not have any backup of the systems and the application looks like it was having problems so it could be more than a simple copy of a few files.

Thinking about backups, they are usually considered something nice but not always kept at a high priority. Often when a new system is purchased, the last item, if even remembered is the backup license or software. Not to mentioned how many stand alone systems are purchased with out a valid backup solution, or how many are in production with out testing the restore procedures.

From my experience at home and in the enterprise data center, a backup is a make or break point for the system. If you have a backup, even a old backup from a few months ago, it's far better than starting over from a base OS. In once case at my previous job, a key system in a multi-tier application crashed from a hardware issue. Basically the system ran a SQL server that was a key component for updating workers in the distribution centers. With this one server down, the entire work force of workers would have to be let go and this would impact the company with a lost of several thousand dollars of work and merchandise not shipped to the stores.

After I found the server lost a drive and was not mirrored (old HP ProLiant DL310) I installed a new drive and OS, but the problem was installing the applications and data. We had a process for emergency bare metal restores but it was never 100% successful, often requiring some fine tuning and slight fixes. We were lucky and the server came up with some tweaking from our SQL DBA but it was down to the wire. To say we were on edge is to say the least, I was there till 4AM on Sunday waiting for the ok from the application team.

Thinking back to how important backups are, I have been not taking regular backups of my personal computers. Mostly I think my reason why I skip out is I usually keep my files across multiple computers and take a backup about twice a year. It's lazy and after thinking if I lost everything, how much would I really loose?

I actually almost found this recently.

On my main workstation, I usually run Vista Ultimate on the workstation but it's been running slower and slower over the years. Thinking I'm going to upgrade when I have time, I backed up my files over the past few months. The past month I wanted to install a Linux workstation instead of working from a virtual desktop. Installing on a physical box involves some extra challenges such as locating the correct drivers.

After installing the Linux on my workstation, by changing the boot drive from C:\ to my D:\ drive, I found that some how my master boot record was changed. Tried some recommended steps, the reinstalled Vista, thinking I could reinstall to a junk directory but still copy off my data. To my surprise, I checked and all of my data was gone!

Actually, the Vista installer copied all of my data to a new folder Windows.old, I used a USB to SATA device and I was able to copy my data. I was extremely lucky, I had my resumes and other data that I could have lost and did not have a recent backup.

Like the issue at the old job, the lost of data or non tested restores can be the success or failure of any data restore. If I lost my resumes, that would be about a few days of work, not to mention that I would be behind on my job search.

Tuesday, August 11, 2009

Building a computer cheaply

Recently I order a new computer from Newegg. It's a computer that I will use for a home server and to practice installs, basically a more powerful machine than my spare computer I have now. I was looking for a few key items in my next computer, basically a computer that had user replaceable parts, common chassis size, room for expansion, plus drivers available in Linux.

At first, I was considering a small desktop computer with a Intel Atom processor the same as used in the common netbooks. After using my netbook for the past few months and seriously playing around with the smaller processors I felt like this would not be a productive for a server. The big gain of the Intel Atom is the power savings, but if the server is so low performance, I could use a 1GHz desktop I have now to use instead.

Once I figured out I wanted to use a normal processor, I decided to choose between Intel and AMD, both parties have great processors but I was looking for a good price vs performance. Searching around prices from Newegg and Fry's I finally decided upon the AMD Phenom 9950 Agena 2.6GHz. The price was just over $100, had great reviews and with the new quad core processor, should have a bit more power than the older dual core.

Choosing a motherboard was easier, I found the prices of the Micro-ATX motherboards much cheaper than the full sized ATX motherboards. I also chose off brand memory to lessen the cost over premium brand memory, still using 4GB so I will have enough to run at least 3 virtual machines. Topping off with a decent mid-tower case, 500 watt powersupply, and a 600GB hard drive I was complete. I did not buy a video card because the motherboard has built in video as well as using ATI which offers Linux support. The total amount I spent was $500 for everything but I think it's a good mix of performance, long term usability and Linux support.

After looking at the features, I wonder just how cheap could a desktop computer be built for? All of my pricing is from Newegg, they offer very reasonable prices and their shipping is usually competitive.

Let's start off with a desktop, 4GB of memory, at least 500GB hard drive, video card, including monitor.

CPU - ~$70 (Intel or AMD)


Intel - Intel Pentium E5200 Wolfdale 2.5GHz 2MB L2 Cache LGA 775 65W Dual-Core Processor

AMD - AMD Athlon II X2 245 Regor 2.9GHz 2 x 1MB L2 Cache Socket AM3 65W Dual-Core Processor

For the price this processor is cheap and with the 65W power offers some power saving. The down side is it might be a tad slower than a same speed 125W cpu. For the price I feel like this is a good value per dollar. If you search around you can sometimes find older generation processors like the AMD 6400's for under $50 but I personally think this might be a bad idea. For some of the older generations of processors use older socket types and finding a motherboard could cost more than using a new processor.

Motherboard - ~$60

Intel - ECS G31T-M7 LGA 775 Intel G31 Micro ATX Intel Motherboard

AMD - ECS GF8100VM-M3 AM2+/AM3 NVIDIA GeForce 8100 Micro ATX AMD Motherboard

Both of these motherboards are the micro-ATX size, which means they are physically smaller and lack the additional features of a full sized ATX motherboard. For most users is this fine and in fact, the majority of desktop systems sold by Dell or Gateway use a micro-ATX format motherboard. While these offer on board video, even audio they do not have digital video output for DVI, the feature will cost you about $10 more in price.

Memory - ~$50


Intel - OCZ Gold 4GB (2 x 2GB) 240-Pin DDR2 SDRAM DDR2 800 (PC2 6400)

AMD - OCZ Platinum 4GB (2 x 2GB) 240-Pin DDR2 SDRAM DDR2 1066 (PC2 8500)


The Intel memory is DDR2800 while the AMD memory is DDR21066, there is more selection of DDR2800 memory but for the needs, you shouldn't have any reason to pick one over the other. 4GB is the standard I feel for most users, the price is cheap enough were you should not skip out and offers a great performance per dollar.

Hard drive - $85


Western Digital Caviar Green WD10EADS 1TB 32MB Cache SATA 3.0Gb/s 3.5"


There are some reviews of the 1TB hard drives too slow but for the price, I think it's a great deal. If you wanted a 750GB expect to pay about $70, so for $15 more you get 250GB extra. There are some deals from Fry's also but expect the price to be similar until the 2TB drives start to drop in price.

Video card - included with motherboard


I'm skipping the video card since the motherboard has on board video.

DVD drives - $30

Sony Optiarc Black 24X DVD+R 8X DVD+RW 12X DVD+R DL 24X DVD-R 6X DVD-RW 12X DVD-RAM 16X DVD-ROM 48X CD-R 32X CD-RW 48X CD-ROM 2MB Cache SATA DVD/CD Rewritable Drive


Case - $25

Rosewill R220-P-BK Black 0.5mm SECC Steel ATX Mid Tower Computer Case

Rosewill makes very reasonable priced cases and offer a good selection of choices. There's a few choices on cases, from the basic to the extreme. I personally prefer to spend a bit more on cases since they outlast the other parts in my computer. I am using a case I bought three years ago and it's still good as new.

Powersupply - $20

Sunbeam PSU-BKS-480-US 480W ATX12V Power Supply

Again, you can choose something cheap or extreme. I think the 480W of power should be more than enough for the computer. If you intend to use more drives or a larger graphics card you might need to upgrade.

Monitor - $150

ASUS VH222H Black 21.5" 5ms HDMI Widescreen 16:9 Full HD 1080P LCD Monitor Built in Speakers 300 cd/m2 1000:1 (ASCR20000:1) w/ SPDIF out

Like the case, you will have the monitor usually longer than the computer. I like the wide screen and the price difference from a 22" wide screen to a standard 19" is only $50. I think it's well worth the extra screen space for multitasking.

Extras - $40

Keyboard and mouse are usually a personal preference, but there's many choices available.

Total cost - About $530 plus tax and shipping.

With some careful shopping you can get this price even lower and find some better deals. These prices are not on sale and the standard every day prices.

You can also buy a refurbished system from the major manufactures but I like to build a computer because you have more options.

Ars Technica also has a good system guide which is aimed towards the budget computer gamer.

Ars Technica System Guide April 2009

Thursday, August 06, 2009

Netbooks - yay or nay

A few months ago I purchased a Asus netbook, it's the standard model with the 10" screen. At first it was great, I installed Ubuntu Netbook Remix and everything was working. But soon after I started to do some real work that I found the keyboard was just too tiny to work on. The shift key was about the size of a regular key and I was constantly pressing the up arrow instead of shift.

After a short time I modified the keyboard to elimate flex and a few weeks later, the keyboard started to fail. At this time, I switched to using a Apple keyboard plugged into the netbook. Ironically my little netbook was now taking up more space than a full sized notebook. Once I had the netbook working again with the keyboard I tried a few more applications, getting away from the limitations of the small keyboard.

Interesting, I found that it was still hard to really do any work that required multiple applications or larger resolutions. For example, I'm reading about Ruby, it's a script program language available on multiple platforms. Basically you write the scripts using a text editor, save as *.rb, then run the files from a terminal using the command "ruby filename.rb".

This sounds easy, in fact you can have multiple windows open on a normal computer, and watch Hulu or something else while work. But not on the small resolution of the netbook. Due to the small screen size, just opening up the text editor you take up the entire screen. From here you need to switch to the terminal window, which also takes up the entire screen. It's not such a big problem, many people are used to switching screens, and many laptops are sold with low resolutions such as 1080x640.

The hard part is really working around these limitations and is the lower cost of the netbook worth the trade off. After spending more time, I feel like the netbook is great for checking e-mails, Internet, having fun with Linux packages but I'm not sure how much else.

Currently I keep the netbook for fun and learning but I'm building a new system which I'll pick a regular workstation with a standard processor.

Tuesday, August 04, 2009

Songbird

Songbird is a open source music player for various clients, from Windows to Linux. I played with this player before on Windows XP and wasn't too impressed, not sure which version but it was a few years ago.

Recently I changed over my main workstation desktop from running Vista for two years to Ubuntu 9 Linux. After making this change I needed to find a simple music player that offered many of the functions of iTunes but on the Linux platform. I could have gotten iTunes to run in Wine but prefered to use something open source.

Playing with version 1.2 of Songbird I'm really impressed of the layout and speed of playing songs from the browser. There's nice little features like Mixtape that show you details of the artist, complete with Wikipedia links. You can import songs like most music players and the import function works just as fast of iTunes.

Another nice feature is the listing of Last.FM for steaming radio, which is sometimes missing from other popular music players. I have to say that I looked at the listing of popular Linux music players, including Amarok, which was highly rated but didn't work as clean for me.

Overall it's nice to find applications that are open source and work better than their popular applications.
Linux and the master boot record problem

Recently I purchased a new 1TB drive for my computer. I was running out of space and could not backup my main drive of 500GB without a larger drive. Since the price has come down since they been released I bought a Western Digital and installed with no problem.

After I had this new larger drive I decided that I should try installing Linux on my main computer but use another disk, my old backup for the Linux install. So I first changed the boot up process in BIOS, from the 500GB to the 250GB, then installed Fedora11 64bit version.

Fedora installed with no problems, even got Wine to install AND run Photoshop CS2! But I noticed that I could not change the audio setup. Then I installed the video drivers, ATI 3850 video card, after that I lost video on reboot. Yikes!

At this point I decided to try Ubuntu 9, to compare the differences between the drivers and application install process. Also I wanted to see how hard it was from using YUM vs APT-GET or DEB packages. When I did the install of Ubuntu on the same 250GB the install crashed out and couldn't reinstall, in fact I couldn't reinstall any OS on the same drive.

I was really worried that I might have lost my Vista partition on the main 500GB drive, sure enough I loaded it up and got a blue screen of death. Lucky for me I had a simple USB to SATA device so I saved all of my data but this wasn't the path I wanted to take upgrading my pc. lol

Once all of my data was safe, I disconnected the 1TB backup drive, the 250GB drive, and just enabled the 500GB main drive. Restarted the Vista install and Windows would hang upon reboot. Even after scrubbing the entire drive, I would still see this error. So I asked in forums and most of the answers were about the master boot record. The master boot record (MBR) holds the data of how to boot an OS, if this is missing, the computer is not sure where to load the OS. It's similar to a starter on a car, the engine could be working just fine but can't start without the starter. The starter is only needed once the engine is turned off, but always needed to start up.

After being really stuck on this issue, I finally just tried to reinstall Ubuntu but this time I removed all of the partitions from the installer, and created a new partition. I did this many times before but just for luck, tried it again. As luck would have it, Ubuntu installed with no problems!

Once it was safe that it's running good, I started to down load the drivers I needed. I found both of my video card and sound card were working with their Linux 64 bit drivers, very happy! Then I installed some extras, but so far it's working great!

Now, I'm still confused by this problem and asked my Dad about it. We both think that the Vista installer could not erase the MBR correctly and only when using Ubuntu the installer over wrote the MBR.

Either way, this is a nice Linux install, now only if I could get Photoshop CS2 to work with Wine again. :)