Sunday, 20 June 2010

I am a Windows Admin and I am scared of Linux!

and the opposite of that is I am a Linux Administrator and I think Windows is really rubbish so I wont bother with it.

There above lies the problem!

For a lot of Windows Admins anything involving the command line is scary territory. That is best not ventured.

For a lot of Linux Admins it is a case of "It is a poor ill cousin that doesn't need knowing".

Both views may seem fine in the spheres you work in but here is a important statistic.

Linux will not quite gain universal popularity with users because it is not a user friendly system. People are used to Windows and its error messages because they have been with it for a good part of 20 years or more.

For windows Admins Linux is getting involved more and more in operations to the point where they have to now take note. Be it running things like VMs on VMWare's excellent ESXi environment or for the useful tools that it can bring for those rainy days!

It is time for System Admins whatever system they run to become OS neutral!

There you go shocking statement done but there are reasons why as a Windows Admin it is important to be comfortable with Linux. I will get to the Linux Admins in a moment...

Linux has some very useful tools and I am in this case referring to the many Live CD versions of it like Knoppix, Slackware and my personal favorite System Rescue CD.

The NTFS driver provided with Linux is actually better at handling errors than Windows. Don't believe me? Well take a hard disk that you have had Windows Setup to see the Partition and mount it using a Linux live distribution and guess what? Your Data is there!!!!

Yea alright but how do I mount the thing if I only know GUI and not command line.

First of all people using Monad the old name for PowerShell will find things slightly more comfortable. But if you have somehow managed to be a Windows Admin and never found your way to the command prompt then let me explain something of Linux for you.

Linux treats all devices as files!

Still don't get it then let me say this again...

Linux treats all devices as Files!


So this means that there is a file for a hard disk, a file for a cd-rom, a file for a usb key, a file for a printer...

If you still can't get your head around this then let me say that windows also can treat a device as a file. Look at Mount points for mounting a hard disk and you will understand a little better.

So if you have a hard disk on a Linux system that you need to mount, the Hard Disk would have been stored as a file called something like /dev/sda1 or /dev/hda1 depending on whether you are using SATA or IDE connectors.

So great but how does that help me recover my data.

Well you will need to mount it.

First create a directory this should seem familiar except for the '\' which in Linux is always '/'

So in this example I will create a directory called /mnt/myrecovery

mkdir /mnt/myrecovery


Was the above simple?

Well it gets more simple. You remember that all devices are files? Well we will now "mount" the device to a folder. So I am going to assume you are on a modern machine and there is only a single hard drive attached to it.

So here is the command:

ntfs-3g /dev/sda1 /mnt/myrecovery

and that is it.

So now if you browse in the directory by doing

cd /mnt/myrecovery

and viewing the files which is the command ls rather than dir

You should see your entire data on the Disk!

So the next question is how do I copy the data off...

Well wait for the next post...It will arrive shortly.

No comments: