Sunday, May 31, 2009

Linux vs Windows

I just ran across this article from Linux.org:
"Harvard Study: Linux will not supplant Windows",
Apparently there are others who think like I do even if the study was done in 2005. It is 2009 and Windows market share was reported at OSNews,com to have dropped a just below its historical low of 90% with Linux holding just more than 1% and Mac OS X moving up to almost 9%. With numbers like these I believe the study done in 2005 is right on target. It will take a lot more to budge Microsoft from the desktop throne.

Saturday, May 30, 2009

Linux Not Ready For The Masses

This is the argument Microsoft always wants to win. I think they are still winning the war of the desktop for now will for sometime to come. I really like Linux and I have to state upfront this is not a bashing Linux argument but hopefully will enlighten and encourage more people to experiment with Linux. First off Windows will always be the majority desktop on new computers until Linux distros fully support out of box functionality. Some would argue that it is the manufacturer's responsibility to supply the drivers but I argue that the differences from distribution to distribution is what keeps the manufacturers from creating the needed drivers. While this is improving in recent kernel releases, Ubuntu, Fedora, Puppy, Slax and Debian, to name but a few, all have slightly different methods for installing drivers and slightly different directory structures. While the basics are the same in each, differences do exist. We can't expect a video card manufacturers for example to create drivers for all these different distributions when the methods for installing and configuration is slightly different in each one. The Linux community could come together on this and start creating some standards. Secondly Microsoft has for better or worse, kept plenty of configuration standards from version to version only making some minor changes along the way. As computer use grew this familiarity has helped the novice users. It is this group of users that make up the majority of users. Would Linux be right for them? A qualified maybe is my thought on that. Installed I think anyone can use most Linux distributions. It is when installing new software or hardware that will cause a novice to reconsider and return to the safety of Windows. I am a geek and I am learning more everyday about Linux but when I wanted to install the Flash plugin in Fedora I went to Adobe's download page and was presented with four choices a yum, a tar.gz, a deb and a rpm file to install Flash. Which one do I need? I had to stop and research what Fedora would want to install. Not too hard for me a geek but most users might give up. That brings me to package mangers which help quite a bit but still need tweaking for repositories and are not consistent amongst distributions I regularly use Puppy, Ubuntu, AntiX and Fedora. Puppy's package installer has the most differences from the others. AntiX has two different installers and of course all can install from the command line. Confusing? I will end this saying that I like Linux and enjoy the challenges it provides. But I recognize that this challenge is not for everyone. I hope to see Linux to continue to grow and perhaps move towards creating environments anyone, including my Mom, could enjoy what Linux offers.

Monday, May 25, 2009

Using Gparted part 2

Last Saturday I decided that for this laptop I would be using two main OS's. AntiX as the main boot partition and Puppy Linux. With this in mind I wanted to increase the size of the AntiX partition but Gparted would not allow the deletions of hda5 and hda6 unless logical drives with a higher number were unmounted. Easy enough with hda7 which held AntiX but hda8 was a Linux swap partition and refused to unmount while booted to the hard drive in either OS. The solution was to boot with a Puppy Linux live cd and run Gparted from there. I was then able to unmount the Linux swap and delete the older hda5 and hda6 partitions. Next it was a simple matter to increase the size of hda7 which now became hda6. Since hda7 had previously held the bootable partition, I would still need to edit Grub's menu.lst file to recognize the changes. I should also mention that it is not recommended by Gparted to move partitions forward and it recommends backing up data. But in this case the home directory is safe on it's own partition hda2 and was untouched with this process so I didn't worry about backing up. In menu.lst I had to change two values to reflect the changes made. This is the section with the old values:

title MEPIS at hda7, newest kernel
root (hd0,6)
kernel /boot/vmlinuz root=/dev/hda7 nomce quiet splash vga=791 resume=/dev/hda8
initrd /boot/initrd.img
boot

and these are the new values:

title MEPIS at hda6, newest kernel
root (hd0,5)
kernel /boot/vmlinuz root=/dev/hda6 nomce quiet splash vga=791 resume=/dev/hda5
initrd /boot/initrd.img
boot

It's easy to see the values for the partition is what changed. If you move or change partitions that are holding the boot loader, in this case Grub, you will get an error if not edited. I now have three primary partitions and one extended partition holding two logical drives, Linux swap and hda6. I should also point out that Gparted lists the partitions as sda and Grub shows them as hda but the end results are the same. Here is a new screenshot of my hard drive showing the changes. You can compare changes with the previous post's screenshot.






