Showing posts with label Hard Disk Partitioning. Show all posts
Showing posts with label Hard Disk Partitioning. Show all posts

Sunday, 19 July 2009

XOSL: Use or not to Use?

A simple answer is no. XOSL has been expired in terms of being fashionable anymore. Nobody took that fallen bearing after its original developer. Well, open sources mean “with no guarantee.” But actually it is not the case. That slogan is for legal formalism. I do not believe that a responsible developer means by that phrase that he has created a “crap” application. Open source developers are always around, eagerly waiting for reporting bugs from  potential end-users and happy to answer their questions and helping them. One way of becoming rich and a reputable corporate owner or highly demanded employee is to develop high quality, open source, free products. But if a day comes that they say, “Well, now we have some other business and do not have a time to take care of our open product and nobody is interested to continue professionally to support our free applications," then after a certain period of time one cannot and should not use that goods anymore. It is only good for gaining experience, gaining familiarity with some principle or historical background. After that, one should go to living products with the developers around to interact in case. This is why I leave XOSL and go to GRUB boot loader. My XOSL worked fine from the within of an extended partition on a logical partition there and could load a GRUB boot loader for a Linux “Debian” flavour “ex2” partition.

Saturday, 27 June 2009

Creating Partition on Virtual Box

After finishing on creating partition, it is a good idea to roam around “Debian” and become used to its environment. Just enter “ls”  to get a list of facilities that I got on the root. if I enter “ls /sbin” I’ll get a list of loads of utilities available for me. One is “mke2fs” that creates Ext2 file system for Linux partition. I can remember that I liked to install permanently a GParted on an extended logical partition at the beginning of my hard disk. I enter “mke2fs –L GParted /dev/hda6” at the command prompt. It does its job and creates a Linux partition on my hda6 logical device. I use option “–L GParted” to have a volume label for my partition, besides. I notice always to keep the required blank spaces. before and after that option in the command and after “L”. Now I run an “–pfv e2fsck /dev/hda6” to have some expert information about my logical device. Again those switches help me to keep things under control and unattended. I should plan everything ahead and leave them to be done without having  been around to watch them. At the end I can read the report or any log file to find out what has gone. So “unattended but verbose” is desired. Now it is time to “mount” the logical partition on a directory. I can create any directory that I like, but already there is a directory in “Debian” for that: it is “/mnt” directory on the root. I enter “mount /dev/hda6 /mnt”. At times it is necessary to use “mount –t ext2 /dev/hda6 /mnt” to explicitly guide the commands to the type of mounted partition. Now, everything is fresh and clean and I do not need to do that. I have the device mounted now I start to install my own image and directories. I follow advise of GParted site. I should decompress GParted.zip into the root of “/mnt”. I should find the place of “unzip” command and gparted .zip on the CD image that right now I have live on the RAM disk space. If I enter just “ls” I see a “live” folder in the list. I enter “cd live” that takes my inside the “live” directory. There I have two folders: “cow” and “image” I enter “cd image” Here is the list of all files and folders that I put when I was creating my custom GParted CD ROM. Among them now I need gparted.zip and “unzip”. They are here. Now I follow GParted website command but I should have all paths in commands. Alternatively I can copy these two files to the root of “Debian live RAM” I enter “/live/image/unzip /live/image/gparted.zip –d /mnt”. I note that I should repeat the complete path for each file and folder and unzip is completely case sensitive. Switch “ – d” shows the directory of installation. I did whatever GParted advised. From here, or at the root I check “ls /mnt” and find out every thing is as it should. I have “COPYING” file at the root. From now on it works on the hard disk but now I am in a logical partition and have other plans hence I need a “GRUB” for loading this device from “XOSL” I go into the root and enter “mkdir /mnt/boot” That creates the required “/boot” directory for installing “GRUB”. Then I enter “/sbin/grub-install ––no-floppy ––root-directory=/mnt /dev/hda6 ” Switch –no-floppy shows that I do not use a floppy for loading “—root-directory=/mnt is the place that “GRUB” finds its “/boot” directory as already created and ready and at the end we have installing device. Usually “GRUB” gives a warning about “device.map” that should be ignored. I can inspect “ls /mnt/boot/grub” for installed folders. It is better to sort out things by invoking GRUB command environment by entering “sudo grub” There at the “grub>” prompt, I enter  “find /bbot/grub/stage1” It replies “(hd0,5)” It is in the brackets and I know that it means the partition number 6 (5+1) on the device number 1 (=0+1). Grub counts from zero rather than one. Then at the “grub>” prompt I enter “root (hd0,5)” It replies “file system type is ext2fs, partition type ex83” both have the same meaning. Then I enter “setup (hd0,5)” It gives few lines of message and news of successful installation. Then I enter “quit” and back to “Debian” command prompt. So far so good. Now remains to edit the “menu.lst” of GRUbB and a nice splash for it.

Saturday, 20 June 2009

Creating Partitions on Virtual Disks

