Monday, September 27, 2004

Boohoo!

Today, I thought, "Why do I use Windows?" n' pat came the answer, "Outlook!". Yes, the only real reason I select DOS in GRUB each time is 'cuz checking mail n' the calendar wuz never easier than with Outlook. OK, I did get Evolution to behave really well, but what if IS (Information Systems) decide one day, to take away the exclusive SMTP/POP access that I enjoy here? How did this happen?

Well.. I went home once last year n' tried to configure Outlook Express to work. It didn't. I got back n' raised a complaint that my SMTP/POP didn't work. I think someone enabled just my username! That wuz that n' it even helped me in my previous project where I had to configure Winfax' internal mail client to work. Predictably, it worked only with my login, n' not even with my PM's! :p

OK, so if IS suddenly discover the undeserved privilege that I've been accorded, they might just strip me of access. I will then have to fall back on the MS Exchange 2000 access that everyone else has. Why not get it to work in Linux? 'cuz therez only Ximian Connector that will support it.

I fought with obstinate wget to get Red Carpet installed, to no avail. But perseverance paid off today, when I found the Novell location where I could download Connector without red-carpet! I did it n' discovered that it required a newer version of Evolution. Well, I found that there too..!!

But it asked for this package and that.. n' I gave up trying to download dependencies. I then hit upon GARNOME which is currently taking care of all my troubles. I hope everything's OK when I get back tomorrow..

Update: It wasn't. GARNOME also did its part of the asking- it wanted libbz2..

Thursday, September 23, 2004

ProjDemise

Tho' I shall try to the utmost to keep it alive, Linux stuff will henceforth cease.. 'cuz I got assigned a new testing project, where we have to try n' automate testing. For this, we looked at STAF, which is available for Windows too. STAF works with Perl. So I'm trying to learn some Perl. I came across this excellent tutorial, which I'm going through now..

Tuesday, September 21, 2004

Hard drive

With that BAD fs [filesystem] report, I wonder if my hard drive will conk off?! I guess I should take an image of C: sometime. Cool.. if what I'm working on is developed, one would be able to take a snapshot of Linux as well! Herez some interesting stuff Manu told me, which I didn't know earlier.

The hard drive has an MBR, which has the location of the OS on the Primary Partition. From what I understood, when you install Linux on a computer running Windows, this location is overwritten with that of GRUB (the multi-boot boot loader). At the same time, GRUB records the location of the Windows OS loader. So, when you switch on the computer, the first thing that comes up is GRUB. It lets you choose between booting Linux or Windows. Neat, huh?

