Another World Headline Animator

Another World

Photography

http://www.flickr.com/photos/sroyc/

I am a "Photographic artist" and take suitable assignments.

Leave your comment with contact details.

Google Ads

Saturday, December 30, 2006

Dual Booting Linux: A Pictorial Guide


The credit of the original guide and the images goes to Bertender of TSF. I am thankful to him for allowing me to post it in my blog. I have done some editing only, but the original flavour is retained.
_____________________________________________________

This example used two Linux Distros: PCLOS and Ubuntu 6.01. But this method can be used to Dual Boot any two Linux Distros.
____________________________________________________

This guide describes dual-booting PCLOS on a computer that already has Ubuntu 6.10 installed and has been partitioned beforehand to accept another Linux OS. Partitioning was already described in first part [the preceding post in this Blog].

Restart PC, drop PCLOS CD in tray, “Welcome to PCLinuxOS”

  • Sign in as - Username: root, Password: root, move mouse to 'Login', Left-click
  • When you get to the PCLOS desktop, double-click on 'Install PCLinuxOS'
  • “This wizard will help you install...” Next
  • “Normal Hard Drive (ide, sata) Next
  • Choose 'Custom disk partitioning' Next
  • “Please make a backup of your data first” OK
You get the Draklive – Install Enhanced partition map. I left-clicked on the second ext3 partition, (hda2) then left-clicked on “mount point”.

New window pops up, with “/” showing in the 'Mount point' line. I clicked “OK” and get this



Notice how the map shows two “Journalised FS: ext3” partitions, denoted in the dark red, and one bright green swap. It's saying the same thing as Gparted once you understand the language. Notice also that we have “/” showing in the second partition, /dev/hda2. That's where we want it to go.

Since the HDD already has a swap partition I don't need to make one. If I wanted to make a separate 'home' partition I'd click on hda2, then click on the “resize” button, then go through those steps, which seem fairly straightforward. We're keeping this simple so I'm just building one partition for PCLOS.

Click on “Done”

'Choose the partitions you want to format' – hda2 is checked off already so I just click on “Next” even though it's already in the proper format for PCLOS to just go ahead and install.

Big warning sign that you're about to format...Click "Next"

'Please wait Formatting hda2' 'Press Next to Install or Cancel to Quit'....."Next"

'Copying in progress' Long wait, then 'Please wait...Creating mount points and preparing bootloader' .


Pay attention.. You want to make 2 changes – change 'Bootloader to use' from 'LILO' to 'GRUB with text' and you want to install the boot device to /dev/hda2. What you're doing is telling PCLOS to use GRUB instead of LILO and install it in the same partition with the rest of the OS.

Click "Next"

Now I get a window that says,

“You decided to install the bootloader on a partition. This implies you already have a bootloader on the hard drive you boot (eg: System Commander). On which drive are you booting?”

hda is checked, I click......"Next"

Note: It's interesting that PCLOS pops up a warning at this point. What we're doing is not typical and that's why you get a cautionary message. For the average Joe who's installing one Linux distro the bootloader will install at the front of the HDD.


New window that lists four entires in boot menu. I chose to leave this alone. Why? Because I didn't know what the heck it meant.

****This screen gives you the list operating system as recorded in the grub.conf file of PCLOS. The first two lines tells you that there are two Linux OSes installed in the HDD, one Fail-Safe option available in case some system changes makes the Linux unbootable. The last line tells you that Windows is installed in the PC in the 2nd HDD's first partition and the 2nd HDD is SATA.

Though it appears to be a weakness of PCLOS' GRUB that it does not tell you which line belongs to which Linux Distro. Personally Ubuntu's GRUB I found to be better as it recognises other OSes present in the machine, adds those automatically to GRUB's OS choice menu and tells you the location of every available OS in the HDD with respective Distro name.

At this PCLOS screen user can manually input locations of other OSes present in the PC and not recognised by the PC, that is editing the grub.conf file; though I also feel that one should stay out of that at least at this stage.****

Click......"Finish"



Set administrator (root) password. Type something in twice, or choose no password at all,....."Next"

Enter a user

Real name:
Login name: (it auto-entered my first name after I finished the above line)
Password:
Password (again):

I just used the same password for root and user since I don't have any security issues at home...

****If you are going to surf internet and use it for general purpose, it is always advisable to have a non-root user account used, for sheer security issues. It is not Windows, and so you are allowed to change anything and everything. Sometimes those changes will simply make your computer unbootable with Linux. Moreover you can do almost everything as a non root user using 'sudo -i' or 'sudo' commands in the terminal window.****

Change your icon if you wish........"Next"

'Please halt your computer, remove the CD, restart...'

I clicked on the PCLOS icon in lower left, chose 'Log out', clicked on 'Restart Computer'

PCLOS looks like it's going to shut down, but opens optical tray and waits for you to remove CD, then hit Enter before it does so. PC restarts, and Ubuntu boots. As far as I could tell there was no PCLOS on the machine. Have faith.

In Ubuntu, open terminal, type in sudo gedit /boot/grub/menu.lst

Find the timeout line, about 17 lines down from the top, and increase that to 10 or 15 seconds at least.

Right after the Ubuntu memtest section, towards the bottom of menu.lst, add these three lines

title PCLinuxOS
rootnoverify (hd0,1)
chainloader +1

Here's what the lower part of my menu.lst looked like after the additions...

title Ubuntu, kernel 2.6.17-10-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.17-10-generic root=/dev/hda1 ro quiet splash
initrd /boot/initrd.img-2.6.17-10-generic
quiet
savedefault
boot

title Ubuntu, kernel 2.6.17-10-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.17-10-generic root=/dev/hda1 ro single
initrd /boot/initrd.img-2.6.17-10-generic
boot

title Ubuntu, memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
quiet
boot

title PCLinuxOS
rootnoverify (hd0,1)
chainloader +1

### END DEBIAN AUTOMAGIC KERNELS LIST

Make sure to put a blank line above and below the new entries.

I tapped the Tab button to separate 'title' from 'PCLinuxOS', same for the other 2 lines. Worked out fine.

Save the changes, close out of terminal. Restart the PC.

On the next boot, Ubuntu's GRUB waits the amount of time that you just set in /boot/grub/menu.lst. I find 15 seconds to be a comfortable minimum. During the timeout you hit 'Esc' to enter GRUB list, scroll down to PCLinuxOS, hit Enter and you get an odd DOS-looking screen with some PCLOS boot options. Don't touch anything and PCLOS will boot in a few seconds.

****To avoid this editing and directly boot in the Linux, just remember to install the PCLOS' GRUB in the (hd0), that is the boot partition at the beginning of your primary HDD. But remember this will simply wipe your previously installed Ubuntu's GRUB and make the GRUB of PCLOS as the default. This happens that because by default BIOS always looks for the Boot information in the Primary HDD's boot partition [that is the first partition]. If you are still interested to use Ubuntu's GRUB [which I would prefer personally], you just need to reinstall Ubuntu's GRUB, and voila! You have your old Ubuntu boot loader back and with PCLOS listed there automatically.****

Unless you want to log in as root, use the username and password that you created under the 'user' window several steps back. The username is on the screen, up in the left hand corner, so all you have to remember is the password.

OK, some explanation of the 3 menu.lst entires are in order.

For those of you who think the command line is an unforgiving disciplinarian, you might get a kick out of this. If you type in:

title Toasted Cheese Sandwich

then 'Toasted Cheese Sandwich' is what will show up in the GRUB menu during startup. You can type whatever you want as your title. Don't worry, it'll still successfully go to your Linux install.

The next line is not so forgiving. It MUST specify the correct partition, and that's expressed in GRUB-speak. For our model Linux says, “PCLOS is in hda2” but GRUB says, “PCLOS is in hd0,1”

That's still not very clear, is it? Let's say you wanted to make a triple-boot Linux PC. You made a third primary partition, then installed Mint Linux (and its bootloader!) to that partition. You would add three more entries to menu.lst, and they'd go like this:

title Mint Linux
rootnoverify (hd0,2)
chainloader +1

Note: I wasn't just winging it when I wrote this guide. I took a HDD with Ubuntu on it, made a second partition, and went thru all of the above steps. I mistakenly typed (hd0,2) into menu.lst. Saved, rebooted, toggled down to 'PCLinuxOS' and GRUB followed my directions. Since hd0,2 was the extended partition, and there was no bootloader to be found, the screen set at “Starting up...” until I held down the power button and went looking for my mistake.


