Sunday, 31 May 2009

Utilizing Virtual Box

I have the GParted.iso image saved somewhere in my computer and want to test it and become familiar with it. I have not burnt it yet to a CD ROM. I open my xVM VirtualBox and mount this ISO image on it by browsing to its saved folder. These all intuitively can be done. Then I start my virtual machine. I already had selected "Other" as name of machine to remember that type of my virtual machine is unspecified. When machine starts it automatically finds the mounted image and then GParted loads. I find it better to use graphical default GParted for a non-partitioned hard disk. In GParted GUI menu I create these partitions: first an extended 2GB second a primary 9Gb and third a primary 9Gb. I create three logical partition inside the first extended partition: first a 16Mb FAT16 for XOSL (it comes as 24Mb) then an ex2 logical with 250Mb capacity and remaining FAT32 for Freedos. I format next primary partition with NTFS for my first XP Windows. I leave the last partition for later. That I selected extended partition as first partition was to overpower myths regarding "first partition" usage. GParted promise is that that its partitions are rounded to "cylinder" but I cannot rely on that due to the fact that in its GUI I could not find any option for selecting number of heads. When you normalise the geometry of the partition and read CHS (Cylinder, Head, Sector), say by Ranish partition tools sometimes you get fractions. It is better to do a basic partitioning and then restart GParted in its "Debian" command lines and, using fdisk utility, fine tune partitions based on a CHS calculated as H=255, S=63 and C should be got through calculations, rather than default of GParted that uses only H=16. This default gives thousands of cylinder. For H=255 and S=63 each roughly 8Mb is one cylinder. Hence, for 24Mb I select 3 cylinders, for 250Mb I select 30 cylinders for Freedos I select 220 cylinders and so on.

Saturday, 30 May 2009

Working with Virtual Box