I came across this lovely page on RAID.
EVMS interfaces to the disk through two interfaces:
1) DM, i.e. Device Mapper (regular, striped n' RAID0 disks), and
2) MD, i.e. Multiple Device (used for RAID0/1/4/5 n' linear devices)

I've to trace the code from /usr/src/evms-2.3.4/ui/cli/evms.c (Command-Line Interface) to find out how the engine (/usr/src/evms-2.3.4/engine/) uses dm and md. Great Scott!

Me trying to read evms code
On how to create an inode
I'm browsing with Source Insight
But C's putting up a valiant fight
Guess I'll soon have to hit the road

Its working!

Finally got EVMS working y'day. I connected a Fujitsu 4 GB hard disk to play around with. I managed to do a %: fdisk hdb and get away with it :D

After the 'd' and 'w' commands, it did pop up the same thing about the new partition table and kernel adopting the old table till reboot. I almost burst into tears, but decided to reboot n' check to see if it really wuz screwed. Thanked my stars when GRUB loaded and the kernel came up OK..

Once in a while, the computer still craps about the filesystem when I start it, and obstinately forces a check. PartitionMagic still calls Disk1's partition type 'BAD' and probably wants it spanked :p

Here's how to create a snapshot with EVMS. After you install it, do a
%: ldconfig or else you'll be scolded for missing a library!
[Thank God it doesn't ask you to replace all the books :| OK sorry!]

%: evms_activate
%: evms

EVMS : create:segment,hdb_freespace1,size=100MB

(You could open %: evmsgui and click the small +'s to find out which /dev/hd has enough freespace..)
This will return a handle (the hd created). Lets assume its hdb1.

EVMS : create:container,LvmRegMgr={name="container",pe_size=16MB},hdb1
EVMS : create:region,LvmRegMgr={name="region",size=100MB},"lvm/container/Freespace"
EVMS : create:object,Snapshot={original="/dev/evms/hda1",snapshot=snap},"lvm/container/region"
EVMS : create:volume,snap,n="volume"

(Here, /dev/evms/hda1 is the drive you want to take a snapshot of.)

Tip: If you want your Windows partition mounted when you start Linux, herez the line you could add in your /etc/fstab file.

/dev/hda1      /mnt/C      auto   auto,users,ro   0 0

Replace the first parameter with your Windows drive and the second with the directory where you want it mounted. n' btw there's a Explore2FS utility, which lets you view your Linux partitions in Windows :)

Friday, September 17, 2004

Firefox

Hooboy! I'm finally up and running! WITH NTFS support..

Here's something I wanna tell ya about. Mozilla's Preview Release 1.0 of Firefox. If you're using Linux and was cribbing like me that you couldn't get any blog stuff to work, go and get it before you do anything else!!

The blogger 'insert link' button works properly unlike in Mozilla. I heard first about Firefox from a post on nidrajiva's blog and decided to try it out after reading Ashik's comment about a blogger plugin. Well folks, it does exist! Neat job, complete with the all-important OPML import/export too! n' if you are an Opera fan just for mouse gestures, here's an extension for that! ;)

More plugins exist, but this thoughtful Gmail Notifier is special indeed!

Why?!

Oh Why?! Did it happen to me?! I remember selecting Keep old partitions and use free space, when I installed Redhat. Well, I checked %: /dev and found a coupla extra hdxs. Mounted them n' discovered that my old linux partitions were intact. Retrieved all my downloads into my current partition. n' wonder of wonders! I could also mount my NTFS partitions in 2.4.26!

Well.. but I found out that the new installation had used up all the 7 GB I'd freed from my Windows partitions using Disk Management (Right-click My Computer, select Manage and navigate in Computer Management). I approached Manu n' he told me the higher numbers were the newly created partitions n' so I could delete the old linux / and swap partitions to free up space. I launched %: fdisk. Note that hitting 'p' and 'd' to your heart's content doesn't affect anything permanently, until you deliver the final death-blow 'w', which writes the table to partition and exits. Well, all was well until it popped up a scary message saying the new table is unacceptable and that the kernel would use the old table till reboot.

I typed in reboot n' waited. The computer presented me with.. GRUB in text! A grub> prompt waited for me to respond. I gazed stupidly at the screen, thoughts tumbling one over the other. The prospect of Windows being wiped out struck me full n' hard in the face. I got up groggily n' tottered over to Manu's desk. Breathlessly, I told him what happened.. He sauntered over n' casually asked me to insert the Redhat Installation CD. The bash prompt came up n' he entered that dreadful command: %: fdisk. We watched n' waited. He gingerly pressed 'p' n' it printed the partition table..

Hurrah! My Windows partitions are intact! I thought I'd truly lost both my OS's. I couldn't care less if Linux was wiped out, which it wuz as soon as Manu deleted all the ext partitions.! He restarted the computer n' it brought up the Redhat Install screen without an Upgrade option. I set to the task of reinstalling everything.. again.. This time I made no mistake. Remove all Linux partitions n' Install Redhat.

I'm back to square one. Up n' running.. on 2.4.20-8.
PHEW! TGIF! Have a great weekend!!

eth0

When I restarted and booted the new kernel, it did not Bring up my eth0 (in my case, an IntelĀ® PRO/1000 Gigabit Ethernet adapter). I discovered you HAVE to support it as a loadable module in the Network Devices section Ethernet (1000 Mbit), when you configure the kernel.

But then, it Failed to obtain IP information. I wonder why only the new kernel presented these problems. Well, running %: neat, which incidentally is the Network Configuration tool, Editing the Device and Statically setting the IP address resolved the problem.

You'd do well to sign up at Experts Exchange!
I'm up and blogging on 2.4.26 now.. :D

Thursday, September 16, 2004

Kernel compile

Make sure you have devfsd installed in your old kernel. This is 'cuz once you build the new kernel, it maps drives assuming you have devfs in your old kernel, n' I didn't!! All thanks to Damaru for helping me with this one!

While you configure the kernel, make sure you enable support for your sound card, ethernet controller n' other devices. You can include them with the kernel, or as loadable modules. In the latter case, you'll find them as .o's in the lib/modules/2.4.26/kernel/drivers/ directory. You can insert them with the /sbin/insmod command. /sbin/lsmod lists your loaded modules. Note that if you've included them with the kernel, they won't be listed! n' do a %: ln -s /linux-2.4.26/ linux to ease things. Ah, but I digress..

Fine! Now you're ready for some serious making out ;)
%: make dep ; make bzImage ; make modules ; make modules_install

You could do a %: make install too, so that your boot loader file (/etc/grub.conf in my case, as I use GRUB) is updated to display your new kernel. Now you type in %: reboot to do the obvious..

Kernel 2.4.26

I hit an issue when I tried to install D4X. The GLIB [GNU Library probly] needs to be version 2.4.0 or higher. I decided I'd better do all this after getting on with the immediate need of upgrading the 2.4.20-8 kernel which came with the Redhat 9.0 distro, to 2.4.26, so that I can run EVMS.

I need EVMS for my project. n' it needs 2.4.26. The EVMS website gives you ALL the instructions you need to building the new kernel and getting EVMS to work with it. Make sure you get device-mapper.1.00.18, 'cuz EVMS doesn't work well with 1.00.19.

Also, if you're using a multi-boot with Windows like I am, make sure you configure the kernel %: make xconfig to support the appropriate file system (NTFS in my case- Windows 2000) so that you can mount your Windows partitions in Linux. The %:mount /dev/hdXX /mnt/C -t ntfs worked perfectly in 2.4.20-8. However, I couldn't get it to work in 2.4.26. You might need to download the latest Linux-NTFS driver.

/usr/bin

I did something ingenious about an hour ago. I was removing opera from my system in order to install Mozilla's new pre-release version 1.0 of Firefox. Well.. did a few %: locate operas to find out the folders and wuz merrily doing %:rm -Rf directory_name when I did it on /usr/bin. :`-(

Trust me. Do NOT try this at home.. or in the office.. or anywhere else for that matter! :( Ah well! Looking on the bright side of things, I can at least relive my experience from scratch on this blog :) I'm up n' running now with just evolution in my %:ls /home/sankarnk output!

Wednesday, September 15, 2004

Lynx

I used to browse the web when I was in 10th std. with my shell internet account. It was my first experience with UNIX, 'cuz my ISP (VSNL) ran a UNIX host which I connected to (using HyperTerminal) thru' dial-up. My account allowed 500 hours of access for Rs.5k per year. The TCP/IP equivalent cost thrice as much. I used Lynx, a text browser.

Here are some Links. Thanx to Vin's comments, I had a discussion with Kishore on RAM. I found this nice Memory Primer on the net. However, for knowledge on hardware in general, I recommend howstuffworks. Today on the Computer Channel, Vinu's needs have strangely been catered to by a page on How BIOS Works.

Tuesday, September 14, 2004

Download

D4X is one app I can't live without! OpenOffice.org is another thing that falls in the same category. When you want software that can do a particular task, you'd do well to look for it on the universal resource for a LOT of projects, viz. SourceForge.Net.

Some useful stuff:
1) Gaim n' aMSN - IM apps [I need to make a glossary!]
2) RSSOwl - RSS|ATOM news feed reader (aggregator)
3) NTFS driver - to access your Win2K partitions.