****So in a nutshell the most important thing is the location of the Linux Distro on your HDD. Boot loader does not give a damn what you write in the 'title' line, it always goes to the 2nd line and looks for the root partition location of that distro.****

You now have most of the info you'd need to do a triple-boot, because the third line is always the same.

The only trick would be making sure to install GRUB to the distro's partition. That's because each one is different. Ubuntu gives you a little tiny box on the very last page of the installer for changing GRUB. It's easy to miss.

Gparted: A Pictorial Guide

The credit of the original guide and the images goes to Bertender of TSF. I am thankful to him for allowing me to post it in my blog. I have done some editing only, but the original flavour is retained.
__________________________________________________

Some Basic Moves with Gparted

Disclaimer: I'm not a Linux expert. Don't get me wrong, the guide works. But this little exercise was like wandering around some huge mansion. Every doorway opened into a new hall with more doorways. Most of these new halls promised mysterious new opportunities for mayhem. It was frustrating to write this because I felt a need to add “I don't know what would happen if you did this instead of that” every few lines. So I'll say it once and we'll move on.



The Goal and the Assumptions


The goal here is to set up a HDD for a dual-boot Linux install as simply as possible. The Gparted
LiveCD (GPLCD) includes text-based partitioners but we're going to stick with the nice big graphics interface.

The assumptions are that you already have a Linux distro installed. As you will see when we get into this, you could just as easily have a blank HDD or one with Windows or whatever on it, but it's so easy to delete all previous data with the GPLCD that I'm going to stick to the plan.

Step 1: Download the latest GPLCD and convert the .iso to a bootable CD. This is the same process you'd use to make a bootable Linux CD from the .iso download. Check to make sure your BIOS is set to boot from optical drive. Toss in the CD, restart the PC.

  1. Gnome Partition Editor 3.0 splash screen Press “Enter” or wait 20 seconds.
  2. Extra Boot Options I pressed “Enter” key
  3. LiveCD Language - US English “Enter” “Enter”
  4. LiveCD Keymap - qwerty “Enter”
  5. Display Depth - 24 “Enter”
  6. LiveCD XRES – 1024X768 “Enter”

Gnome Partition Editor 3.0 splash returns while CD spins hard. I get the Gparted partition map, some text below describing partitions, and a panel along bottom of screen with options.

Sometimes the panel along the bottom edge of the screen comes up incorrectly and I can only see the top of it. I right-clicked on the panel, left-clicked on “Customize Panel”. A window pops up saying panel is 48 pixels. I bumped that up one pixel, Close, and the panel displayed OK. I went back into “Customize” and set it back to 48, and the panel was still OK, so it's just a glitch.

Let's establish some terminology. Working down from the top, we have 2 tool bars, a map of the
partitions, and a text list of the partitions. Once you create a job for GPLCD a new window pops up in the lower part of the screen that lists pending tasks. Here's what the original install looks like – just Ubuntu 6.10, installed automatically to the entire HDD. As simple as it gets.





GPLCD with Ubuntu 6.10

One huge primary partition, and one extended partition with Linux swap tucked inside. I don't know enough about partitions to explain extended partitions. I just know that the typical Linux installer will make an extended partition and Linux swap will nestle inside it.

****ext3 is the file system that the present Linux System follows, its predecessor was ext2. As Windows prefer NTFS, Linux uses ext3. SWAP is the Linux analog of the Windows' Page file. Its file system is also called SWAP. It is best to make a new logical partition of about double the size of available RAM, and ask the Installer or Partitioning utility like Gparted to format it as Linux SWAP. If nothing is mentioned Linux will by default create a separate SWAP space in the Root [mentioned as Primary in this tutorial] Partition. But tis will degrade Linux performance considerably. If you have 2 HDDs, the best option is to make the Root in the Master HDD and the SWAP in the 2nd HDD.****

The simplest thing to do would be just create another ext3 primary partition, but if you do that the extended partition will hold on to its designation as hda2 and your new primary will be hda3. I didn't like that, so I wiped the extended partition out and rebuilt it after making the second primary.