After those calculations, I have better idea of what going on in hypothetical geometry of hard disks. Now I open my xVM virtualBox. I create a “New” machine. For operating system I select “Other.” For the Version, I select “other,” for version. I select a new virtual hard disk for it as much as 16Gb. I mount my custom made GParted.iso as CD on the “Other” machine and then I start the machine. It boots from GParted.iso.  I select the second row from the GParted menu, to be able to un-mount the CD if I opt to. Then I select the default key map of GParted. And finally I select the language from the language menu. After that a menu loads that ask me for three options: [0], [1], and [2]. I select [2] to take me to the GParted “Debian” command. Then I type “fdisk /dev/hda” at the prompt and then “enter.” It gives number of cylinders C=33288, and usual Linux warning on exceeding C=1024 and then subcommands for “fdisk” comes as “command (m for help).” If I type “m” and then “enter” a list of available commands and at the bottom “x” for expert commands. I type “x” and “enter.” A sub-subcommand comes for expert commands. In this if I type “m” and “enter” another list comes for available expert sub-subcommands. Now I type “c” to change number of cylinders and “enter.” A prompt offers me possible number of cylinders from 1 to 33288. I type 2088 as my previous calculations show. It accepts. Then I type “s” to confirm number of sectors. I can change it for adventure but not for work. I select the default S=63 without any change by typing 63 at the prompt and “enter.” Then I type “h” and “enter” to change heads. It offers me from one to 255 and default 16. I type 255 for H=255 and “enter.” At the next prompt I type “r” to go back to “fdisk” non-expert subcommand prompt. To do my partitions I type “n” and “enter.” It asks me with a help menu “type e for extended” and “type p for primary.” I enter “e” Then it asks me for partition number (1-4). Here I adventure to put the extended partition at the beginning of the disk contrary to usual practice that puts it at the end. I enter “1” Then it asks me for the size. It asks me for beginning cylinder by offering (1 to 2088). Here I get confirmation that my calculated scheme is under way. I enter “1”  and then for the end of extended partition I enter “40” I leave 2048 cylinder for two XP side by side. Then again I enter “n” This time it offers me “l for logical partition” since we cannot have any more extended partition but we can have only logical partitions inside the extended partition. I enter “p” and it asks me for partition number (2 to 4). I select “2” This time it offers 41 for beginning of partition as default that I accept by entering for the end of partition I type 1064 (=40+1024) I confine number of cylinder to its maximum of 1024. I repeat the procedure for the last partition from 1065 to 2088. Then again I enter “n” - what for this time? to create logical partitions inside extended partition. At the next menu, I enter “l” for logical partition. It offers me to select a number (5 and greater) since logical partitions at any situation begin from 5. I enter “5” Then It asks for the beginning that I enter default cylinder “1” and for the end I enter “3” This is my XOSL partition, 24Mb. I cannot have less than this. I repeat the procedure for second logical partition that keeps my customized GParted from cylinder 4 to cylinder 40 in partition “6”. Now I have four partitions ready. I type “a” at the “fdisk” subcommand to make GParted partition bootable. It asks me for the partition number (1 to 6). I enter “6”. To be sure of my operation I enter “p” It gives a list of my partition with their number of cylinders as “/dev/hda1” –the extended partition, “/dev/hda2” – the first primary, “/dev/hda3”, as the other primary,  “/dev/hda5” first logical and at last “/dev/hda6” the other logical partition. I can see a “*” is next to “/dev/hda6” showing that it is bootable. I enter “w” to save the partition table and come out of the “fdisk” subcommand.

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.

Friday, 15 May 2009

Injecting Files into ISO Image

ISO images are read only files and one can't inject files into them. Hence to add some bits and pieces to my GParted.iso I need to extract the ISO into an ordinary folder and then inject, or rather add, extra files and folders to it. To be able to do that extraction Ther are two methods.
First, download a virtual drive software. This software instals a virtual CD/DVD driver on your computer similar to your real CD/DVD/Blu-ray driver. Only that instead of real CD/DVD/Blu-ray you put a an ISO image on it. Then you can open that image and copy the content of that image into your computer. Then add (inject) your additional files into the content. And at last create a second new ISO that includes the injected files. There are many virtual drivers out there, but the one that I have used is the free Daemon Tool Light When you are installing it be careful not to accept its optional features such as the toolbar if you do not agree with them. Only instal the virtual drive. Also download it from its official website; otherwise, you might end up downloading annoying bloated softwares and ad-wares. Also there are many other products are advertised in the page that you should carefully find Daemon download among them.
In second method, I downloaded WinImage tools from here. This tool is not free but you can use it for thirty days free and meanwhile sort out your projects. I created a new folder in "My Documents" named it with GParted ISO file, showing versions and everything similar to my GParted version. Only I deleted .iso from its name. The folder is empty. Then I opened WinImage tool. From the "File" menu item "Open" command, I opened the GParted.iso. All files and folders inside the image appears in explorer frame and navigation pane of WinImage. I notice that the CD image includes isolinux but GParted.zip for hard disk included syslinux as it is obvious from their application. Isolinux puts an ISO image of a CD on the memory, syslinux puts the image from a hard disk on the physical memory. Then I go to "Image" menu item "Extract" command and brows to GParted empty folder I have created in "My Documents" to extract all files and folders of ISO CD in this folder. Now contents of ISO are accessible for adding new items. I added "unzip" file to the root of folder to use it later on my "Debian" command line for unzipping GParted.zip. I also added file GParted.zip to the root. Now I can reconstruct the folder back to a new ISO image of mine, using free "ImgBurn: Image Burn" utility as I explain in the next post.
Update, 25 February 2014 : You might find these two wikis useful, too.
They include images and are step-by-step. Moreover, they are more recent than this post.
Note that in Windows 8/8.1 you do not need a virtual drive. Just right click on an ISO image, select "Open with" from the context menu and then from  the secondary menu, choose "Windows Explorer" to open the file. Windows promptly creates a Virtual DVD drives and opens ISO inside that drive. Please, "eject" that drive after finishing working with the ISO to release your resources. Nevertheless, you need to copy files from that location to other locations to be able to manipulate them. ISO images are "read-only" files.