Thursday, May 21, 2009

Using Gparted

If dual booting is something you plan on doing then Gparted will become a very useful tool. Almost all distros will have this tool installed. If not it is easily aquired via most distros' repositories. Gparted stands for Gnome Partition Editor. The current release is version 0.4.5 and is also available at Sourceforge.net. Gparted can read various file systems including fat16/32, ntfs, ext2/3 and several more. If you need to create partitions, re-size them or simply format a drive, this tool can do the job. Do you need to copy or move an entire drive? Gparted can handle this too. I have only scratched the surface in my experience using Gparted. I have re-sized partitions on a laptop running Windows XP and Ubuntu 8.10 on a 120GB hard drive. I was able to change the size of both partitions without data loss or downtime. Here is a view from a 20GB hard drive I am running right now. I have Puppy Linux on the first partition, Mepis 8 on the hda3 (they are out of order since I had given too much room for Puppy and used Gparted to create hda3), on hda2 is the home partition being shared by all OS's. I created an extended partition and placed logical drives within it. AntiX resides on hda7 and there are two unused spaces left over. Using Gparted to manage this hard drive makes it possible and keeps it very simple. Let's hear what tools you use to manage drives?






Sunday, May 17, 2009

File System Check using fsck

I won't begin to claim I know everything in Linux, but I'm learning. In most Linux systems if there is a crash or the OS suspects disk failure, the utility fsck will run at boot automatically. You can however run it manually from the shell as root. Here is the syntax for fsck:

fsck 1.41.3 (12-Oct-2008)
Usage: fsck.ext3 [-panyrcdfvtDFV] [-b superblock] [-B blocksize]
[-I inode_buffer_blocks] [-P process_inode_size]
[-l|-L bad_blocks_file] [-C fd] [-j external_journal]
[-E extended-options] device

Emergency help:
-p Automatic repair (no questions)
-n Make no changes to the filesystem
-y Assume "yes" to all questions
-c Check for bad blocks and add them to the badblock list
-f Force checking even if filesystem is marked clean
-v Be verbose
-b superblock Use alternative superblock
-B blocksize Force blocksize when looking for superblock
-j external_journal Set location of the external journal
-l bad_blocks_file Add to badblocks list
-L bad_blocks_file Set badblocks list

Since my experience is limited with Linux, I will refer you to the fsck listing in Wikipedia and also the MAN pages for fsck. If the occasion arises and you need to run this tool manually, read these pages first. No one ever wants to have to run tools like these but they can and often will save the day when disk errors surface.

Saturday, May 16, 2009

File Recovery

Everyone has lost a file or two sometime in their life at the hands of an errant mouse click or a hard drive failure of some kind. But have you lost a file from a flash drive? Once in a while a flash drive will say a file is corrupted or otherwise won't open. Did you back it up? If you are like most of us we just assume these little drives will work forever. I have sent my fair share through the wash and they still work. But today I want to share a story of a file gone bad on a flash drive. The file was an ordinary Word document. Nothing fancy in it but it would have been disastrous to re-create for this person not to mention they were under a deadline. At first I wasn't too confident the file was still there. Other files were on the drive but had it been over-written was what I was worried about. I plugged the drive in and I ran chkdsk on it. This is a utility that ships with all Windows computers. The utility always states it will run at the next re-start which I did right then. This was a 1GB flash drive but the scan was quick and it saved the files it found as 000001.chk. and so on. When I came back to Windows I was able to open these files in Word and we went through them one by one. We had gone through nearly all of them when on the last one she screamed there's my file. We saved the file under a new name and all was good again. Chkdsk is one of those forgotten utilities that will save fragments of the drives it is run on. In this case it was able to find several Word documents and most importantly the one we wanted. Here is the syntax of the chkdsk utility:
CHKDSK [drive:][[path]filename] [/F] [/V]
To learn what each switch does and how to make the most of this utility type at a command prompt: chkdsk /? ...and this will give you the details you need to run this utility. You can then save the errors it finds and go through them one by one o determine if they are worth keeping. This command will work on any Windows machine. I will cover the Linux version of this type of tool and also other file recovery methods in a future post.

Thursday, May 14, 2009