dev

As a developer, you need a tool to browse source code. For my first testing project in avionics, I used Source Insight. Manu just came over to tell me it is in fact, the best tool. Unfortunately its for Windows. Since this is a Linux blog, you should instead, read about Cscope, developed by Bell Labs and an official part of the AT&T UNIX distro. ViM is built in with Cscope support, so I'm all excited! Read about it!

Install

My favorite editor is ViM. Incidentally, I love it so much, I use it the Windows version of it too.. Once you get used to it, everything else, including Notepad, is trash! Btw, here's a lovely page I came across on chmod.
The equivalent of Windows Explorer in Redhat is a graphical shell called Nautilus (for Gnome). You can access network drives from Nautilus by typing in smb://network_folder in the Location region.

Herez how you install a package. "%" is your shell prompt:

If you have the RPM:
%: rpm -i filename.rpm

If you have the tarball, unzip it:
%: tar xvzf filename.tar.gz
OR
%: tar xvjf filename.tar.bz2

Become root:
%: su

Usually, you've to type in this:
%: ./configure
%: make
%: make install


You could also type in:
%: ./configure ; make ; make install

n' go for a coffee break! ;)

Monday, September 13, 2004

MyConfig

OK, first things first.. here's my configuration:

A Dell OptiPlex GX270 running Redhat 9.0 (Shrike) [Kernel 2.4.20-8]

Why did I put this up? So that people who search Google for problems on this config. are benefitted by solutions published on this blog.

Now that that's over with, lets proceed..

What did I do first? The display was behaving queer. I found out it wuz 'cuz only 1MB RAM wuz being reported by the motherboard. Changing it to 8MB in the BIOS didn't help. So I flashed the BIOS with a previous revision, viz. A02 and it started working fine. But the sound still didn't work. Well, I got the ALSA driver from their site- version 1.0.2a, but there wuz no RPM, so I just did 'make'. Previously it wouldn't detect anything, but then it detected the AC'97 on Intel board, but still /dev/mixer couldn't be written to.

But then I got it working! Next, I configured Samba Server to run successfully on my comp. Then, I discovered Ximian Connector an Email client for Linux, which actually has MS Exchange support! Novell has now made it free! I haven't been able to get it working yet and am still on Ximian Evolution, using SMTP/POP3.

More later..

Wednesday, September 08, 2004

Why SANLinux?

SANLinux can be interpreted in three ways:

1) SAN [Storage Area Networks] Linux
2) SAN[kar's] Linux
3) Linux-san [Mr. Linux]

Pretty weak, eh?
Well, thats how this site will go forth..