the maldivian linux blog

a dream, a possible reality. "Freedom"


Partition Considerations - Linux Partition Table Structure

File systems are not typically created on bare hard drives; rather, they are created on partitions. On Intel-compatible hardware, Linux defaults to using Microsoft-style partition tables. The Microsoft partition scheme allowed up to four partitions to be created on a hard drive. These partitions are referred to as primary partitions. Only one of these partitions may be active at a time; the Microsoft Master Boot Record will try to boot the active primary partition.

Microsoft eventually realized that people might need more than four partitions, so they modified the partitioning system to allow creation of more partitions. To do this, they developed a special type of primary partition, the extended partition. The extended partition is not a functional partition, and no file system can be created on it; rather, it is simply a container for other functional partitions, called logical partitions. In the Microsoft partition scheme, up to four primary partitions can be created, one of which can be an extended partition. Within the extended partition, up to four logical partitions can be created, producing a potential total of seven (three primary and four logical) usable hard drive partitions. Linux extends this scheme slightly by allowing more than four logical partitions to be created in the extended partition

On IDE hardware, Linux supports a total of 63 usable partitions; on SCSI hardware, a maximum of 15 partitions.

Partitions serve many useful purposes. They impose maximum size limits to file systems, making them useful security tools for constraining usage of system resources. Similarly, some other security tools on Linux, such as quotas, are implemented at the level of the partition. Furthermore, partitions make it easy to divide up hard drive space into smaller functional units, simplifying long-term system management.

RHEL/FC typically use a minimum of three partitions to install on Intel-compatible hardware. The first of these is a small partition, /boot. This boot partition should normally be 75 to 100 megabytes in size; it will contain only the essential system files which Linux needs to boot. In the past it was usually set to be much smaller, around 20 megabytes, but now the recommended size has increased so that multiple kernels can be installed simultaneously. The second of these partitions is a swap partition, used to page out programs from RAM. This partition is typically 256 - 512 megabytes in size, though appropriate size will vary with the machine’s intended function and the amount of RAM installed. The third, required, partition is the root partition, /. This partition needs to be large enough to contain all other files that will be installed by RHEL/FC.

Multi-OS Booting

Linux can happily co-exist with other operating systems on the same computer. Other operating systems may have constraints on which partition and, if more than one hard drive is available, on which drive they can be installed. Linux has no such constraints and can be installed on any partition(s) on any drive.

Since Linux plays nicely with other operating systems during an install, it is best to install it last. Other operating systems will often wipe the master boot record during install, causing grief if Linux is already installed.

Depending on what operating systems are installed, you may be able to have several installed OS’s make use of the same partitions. For example, if your laptop has several different versions of Linux installed (perhaps Fedora, SUSE, and Debian) then at a minimum you could create a single shared swap partition that is mounted by each of the three Linux installations.

Even if you were booting between completely different operating systems (such as both Linux and Microsoft Windows) you still may choose to create a data partition that will be mounted by both operating systems. In this case, it is recommended that you create the partition and filesystem while booted to Windows. Linux tends to be more versatile and flexible in the partitions that it will accept and should be able to mount whatever the Windows partitioning program creates.

If you are unsure what changes an installer might make to your master boot record, then you can create a backup of the boot record before starting the install. The procedure described here uses the GNU dd command. If you already have Linux installed on the system, then issue the command from a terminal as root. If you do not have Linux, then use a bootable Linux disk or CD:

# dd if=/dev/hda of=MBR bs=446 count=1

Then copy the resultant MBR file to a safe location. If you need to restore the master boot record later, you can issue the following command after copying the saved MBR file into the current directory:

# dd if=MBR of=/dev/hda bs=446 count=1

out of topic

Ok, I know what I am gonna post is bit out of the context of the blog title.. but anyways. If you are a web developer or an application developer, we all have used one or more scripting language or programming language. So I just thought I'd try to bring in an old subject again. Which is best? Oh no! thats a question no matter how bad is, is always asked.

Lets see, in Maldives if we go with popularity my guess is Visual Basic will come in first. It has its reasons, but I would say VB is kind of not so interesting any more as it use to be. As more and more people move to web based applications, yeah ASP is always there. But more people turned to PHP then ASP. Maybe PHP has its positive advantages. Its mostly easy to learn and develop, maybe thats one reason why its the choice. The next reason might be that there is so many PHP based sites and help out there. Examples and tools. So much FREE stuff and projects, just ready to be "used". But always one can say ASP has all these advantages too. I would partly agree too. Maybe one more added reason is a lot of hosting is based on *nix, and it does not mostly support ASP. So the obvious choice becomes PHP. Anyway reasons can be lots and favorites can differ as well.

So why not Python , Ruby or even Perl? Again its a difficult question. Ruby on Rails has had a lot of hype lately. Python has been doing so good. Yeah even the new blogger is Python based. Just like Rails, there is so many frameworks for Python too. Namely Zope, etc. Good old perl? Why not perl? So many people say perl is crappy. . I won't agree to it again. Maybe it does not have the elegance and neatness that most people look for. Yeah, but then again it depends on how you define that too. Maybe the code is not as sexy as Python or Ruby, but I won't say PHP or VB code looks neat. Perl has its own advantages and the power. I see perl more as a life saver. If you had used perl as a web development tool, you won't always agree with whats written out on most web sites about perl.

Anyway, having said all that and trying to justify, I would still say PHP is the choice for most web developers. As for Maldivians, I guess the next stage is to evolve with frameworks and other tools. Like Trax for PHP or Seagull, etc. These tools really give you the leading adage. The development time is increased, where you can concentrate more on the business rules and really organize your code (again it depends on how you design too). But to cut short Ruby on Rails (ROR) is the next level. Its nothing new, but not very much seen to be used by the Maldivian development community. There is no best language or tools. It all depends on the problem at hand and what tools you are most comfortable with.

There might be some people who will tell you that things like Java with frameworks like JBoss is the best solution. Agreed frameworks like Rails, does not come close to JBoss (again its questionable, but guess most will agree) and Java as a language is very mature. But does it really suit the problem at hand. As I have been told many times, "The best solution might not always be the right solution". But when one will tell me MSSQL with ASP.NET I would always ask questions. Thats me. Yeah, I it can be a good choice. I agree, but have you looked into other options? That might be the right question. So many of you out there are into computers and programming, but how many of you really experiment around with these tools or look for alternatives? Its kind of sad to see the development community in Maldives not growing by number. Being into development always helps you at some level. You can be a networking guy or a system admin, but if you are a developer as well then it puts you in advantage. I've seen so many occations, when or if the sys admins knew scripting they would have done a better job or could have saved time. Perl for example was developed for this same reason, for sys admins by a sys admin. Even if you are a Windows guy, being able to know windows scripting sure would help you. Keep aside developer, even if you are a finance guy or a business guy having to know how to write macros for Excel or Word sure helps a lot. How about those graphic guys? like who do flash or 3D stuff, they sure need scripting. So to code is no longer just for application developers, its must be something we all should know (well better if we do). Now I am not saying "konme dhiveh sakee program kuraa dhiveh sakah vamaatho ey" :P

Linux Hardware Compatibility

The two components of a Linux system that care about the hardware are the Linux kernel and the X server (xorg is the standard). In the early days of Linux, hardware support was spotty. The kernel developers wrote their own drivers for various hardware devices. The main issue was getting proper hardware documentation so that developers could write the drivers.

With the rise of Linux’s popularity and market share, most hardware manufacturers have moved Linux support to being a “check list item.” Because of this, most hardware makers are openly making proper documentation available to Linux developers. Another big change is that it is becoming increasingly common for hardware makers to write and release their own internally developed drivers.


Binary vs. Source Drivers
To ensure maximum performance, reliability, and technical superiority, there is NO guaranteed binary or source level compatibility between major kernel versions. Because of this, when hardware manufacturers write their own drivers, open source drivers are strongly preferred. Source code availability enables the Linux community to maintain the drivers and keep the hardware supported in future versions of Linux, even if the hardware manufacturer loses interest (or goes out of business).

Lets start