Flash Drive Mania

Flash drives are an important part of my daily life. I carry at least two with me at all times and sometimes more in my backpack. Why carry so many you might ask? Well one is an 8GB drive that serves the main function of quick storage. If I happen to read about a new distro and I'm not at home, I can still download and save the ISO to this flash drive and still have room for all the applications and tools that I use for my job almost everyday. The other one around my neck is the aforementioned Parted Magic, a real lifesaver when disaster strikes. In my pocket is Ubuntu on a 2GB stick. Really cool and it works great. In my backpack you will find a pair of 4GB Kingston flash drives. One loaded with Fedora 10 and the other with the Portable Ubuntu. This is a really cool project for those who would like the options Linux provides but must live and work in a Windows environment. The Fedora 10 flash drive was created in about 9 minutes using their USB creation tool. It is a separate download from the live ISO which is needed for the USB tool. It will also work with version 9. Check it out from their website. This covers the flash drives I carry everyday but I have a few more for various other tasks. I have a Sandisk 256MB stick that only has one job and that is to boot to DOS. Yes DOS. It even has the Windows 98 splash screen right before loading EMM386. Yes you are definitely a geek if you know what EMM386 does. This almost rounds out my flash drives but not quite. Not listed are ones with Damn Small Linux or DSL and finally one with PCLinux. Both are great examples of small compact but complete Linux distros. I really don't use these two anymore but they were jumping off points into my exploration of the Linux world. For those interested in setting up a flash drive with a Linux OS a great starting out site is PendriveLinux. This is a great website to get your feet wet running various flavors of Linux from flash drives. They even provide complete instructions for setting the drive up in Windows and Linux. So check it out and get yourself a new flash drive while the memory is still pretty cheap. You can easily aquire 2GB flash drives for less than $10 and just about any distro will be able to run from this and still allow 1GB for persistent storage. So grab a stick or two and join the fun.

Monday, May 11, 2009

Review: Parted Magic

For the last year or so I have been carrying a flash drive around my neck loaded with Parted Magic. It uses less than 100 MB of disk space and boots very quickly. Recently version 4.1 has been released. Parted Magic comes as a complete OS and can run on almost anything still plugged in today and quite a few machines that have been gathering dust. I'm not going to cover all the tools so please visit the author's site for the most complete information. I have been using Parted Magic since version 3.5. I have used it to clone drives with Partimage. It worked great. I had a cloned drive in less than thirty minutes. I have also recovered lost files on a supposedly dead drive with Photorec. Don't let the name fool you this is a powerful file recovery tool. For your partition work you can't beat Gparted. This great tool will allow you to create, delete, re-size and format to several file systems hard drives and removable media. Parted Magic also connects to the Internet if needed and will recognize a variety of network cards. Once you have recovered those files burn them to disk using Xfburn. All of these tools are available on the Internet for free you only have to search them out and download them. But why go to all the trouble when there is Parted Magic. Have I convinced you to download your own Parted Magic? If not visit their website because I have only scratched the surface of this superb tool. I will wrap up this post because I need to download the newest version and upgrade my flash drive before some new catastrophe strikes.

Sunday, May 10, 2009

Ranting about Linux

Well I have been ranting on and on about Linux for a while. Right now I am posting from an old Toshiba laptop running a P3 475MHz CPU and 192MB of ram. I bought this laptop in 2000 and paying almost $2000 then. It was configured with Windows 98 which I replaced with Win2k. It worked but it was always a bit slower than I liked. I tweaked everything and it was still slow. But now I like using it despite the availability of dual core and quad core machines. I have three different Linux OS's available on a 20GB hard drive, Mepis 8, AntiX and Puppy Linux 4.20 which I am running now. If I had to gripe about something it would be that Linux takes a little more work getting the wireless up and running. Puppy Linux works great with my Linksys wireless card but the Mepis and AntiX won't connect with it but do great with a $10 Airlink card. If you are getting bored with Windows and want to challenge yourself hop over to Distrowatch and check out the latest to hit the net in Linux OS's. You might even find one or two you prefer over the standard Redmond fare.

Welcome to TechBits

I hope this will be the beginnings of something useful and fun for some geeks and non-geeks out there in cyberland. As you read the upcoming posts I encourage you to comment and subscribe to the blog. I expect to post at least once a week and if something interesting comes up I may post more.