Warning this article may contain opinions of the author that you and iTWire don't agree with.
Visit the last page to have your say in our forum.

No. 1 Story

Telstra adds one million mobile services, but Sensis plummets

Telstra has revealed the addition of almost one million new mobile services in the six months to December 2011, but Sensis revenues plummeted 24 percent in 12 months.

read more

Adding a new hard disk to Linux, and why the Linux filesystem trounces Windows' butt

Opinion and Analysis

Now, if you have added a pristine, virgin hard drive to your computer it will not have any existing partitions on it. It will be completely blank. In this case it’s certain Linux has not mounted it automatically.

However, all you need are two additional steps which come in right at the beginning. You can then do everything precisely the same as if you had put in a pre-formatted disk.

The first thing you must do is prepare the disk for use, and to partition it yourself. This is handled by the command fdisk (for “fixed disk”) and needs the target hard drive to be named, eg fdisk /dev/sdb1.

The fdisk command gives a lengthy menu of options. The only ones you’ll really need to know are ‘p’ which prints the current proposed partition table, ‘n’ to make a new partition, ‘q’ to quit without applying any changes and ‘w’ to exit after applying your changes.

Even if you’re sure the disk is blank it is sensible to use ‘p’ before doing anything else to verify there definitely are no existing partitions. Once you are sure press ‘n’ to make a new partition. It’s up to you, and your purposes, whether you turn the whole disk into one big partition or you break the disk up into smaller sized chunks. No matter what you do press ‘p’ one more time to verify things are how you wanted.

At this stage the disk has not actually been altered in any way. If you press ‘q’ you will quit and leave things just as they were. Press ‘w’ to actually apply the partitioning.

Secondly, you must now format the partition(s) you made. Keep in mind that although you partition a disk (/dev/sdb in this case) you format (and mount) partitions (for instance /dev/sdb1.)

Use the command mkfs (“make filesystem”) followed by the partition, such as mkfs /dev/sdb1. The disk will be formatted using the default filesystem type in your distribution. You can use the –t flag to specify a different filesystem type. If you want to share the hard drive with Windows computers you might execute mkfs –t ntfs /dev/sdb1.

Once this step has been performed you can treat your hard disk just as if it had been partitioned and formatted from the beginning. Use the mount command to connect it to the filesystem wherever you desire.

I mentioned we’d look at a third case. This one is actually pretty simple. If you plug in a removable USB hard drive Linux will almost certainly mount it and place a shortcut icon on your desktop. It gets special treatment because Linux recognises it as a removable disk just like a memory stick that could be loaded with photos.

Yet, it’s still a hard drive at heart. It still has a device name like /dev/sdb1 and it can be manually mounted and unmounted.

Which leads us nicely to something that Linux truly is fabulous at and which Windows can’t do anywhere near as well.

CONTINUED







- sponsored feature -

The Death of Traditional BI: What’s Next?

How to Make Business Discovery Work for Your Business IP PABX BUYING GUIDE

Business Discovery takes its cues from consumer apps. Like Google, it encourages us- ers to hunt for and explore data without worrying about or even noticing the underly- ing technology. Their entire experience is working within an intuitive interface to get real-time, self-service results with only minimal training. ...more