I've been told by a friend that still there is people who need help on the basic. Well my answer was "Help is all over, just google for em". Guess his answer was logical, most don't like to "Read". Then I thought about making some basic help documents. Will that help, if they don't read? Guess not ey! But still I decided that I'd do some research and put up some documents. Hope they are of help.

So to start off, lets talk about pre-installation conditions. Which basically means what you need to think about or do before you start to install Linux on a box.

Certain things or aspects of the system can't be changed or leads to difficulties once you install and setup a system. It will be very good if you think about certain things before you just insert the CD and start to install.

Following is some points to consider.
  • Is the hardware compatible with Linux? Meaning try to do some look into the hardware you own. Like if you have any special hardware. There might be a chance that it might not work. Example some usb modems, etc. So if you have doubts if always good to look into them before you install and then get frustrated after. Good news is most standard hardware does support, well almost everything now.
  • Will the system require dual booting? If the system will boot to more then one OS, then attention should be given to what boot loader is used, and to configure the boot loader to boot to the desired OS. Example if you wish to run Windows and Linux on same box.
  • What partitioning scheme will be used? Software RAID and LVM are easier to configure at installation time (especially for the root file system). If traditional partitions are to be used, then it is best to select appropriate initial sizes; modifying partition sizes later can be both more difficult and more dangerous.
  • What file system type(s) will be used? There are different file systems that you can use. Each of them have their own advantages and disadvantages. Its good decide on one, based on the usage of the system. Example will the system be used as a web server or a DB server, etc. Talking about them is best kept for another post.
  • What is the expected role of the system? Its good to decide on this and choose the packages that you will install on your system. From experience I know even though its easy to add and remove packages, often we don't do that and neglect to remove unneeded software packages after the initial installation. Always remember that every software package installed on the system can be a potential security threat or venerability. One of the very important thing in securing a system is to ensure that its not running any services that are absolutely not required. Even when I say this, I have often made this mistake.
Hope this is good for a start. Mostly this applies when you want to setup a server, on desktops most of the default installations would do fine. But its always good if you keep in mind somethings, which will put you into an advantage. For the posts that will follow I will try to look into more details to each of the points.

06-Oct-2000

I was browsing through http://web.archive.org/web/20010428165102/www.inmaldives.com/pages/Articles/ which was a old web site owned by a friend and to whome I too contributed. Found the following artical dated at 06-Oct-2000, I thought I'd publish here. I know its old and kinda long. The funny part here is after 7 years still its the same issues. Same fights, almost the same topic. Its good in a way, I realised we kept up the fight and did not stop. I also noticed things has very much came as predicted before like. I said "Linux will make it to bed rooms", and it has . Finally we have learned too. So if you have time read on, sorry for a lot of mistakes though (as usual).

Computers as we know it as we see today came into existence in the middle of the last century. Since then the speed of development has been faster then any other technology that we know of. It is not only technology that we have seen developing through this, but businesses as well. At the early days computers were not very affordable and there was no need to have them as a house hold product. Those days computers were used for Scientific and Commercial purposes or in other words for large-scale applications. It was in the early 1980�s that computers made it to our homes and offices, with the introduction of machines from companies such as Apple Computers and IBM. gave the name Macintosh (Mac) to there brand of computers. There were others as well, but it was these two companies who made it to the top and at one point IBM clones were introduced and which gave the PC�s a big lead. By then most people have started to realize the importance of computers especially in the business and office environments. As IBM gave the chance to Microsoft a small computer company owned by Bill gates and Paul Alien to develop the Operating System for their PC�s, they got a good opportunity to jump in to the Sean with a good reputation. This was just the Personnel Computer world, we have to remember the fact that these computers were designed for a bigger market which need not have much computing power like controlling mission critical appliance or manage a huge database like of a banking system. The Fact still was that major companies, which have been in the industry since the beginning, were still doing their homework, the introduction of PC�s or Mac�s did not stop them infract they were just babies then compared to what they had then.The other fact was that they were not developing word processors or paint programs, but they were developing applications for high ending jobs. One other thing was no one predicted the future, maybe they did not know how big a market lies out there then. One example is, IBM giving the rights to Microsoft to sell the Operating System PC-DOS that was developed for IBM by Microsoft.