Sunday, 10 May 2009

GParted Has Commandline Linux

I always had two floppies of Basic Linux 3 to work on command line Linux. Now by permanent installing of GParted I have a more powerful tools. In due time I write what should be added to these tools to make them more ideal. For that reason I selected a more relax space for GParted. I also couldn't use the tools available in this minimalist Debian to unzip GParted.zip downloaded for installing on hard disk. Gunzip and Zcat give "more than one entry point" error. They cannot decompress Gzipped by "7Z" either. Curtis Gedak from GParted kindly instructed me, by private communication, that to use good old free "Zip" and "Unzip" from here. I selected "unz550x-glibc.zip" from the list. From the unzipped folder I only need to have the file "unzip," some hundred kilo bytes. Other pieces could be useful but not right now.Later I should inject this to GParted CD iso image that I have together with other things.

Friday, 17 April 2009

Multi-booting Windows XP

When I installed my XP and fully patched it with all service packs and updates and watched its fresh install then I turn my computer fully off and switch off the main socket and without unplugging the cable I reconnect my spare hard disks; both of their data cables and power cables. Then I switch on the main socket and turn on computer. I allow it to completely loads the operating system and finds back spare hard disks and brings all bubble messages and finishes parking the hard disk. At this moment I point to start and in the menu I right click on "My Computer" and select "Manage" in the context. It opens the computer management window. I select "Disk Management" there to show my installed hard disks. When I find everything sound and safe, I select the unallocated space at the beginning of my main hard drive and partition it with extended partition of some 4Gb (4100Mb). Inside the extended partition I allocate some 4050Mb for FreeDos at the top and the remaining, some 50Mb (it is Mb) for XOSL at the bottom. These two new partitions inside the extended partition should be formatted with FAT32 file system.

Thursday, 16 April 2009

Using GParted for Partitions of Different File Systems

I have a 250Gb hard disk for my operating system(s). I like to put two identical XP's on it. One for me and one for my wife. I do not like to use two different screen names. Let me do with my software developments and she does with emails and photos and social networking and uTubes without friction. But still I have not done that. It is easy to put two instances of XP on two different hard disks on the same machine and then command them with XOSL, but on the same hard disk you should eliminate some hurdles. I also have a free Solaris. So I need a place to exchange files between Solaris and XP. I need a small partition for my FreeDos as much as 4Gb and a tinny independent place as 50Mb for XOSL. I can put it inside the Freedos partition but I'd rather not since I might need frequently erase FreeDos and re-install it for improved usage. XP partition, I keep it within its 128Gb limit of old version BIOS's. This will be partitioned in NTFS. I use GParted to do this partition. I disconnect my other hard disk drives from inside the computer case, both data cable and power cable. Before opening the case I should turn the main socket off but I leave the plug connected, to keep the earth connection as it is. I disconnect the other drives to prevent the complications that occurs when installing operating systems on the main drive when installation reads all the hardware pieces and you might become confused and inadvertently one might format other disks and install operating system there. Then I switch the socket back. I put my latest version burned CD of GParted iso in the optical drive - hopefully now all have a DVD-combo drive at least or better - and restart the computer. When it turns on it goes on GParted Live Cd. It is not necessary to change the BIOS boot sequence. I accept all defaults of the GParted. In GParted menu I can see my main hard disk. I select all partitions on it and remove all of them to have one new unallocated whole disk. Then I select from the menu "partition" then "new" and a dialogue comes out to ask about the size and file system format. I select 120Gb and "linux swap" for the file format and choose SOLARIS for name. For the remaining part I select NTFS file system format and choose XP as name for it. Its size is almost 128Gb. I do this since at the time of installation of XP when it is searching for partition to install, XP completely ignores "linux swap" as unknown partition and without any complication formats its partition and installs on its own NTFS even if it is from an oem cd set. Later I can come back with my GParted Live and partition the first part. I need to put the other things at the begining partition. I can do the other way but when I am more comfortable with these kinds of operations. When XP is installed you can use the disk manager for creating partitions for FreeDos and XOSL.