Resize /dev/hda1




  1. Right-click on hda1 anywhere on the map.
  2. Left-click 'Resize'
  3. Click on the right-hand edge of the partition and drag it to the left (as shown above)
  4. When the counters are even (or wherever you want them) release the mouse
  5. Click on 'Resize/Move' click on Apply in the second tool bar
  6. Apply in the new window
  7. Close
Get Rid of Linux swap

  1. Right-click on the Linux swap in map
  2. Delete
  3. Apply > Apply > Close
  4. Now go down to the text list, right-click on hda2
  5. Delete
  6. Apply > Apply > Close
Results of Resizing Primary and Removing swap




We now have the resized primary with 6.10 still intact, and one unallocated section of 56.9 GiB


Create Second Primary Partition


  1. Right-click on unallocated section of map
  2. Click on “New”
  3. Create as: Primary Partition
  4. File system: ext3 (take a look at above screen shot)
  5. Grab right edge of partition and drag it back to make room for swap. I chose 2 GB. What the hey
  6. Click 'Add' Apply > Apply > Close

Rebuild Linux Swap


  • 1. Right-click on unallocated section of map, click “New”
  • 2. Create as 'Extended Partition' (see above)
  • 3. Add > Apply > Apply > Close


  • 4. Now you go down to the text part, and right-click on the “unallocated” line, click “New”
  • 5. Filesystem: 'linux-swap'
  • 6. Add > Apply > Apply > Close

That wasn't so bad, was it?

You now have two primary ext3 partitions and one swap inside its extended partition. Don't forget, two or more Linux distros can share the one swap partition.


To close out of GPLCD, click the red “Shut Down” button. You get an “Eject and Reboot” window. Click OK. The optical drive tray opens. Take out your GPLCD, click OK, PC reboots.


Note: Once or twice now GPLCD didn't shut down correctly. It ejected the CD, then closed the tray, then it sat there. I waited several minutes, then held down the power button for 5 seconds. Didn't affect the results at all.


One thing I worried about was whether changing the name of the swap partition would bork the
existing Linux install. So after removing GPLCD and rebooting Ubuntu 6.10 I ran sudo fdisk -l. It reported the new extended and swap locations correctly as hda3 and hda5. If I knew how to actually test swap usage I would but I think it's OK.


******GParted is a GUI based third party partition manager but not like Partition Magic; you need to boot with it to use it. Its based on FluxBox Linux flavor. It gives you more consistent results than Partition magic or other commercial partition managers,and it can handle all sorts of file types quite perfectly. Moreover it comes free. This is a gem of Free and Open Source Software Movement. I hope this guide will help more people to use Gplcd as well as other Open Source Softwares.******


Tuesday, November 07, 2006

Using pirut to add new packages in Fedora Core

****UPDATE****

This method can be used for FC6 too.
______________________________

I use Fedora Core 5, so this tutorial is written based on that, though it should work perfectly with other distros too.

1. Create a directory on your system to hold the repository. It will need to be on a
file system that has at least 3GB of free space. Then copy the RPM packages and comps.xml
file from your CD images into it.This directory can be made in a FAT32 partition provided you have edited your fstab file to enable Linux to automount those partition and also you have atleast read access.
--------------------------------------------------------

# mkdir -p /path/to/your/repo/RPMS
# cd /path/to/your/repo
# mkdir disc1 disc2 disc3 disc4 disc5
# mount -r -o loop /path/to/FC-5-i386-disc1.iso disc1
# mount -r -o loop /path/to/FC-5-i386-disc2.iso disc2
# mount -r -o loop /path/to/FC-5-i386-disc3.iso disc3
# mount -r -o loop /path/to/FC-5-i386-disc4.iso disc4
# mount -r -o loop /path/to/FC-5-i386-disc5.iso disc5
# cp disc*/Fedora/RPMS/* RPMS ----This comand copies all the available RPMs to the user specified directory. If due to any reason this command does not work, then you can manually copy all the RPMs to your desired directory. Its better to create this directory in a ext2/3 file system. Otherwise this process may fail.


# cp disc1/repodata/comps.xml ----THIS IS VERY IMPORTANT STEP. DO NOT FORGET TO COPY THIS FILE. Remember to copy this file to the immediate parent directory of the folder where you copied your RPMs. Eg, if you copied your RPMs to /var/yum/RPM then copy this file to /var/yum.