With the introduction of MS-DOS (Microsoft Disk Operating System) for the PC�s and growing popularity of PC�s, many software companies saw the market for PC based Applications. They too started developing their applications for the environment. Example Word-Star (which was a very famous word processor), Word Perfect and Lotus-123 (a very popular spread sheet applications). This was all happening in the 80�s. Back then there were no GUI environments for the PC�s, but Apple with the introduction of their popular Operating System Apple II later Mac OS, with the WIMP environment was becoming very popular. At this point there were other applications from Microsoft as well, example MS-Word, MS-Works, but they were not major hits as it is now. With the introduction of Microsoft version of their GUI based environment Windows, which still ran on top of DOS started gaining popularity. Application such as Corel Draw were becoming famous, Microsoft themselves too started porting there applications to the GUI environment of theirs which took the maximum advantage of the environment over other vendors. Soon to crush applications like word star, Lotus-123, with very good marketing approaches. Microsoft designed and changed the way people look at computers, since majority of the world population knows nothing about computers and cannot spend there time learning all the commands how to configure a printer or launch an application, Microsoft made this easy for them. Microsoft introduced ways that made things very much easy for the normal man. Also this was where the market was. But the point here is that no one else saw this market before even if they did like Apple computers, they were never able to sell this products as good as Microsoft did. It is not innovation in technology, but in marketing. Most of the technologies where not invented by Microsoft for example most people agree that the GUI and OOP environments. This came from companies such as XEROX who where more in to R & D. It is very unfortunate that these people who invented and brought the idea up did not get much credit for it. So it is not right for one to say where were these people when Microsoft did it all. If I were to answer that I would say those people made the mistake not to see the money in it, but it was these people who contributed to what we see as it is now. Since Microsoft has enough wealth they have been crushing or buying off their competitors. Obviously this can be a debatable topic.

By early 1990�s Microsoft became the richest company on the planet.With produced such as there new improved OS like Windos95 / NT. Still the fact is that these products where designed with the common man in mind, it is not the best operating system which was available. Since Microsoft�s target was money, for this they made their products colorful and friendly for the money world not for the technical world.

Soon since PC�s gained a huge popularity mostly because of the dropping in the price of hardware and awareness in the computer world, more and more people stared using PC�s. As a result their arose the need for sophisticated environments, which were more stable and reliable then the environments designed for the PC illiterate person. In the early 1990�s as more and more students got into computer science we started seeing major outstanding projects. Since most universities and colleges work on systems like Unix and other sophisticated environments. It so happens that most who are familiar with these environments after switching to or going back to the PC environment have hard time doing what they want to get done. It is also a very natural thing for the humans to compare between good and bad. As a result there were many people who were working to bring the famous UNIX environment to the affordable PC�s. Since UNIX was the ruling Operating System since it�s introduction in the 1970�s at AT&T. UNIX was used at various projects ranging from Graphical Applications such as the famous SGI systems to mission critical systems at NASA , where Microsoft Windows never made it. So no one can say where was UNIX when Microsoft made their Windows Operating System to every home. Well, as for me my answer would be even before Microsoft made it to the bedrooms, UNIX made it to the moon. Far beyond the reach of Windows.

In a combined effort in the year 1993 a computer student Linus Torvalds from Finland introduced an operating system, as we now know known as Linux. Linus was the one who contributed to the first kernel for Linux soon to be joined by many other programmers, from the Free Software Foundation. Also contributions such as X Windows system from the X Consortium were made. The operating system continued to grow under the dedicated cultivation of a host of other programmers and hackers all over the world, all connected through the Internet. The most unique thing about this operating system is that it is free and all the source code is open to anyone. This gives many advantages over other operating systems developed by companies as such. Since the source code is open anyone who wish can contribute to it and also as soon as they find a bug or an exploit they can fix it and report it. Also since it is a free operating system almost anyone can download or buy it at the cost of the CD and install it on their hardware and test it, as a result compatibility with Linux started to grow. Even though Linux was stared at a PC level it now offers Linux for very high-end machines such as Sun systems and Digital Systems. There is a port of Linux to all most all the hardware appliances. Ranging from Palm Pilots to Super Computers. Infect Linux opened a new approach of developing Super Computers to those who cannot afford one. Since it is the power of processors that gave the power to the Super Computers, people around the world started doing projects using�off-the-shelf� parts (old 386/486 machines, etc). NASA leads one such project known as the �Beowulf Project�, using Linux as the operating system. Also many other universities have there own Super Computer made by them self through these sorts of approaches. Another major area where Linux is very famous is the server�s side. On the Internet a lot of Web Servers out their run on Linux as the operating system and Open Source projects such as �Apache�. Apache is the most used Web Server in the world. Other more complex areas such as at Boeing and US Post Department all run on Linux and Linux based applications not to mention projects which are done at NASA. A lot of contributions from members of NASA have been also put in this project, examples would be a lot of device drivers for Linux has been developed by a lot of NASA staff.