My goal is not to run a virtual desktop in my PC. I do that but not for the jobs I counted in previous post. Virtualization has found its applications mostly in corporate computing from the time that Novell introduced its workstation software for Microsoft server software to be installed in place of Windows 2000 workstation. One good usage of virtual boxes is to test beta and candidate software. For example, now I am doing it with Microsoft's future operating system Windows 7 RC with 30Gb of virtual hard disk. I can have it free for more than a year with VIP services of volunteer users. It is not advisable to install a not very stable operating system on a hard disk that contains side by side the missus's emails and social networking and her daily software, except that you like to sleep on the couch with the pooch. (Well, they don't rhyme.) Ergo, you put it safely on the virtual box and if it doesn't behave you simply drop everything in the recycle bin and start anew. Anyway, I was talking about my GParted virtual experiments. I do them with virtual hard disk and when I become confident that I have done everything correctly and all necessary details have been put on the paper and the risk of doing them on a roaring and working hard disk with valuable assets are almost nil then I transfer my experience on the live and kicking hard disk. This is the way that modern engineers do their jobs. When You send a box round the Mars and it takes five years for such a project you cannot revise it at its destination. Everything should work as it is drafted on the paper. One should predict unpredictable. One way of achieving that is procuring redundancy, that is, having alternative devices and slack paths in the project. Perhaps people can remember story of Titanic ship sank in 1912. In the design of the vessel, modern finance management for optimization of costs had forced design engineers to show their confidence by reducing the number of lifeboats to the half of the necessary items that should be predicated for saving all crews and passengers in a belief of a never-sinking vessel design. To that reason, why any boat should be provided at all; for fishing day-out of some passengers? Actually, a modern engineer should provide more than enough of lifeboats in redundancy, in case some rich people might avoid being crammed with smelly people in the same lifeboat on a sinking accident. That lesson in terms of computer means, "Always keep a backup for your valuable data!" The other trick of engineers is called "simulation." It means repeating the desired job in a safe environment and finding what is not predicted correctly and what goes wrong. Then eliminating those obstacles and moving to the harsher level of simulation such that their design can safely pass the worst case scenarios. My virtual box helps me to simulate things in a safe environment without harming valuable assets of others.

Friday, 29 May 2009

Using Virtual PC Box

I fell a bit far from my GParted discussion. My goal is to create comfortable environments for writing assembly codes and debugging and writing drivers. Meanwhile, I craft to make hardware more friendly for me. I created a custom GParted.iso that included some additional software to install GParted permanently on hard disk. I need it for partitioning and also to use its good command line "Debian" Linux flavour. If I simply install a GParted on the hard disk, later in case, running it from GParted Live CD may cause complications, such as locking the live version. Hence, I should always keep the option of running both from the hard disk and from the Live CD in my GRUB menu. To do that I put sbootmgr.dsk and memdisk files into the root of my customized ISO. Some advised that I should have memdisk.bin. The correct, as Linux advises, is just memdisk without .bin extension. I can take it from syslinux or isolinux folder in GParted. I get sbootmgr.dsk from here. Now I have my GParted.iso built by ImgBurn ready to be tested on My Sun's VirtualBox. I install VirtualBox and I open it. From the tool bar I select "New" and I follow GUI for creating a new virtual PC. For the type of PC operating system I have different options. I can select a Microsoft Windows, a Sun Solaris, a Linux, a Dos or finally an unspecified shown as "Other." I select this very last one. In this way I do not bound me to later default choices of VirtualBox. I select a 374Mb for the RAM of my virtual PC. A dynamically expandable virtual hard disk with generous 20Gb space later allows me to put my ideas better in practice. The goal is to just install two XP operating systems next to each other and some little things such as a DOS system and of course GParted and XOSL.

Thursday, 28 May 2009

Tools That I Need

I need tools to develop applications. Applications are pieces of software to do a task for me on my computer. I use any computer programming language to achieve that goal. To this end I do not need to use complicated software. Software that by its turn needs time to learn to utilize. I can use a notepad and carefully write my program on it avoiding mistakes, editing it as much as possible. But to test and run this program, I definitely need a compiler to translate my program to codes understandable by my CPU. When I get a compiler, frequently, provider of that compiler put a piece of software for you integrated with compiler that allows people to design and write and then run and test their programs in the environment integrated with the desired compiler and find their errors and correct them and re-run it again and again. This is called Integrated Development Environment (IDE). Some times IDEs can support environments for a panoply of compilers. An example of that is NetBeans IDE that supports numerous compilers such as Java, C (C++), and FORTRAN. There are facilities that shows errors on the fly and intelligently creates codes for you. Together I need tools to create database. With NetBeans I can have access to the very powerful and free database utilities suite, MySql. From within a Java application you can access to database created by MySql. Similarly, one might use Visual Studio free Express edition from Microsoft. It is the case when you like to develop your software in C, C++, or Visual Basic. It is very handy if one needs to develop programs for windows. It is called windows programming. From the Visual Studio suite one can install Microsoft SQL server for creating and running database from within the application. Good thing about Microsoft Visual C++ IDE is that I can write assembly codes and assemble them inside my project. A full blood debugging, that is watching CPU and memory in machine code is another story. One should leave other businesses to utilize them. It is also true for writing device drivers for kernel of an operating system.

Tuesday, 26 May 2009

Virtual Box

VMWare has a free virtual machine player. That player is not a virtual machine. Optimum virtual PC that I use is Virtual Box from Sun Microsystems. It is under constant development and informs you in periods of time, quarterly or sooner, of updated versions with enhanced features and is backed by Sun Microsystems technology. If you go here you can have a look at different useful development tools and click on Sun Virtual Box and then be guided to its download area. We know that sun is the first developer of a virtual machine, Java Virtual Machine (JVM). Job of JVM is different from virtual boxes I am discussing. JVM takes a piece of code from an application smashes it into the bytes. In this way that application becomes independent of length of the word of host computer and becomes portable over the Internet into the different platforms. It remains for that host computer to have a small free JVM installed in a corner. In real experience it facilitates things drastically. That said. some believe that it is a matter of habit mostly than technology. You have a set of tools at the Sun's place, you can have a similar set all free from Microsoft Visual Studio Express edition and a similar set free from IBM and similarly from Oracle. And I'll discuss them later, hopefully.

Sunday, 24 May 2009

Virtual Box

There are many virtual desktops available that I can use them. This software is a piece of application that I can install on my computer like any other application but when I run it, it gives me a virtual PC similar to my own computer. Now I can configure that virtual PC such that it is possible to install any operating system on it regardless your own running operating system. (Perhaps you have seen exotic California oranges that have a full orange inside their cores. I have seen some with a third one inside that core. One told me he had seen four layers to the core and as big as a melon.) For example I have an XP home edition operating system, but I can install a Sun Solaris operating system on my virtual PC and work inside that as if it is a Solaris machine. When you are running your virtual PC you have options to create one or more than one PC on it. They are called "machines." One can find different virtual PC software, some free and some purchasable. Best of them I have experienced with belongs VMWare. One can trial test it free, but after ending the trial period you have to purchase the licence should you opt to use them. Good point about VMWare is that it does not load the CPU much. You see, they are virtual so at the end of the day they have to use your very real CPU. And at the same time your CPU has to run your real operating system in the background for all the real jobs that your computer is doing including running of virtual PC software. The other good thing about VMWare is when you are running your own operating system additionally on virtual desktop. Then a conflict of licence key happens. VMWare can solve that conflict by negotiating the key with operating system vendor. One can configure VMWare as a target machine for debugging when developing driver software. You can virtually null terminate port of your debuggee to the debugger machine. These are somehow advanced and one cannot use a family computer for debuugging. (If you open the door to any debugger then you should separate all ordinary jobs to another computer.) After sometimes ease of working with virtual PC makes you so lazy that you almost forget that you need another machine for experiment or multibooting. Inside that machine any trouble is isolated from your real PC and if trouble continues you can safely delete the machine and its virtual hard disk. See, you have installed Solaris on your virtual machine and now it does not connects to network. You go on the Internet from your background PC and google for solutions. On the other hand, more sophisticated virtual PCs devour your CPU and need almost all of your physical memory. Microsoft virtual PC is free but not designed for my XP home edition. It works on XP-home, but gives you warning every time you turn it on. It also asks for licence key if you install your own XP on it. So you cannot run XP on it for more than thirty days.

Wednesday, 20 May 2009

Making Enhanced GParted ISO Image

To make GParted.iso bootable, ImgBurn helps us in finding the image of the floppy which can boot CDROM. Any bootable CD carries such an image. If one is very kin or perhaps uber-geek, he might build that manually himself. Later I delineate my own attempts on that. I already had selected "creating ISO image from a folder" from ImgBurn menu. On the right side of the user interface for this command there is a "tabbed" pane. I open the "Advanced" tab from this. There I can see another "tabbed" system and a "tab" for "Bootable Disc." When I check the box at the top for "Make Image Bootable" then it makes the input fields "enabled." I see that I can brows to target "boot image file" wherever it is. I had created an empty folder, as I already said, and had filled it with extract of original downloaded GParted.iso. I brows into this folder and then open isolinux folder. Inside that ImgBurn picks the isolinux.bin as the boot image for my enhanced Gparted ISO CD image. I leave every other things to ImgBurn defaults and confirm all other dialogues. ImgBurn creates desired image in a minute or two. I do not need to burn this image to test it. I use a virtual machine to that end.