________________________________________________


2. You no longer need the CD images, so you can unmount them and remove the mountpoint
directories.

# umount disc1 disc2 disc3 disc4 disc5
# rmdir disc1 disc2 disc3 disc4 disc5

_____________________________________________


3. In this step we are going to edit three system files. So before you edit them, DO NOT FORGET TO CREATE BACKUPS of these three files in their original forms. As you are going to need them to be put back if you want to update or install from net.

Now navigate to the folder /etc/yum.repo.d and find the file fedora-core.repo. Open this file in a text editor like gedit. Now add the following lines at the top of the file


[Fedora-Core-5-local-install]
name=Fedora Core $releasever - $basearch
baseurl=file:///var/yum
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

You can find three more paragraphs like this after your newly inserted one. Put enabled=0 in all those three paragraphs. Do this similarly to other two files named fedora-extras.repo and fedora-update.repo.

4. Now reboot and you should be able to use your ADD/REMOVE Softwares [PIRUT] to install all the other packages available in the CDs [like Thunderbird].
===========================

This tutorial's process is not entirely mine. I found these informations on net while searching. I edited and compiled it giving some of my own input :D.

Saturday, August 12, 2006

Broadband and VSNL

Hi friends. For your own benifit please read on.

I took a prepaid connectiion from VSNL aka TATA Indicom and I would like to share my nightmarish experience with you. I paid for 6 months but for the first two months I could not use it atall because of their technical difficulty. There customer service can be termed as poorest of all. I made 18 complins in the first 2 months and none was properly taken care of. Then they tried to solve it installing a dial up connection but that also did not help and so now they are squarely blaming my PC. Though in this same PC BSNL broadband runs without any problems. Till date I made 30 or so complains but they could not solve it. The behaviour of the local customer service people are horrible. I requested them a number of times to compensate my loss but they never even cared to answer.!?! I even wrote to their customer service president but the result remains the same.

VSNL/TATA INDICOM IS THE BIGGEST CHEAT IN INDIA. I request all my readers not to go for their connection otherwise you will also be duped like me. Apart from above drawbacks their quality of connection is also very poor. No matter what is the problem they will simply put the blame on the customers.

If any of you readers also have any direct or indirect experience to share like mine please voice your protest here.

Friday, June 09, 2006

Death of Zarquawi- is it really the beginning of the end?

Well I really do not think so. Lets preview the whole matter from a basic socio political point of view. The question of terrorism is debated for quite a while now- what someone calls a terrorist act, someone else calls it a just war or Jihad. Yes the issue can be termed as 'relativistic' in nature but I believe that there is one parameter advocated as something which can really draw a thin line between a just war and terrorism and that is who get victimized. If they kill common people then they are terrorists. Truly it has become a common feature that the common people are the worst sufferers in this situation of anarchy and the both warring sides are to be blamed for this. No body cares to find out what really the commoners want, be it Kashmir, Iraq, Iran, UK or USA. Because both the sides try to establish their own political agenda. Even in these terrorist groups it won't be hard to find 'fighters' who came to join them not because of any political/religious ideologies but to earn bread and butter for themselves and their families. Then how they are different from normal soldiers except that these 'fighters' are not affiliated to any county's government. After being recruited things are not much different from the regular army! In a regular army new recruits are brainwashed in a way that they think that every killing is a act of bravery and for that they will be paid. The same thing happens in a 'terrorist group' here new recruiters are taught that they are also killing in the name of a supreme ideology. But the killings remains killing anyway!! So at last it is the common people who have to suffer and they suffer not because of 'terrorists' but because of the just warriors too - equally by both sides.
So it bring the whole topic back to the comment that I made at the beginning that the KILLINGS are not going to stop with one death. Another Zarqawi will rise and this will continue until and unless the basic question is tried to be answered in a basic way. There'll always be people to fight for either Osama or Bush. Unless commoners basic needs are addressed this killings will never stop. Military should be there to defend the borders of their respective countries, not killing and fighting on a foreign soil to increase the vote ratings of their political leaders. Similarly an ideology can never propose killing of innocent civilians in the name of anything.