One area where Linux has been doing poor is at the desktop level for the normal user, since most of the developments for Linux has been done for technical people for technical purposes it has been doing poor on the desktop level for normal users, where Microsoft still stands strong. A good example will be the lack of a friendly user environment, but this is where the money lies and major companies, which develop applications for the end-users, are interested in this area.It would be a waste to develop applications for an environment where there is not much market, it is true in certain aspects. For example for a normal end-user who uses computers as a stand alone machine to do word processing or to do desktop publishing will not know much technical stuff, so when Linux was introduced it was not designed for this group of users, as other UNIX environments has been. As the user base started to grow and as more and more developers joined the project this weak area has been getting a lot of attention and very powerful desktops environments have been created, example would be GNOME and KDE. Anyone who is familiar with Windows or Mac can easily find their way in and will love the flexibility and the open looks of it. Due to this reason the user base has been growing, it is predicted that the user base of Linux doubles every year. IF you happen to be browsing the Internet it would be a good idea to check on this figures and to check it out your self. Because of this fact many companies such as Corel Computers, Borland and companies like Oracle has ported their applications to Linux and are major supporters of Linux. Companies such as SGI, Corel even have their own distribution of Linux and are strong supporters of Linux. IBM, HP and Dell have started distributing their hardware pre-installed with Linux and gives support to Linux. All this has taken a few years to achieve not bad for free software, which is not owned by anyone. It was in 1998 that most companies announced that they would support Linux and started these projects. It is my prediction that in a near future Linux will gain a lot of support as from the end-users and will make it to the bedrooms as well. It has already made to the machines of the high-end users and it has made it to the space. At this point I would say if Linux was a company it might not have gained much popularity and support as it did or Microsoft would have crushed or bought them off. The obvious result would be we would not have access to advance technologies as we have now if not for idea�s like Linux


Contributors Needed

Hello guys,

If you wish to be a contributor to this blog, Please email me (sofwath at hotmail.com). Would be great if more people will contribute to the blog. You need not be a Linux guru, anyone who has got interest and some knowledge is most welcome. The idea is to get views from everyone. Starting from the people who want to try or switch, to the expert users. Even people who hate Linux or never liked it. So we will know your experience too. The more enlightening the better it is. :)

I know not many might want to join, but that's OK. Its just another try. But give it a thought. I want to make this more a "We" thing then "I". So help is needed.

jump through the windows with FREE Wine

Wine does not always come in glasses and bottles. Wine also comes in other forms, like emulators. Wine maybe hated and even forbidden to Maldivians but in case of Linux, wine sure is the answer to a lot of people. Answer in the sense to questions like can Linux run MS Office, and other applications like games. Wine is an Open Source implementation of the Windows API on top of X and Unix. The purpose is to run Windows programs (apps) on Linux and alike. But I guess it might not be very right to say wine is an emulator. Wine is more a re-implementation of the Win32 API, kind of like allowing applications to run as if on the native OS.

The project has been around for many years, and it has gained a very good progress too. Its worth looking into Wine, if you are looking to run some windows applications on Linux. I had the need to run MS Project and wine was the answer. At times when you work in an office environemnt you are left with no choice but to stick with some applications for various reasons like compatibility between the coworkers. At these kinds of situation wine really comes in handy. Wine also is good when you want to run some games on Linux. But I personally feel if you are a game guy, you should be on windows or have dual boot.

As for the applications that run over wine, there is a lot. Here is a list of applications from wineHQ.

If you are looking for more compatibility with applications at a commercial level, CrossOver will be a good choice to look into. Its the commercial version of wine. The list of application is bigger and its easy to manage the applications as well. Its got support for applications like IE 7, MS Office 2003, Outlook 2003, iTunes and even Photoshop CS2.

Now I know, there might be some people who might ask, "Can wine or crossover run Vista". daaa! you never know. :) For those there is answers too, maybe not with Wine though. Anyway thats a different topic.

Linux and Maldives ?

Now that Vista is here, what have changed? Nothing so far. Most who have experienced has a few comments to pass, like they like the new looks and they need to upgrade or buy a new machine. Some claim its too much MacOS X , but others feel its just Microsoft. Which ever, Vista is here to stay. The new improved Office is damn good, in terms of functionality and new looks, I'd always give credit to the MS Office team for doing a good job.

So where does Linux come in...? Its a difficult question to answer, but my guess is a lot more people will experience Linux this year and some might even switch. I am talking about Maldives. One major reason why people don't switch between OS's is the cost factor. MS Windows is FREE too in Maldives, just like Linux is. :) Well its the same case for most of under developed and developing countries. So it does not bring a major importance when you say Linux is "FREE". My guess is if and when the cost factor "Hits" us, this might change. Maybe not for most individuals as home users, but at a cooperate level. When the organizations and companies need to pay for the license , etc. Example if the Maldivian government needs to pay the license for the the desktops and servers they own, its gonna be a big expense. The cost of upgrades, etc. I don't think there is much thought given about this as of now, but who knows. Example counties like Japan and India, they are moving into the Free and Open Source environments. Recently Tamilnadu has decided that the all new computers they will buy will come with Linux or Linux and Windows as dual boot. All schools will have Linux as the OS and some government offices will have both the OS's, the reason being that still they have some applications that depends on Windows OS. My guess is soon they will replace all these applications and might move 100% Linux. This has its advantages, mostly in terms of cost and the open platforms has technological advantages.

But for a country like Maldives, the move is not easy and not very practical. I feel one reason being to manage Linux it requires more skill then a windows platform. Which we lack. Windows guys are cheap and easy to get. We don't need much skill to administrate on windows platform. The rule is, if you can read English and know what you want. Most likely you will get things done (most of the cases). This is the biggest advantage I see with windows. Its designed with "not so skilled computer guys" in mind. But one can always raise questions and argue on that. Both the platforms has their advantages and opposite. So I would not say Linux is the "best" choice or windows is the "right" choice. It basically depends on your requirement and how much money and resources you have. This also counts for hardware too, not just the software costs. Windows is famous of being power hungry and it might not be very feasible to buy or replace new hardware every time there is an OS upgrade (which is the case with Windows). But things like the MS Exchange 2007 are really good products for office environments and still its hard to replace MS Outlook with clients like Evolution. But at the same time MTA's like sendmail has a lot of advantages and flexibility over Exchange. It all comes down to requirements. So you need to know when to choose what is bes t for you. Be it Linux, Windows or any other OS or application. My advise is don't be restricted , be open.

Finally the future of Linux on Desktop looks bright, Its been catching up and needs about 2 more years to be fully accepted by normal home users. In terms of looks and feel, I guess on the right track now with projects like Beryl and XGL, etc. Ubuntu might be catching up on this area, where they will attract new comers into Linux and maybe home users. Some still might argue that distributions like Fedora are much better (I think so too), but fact is Ubuntu is reaching out for the normal end users and they are doing a good job too. In the server side, Linux is unbeatable (web servers, application servers, email, etc) but to be practical presently in Maldives there is not much demand for anything like this much. Mostly people need File servers for windows environments and maybe just a DB server (since most developments in Maldives is based on MS, like MS SQL Server , .NET or just VB) they are based on Windows. When it comes to high end computing, like ISP's , banks and telecoms *NIX or Linux is better utilized and common.

So next level, lets just observe and document the progress :) and comment as we can.