A few things, mostly technical notes...

Monday, June 06, 2005

How to force a panic/crash in Linux?


You can evoke a crash/panic by:

echo c > /proc/sysrq-trigger

System can be forced to crash from the console by pressing: "Alt-syrq-c"

What are the command keys and what do they do?

'r' - Turns off keyboard raw mode and sets it to XLATE.

'k' - Secure Access Key (SAK) Kills all programs on the current virtual
console. NOTE: See important comments below in SAK section.

'b' - Will immediately reboot the system without syncing or unmounting
your disks.

'c' - Intentionally crash the system without syncing or unmounting
your disks. This is most useful if the NETDUMP client package
has been installed.

'o' - Will shut your system off (if configured and supported).

's' - Will attempt to sync all mounted filesystems.

'u' - Will attempt to remount all mounted filesystems read-only.

'p' - Will dump the current registers and flags to your console.

't' - Will dump a list of current tasks and their information to your
console.

'm' - Will dump current memory info to your console.

'0'-'9' - Sets the console log level, controlling which kernel messages
will be printed to your console. ('0', for example would make
it so that only emergency messages like PANICs or OOPSes would
make it to your console.)

'e' - Send a SIGTERM to all processes, except for init.

'i' - Send a SIGKILL to all processes, except for init.

'l' - Send a SIGKILL to all processes, INCLUDING init. (Your system
will be non-functional after this.)

'h' - Will display help ( actually any other key than those listed
above will display help. but 'h' is easy to remember :-)

See sysrq.txt somewhere underneath /usr/src/linux-XXX/Documentation for more information.


Thursday, May 12, 2005

/sbin/lvm.static in rhel4.0 systems

RHEL 4.0 has lvm2. There is an executable file /sbin/lvm.static, and this is to explain what it does.

     o The full set of LVM2 commands is now installed in /usr/sbin/. In boot
environments where /usr/ is not available, it is necessary to prefix
each command with /sbin/lvm.static (/sbin/lvm.static vgchange -ay, for
example).

       In environments where /usr/ is available, it is no longer necessary to
prefix each command with lvm (/usr/sbin/lvm vgchange -ay becomes
/usr/sbin/vgchange -ay, for example).

o The new LVM2 commands (such as /usr/sbin/vgchange -ay and
/sbin/lvm.static vgchange -ay) detect if you are running a 2.4 kernel,
and transparently invoke the old LVM1 commands if appropriate. The
LVM1 commands have been renamed to end with ".lvm1" (for example,
/sbin/vgchange.lvm1 -ay).

See this link for more information.

Saturday, April 23, 2005

GandhiCon 3 ? M$ to Support Linux in Virtual Server 2005

M$ has announced support for Linux in its virtualization software, Virtual Server 2005.

Follow the /. thread for more. Here is the news link.

From that thread:
"A VM-type OS is larger and much more complex. In a proprietary VM, it would be easy to hide a test for a specific OS so that it couldn't be found. You could break arbitrary parts of the target OS, and it would be extremely difficult for the OS's supporters to diagnose what you've done and program around it. They've done it in the past; they'll do it in the future. "

Yeah, if guest_os is linux, MS Virtual Server probably *will* slow that instance down.

MS's Steve Ballmer in a statement made in year 2000 stated that "Linux is communism. " , and later as "Linux is Cancer" (2001).

I guess, that all have changed now, huh?

IE, like FireFox to support Tabbed Browsing too?

It is not about Maxthon, nor about MYIE2.

Following what Firefox has, IE6 is soon to support Tabbed Browsing with an update to the MSN toolbar.

They are going to have an RSS aggregator too.

More at this link.


Its about time the buggy software changed a bit since it is last inception, which was umm.. err.. 4 years ago?

Monday, April 18, 2005

Does Linux LVM support alternate PV links?

Stuff has changed and evolved over time.

Answer: NO.

Linux LVM knows nothing about the alternate path to your PV. If you extend your volume group to the alternate PV, LVM treats the alt device as if it were a new PV.

When the system starts up, it calls vgscan to scan all the devices; and I don't know what lvm2 does when it finds lvm2 VGDA on the alternate PVs. Perhaps, it just ignores it.

With the Demise of Sistina, looks like the official stance is to advise mdadm etc. Neverthless, that also is kind of incomplete, as mdadm has on-disk metadata and modifies it and hence is NOT cluster-safe for concurrent activation.

Not sure about EVMs, whether it supports alternate PV links. More on that later...


Drop a comment if you have something to say on Linux LVM.

Sunday, April 17, 2005

Setting up ssh equivalency between Linux hosts

Alright, most of the decent and latest Linux ssh are version 2. Hence I am to cut the crap and get directly onto how to get this to work.

Say, you have hostA, which should get to hostB as root without a password.

We got to tell hostB the public keys of hostA. We have to create keys first for hostA. Login as root onto hostA, and run:

# ssh-keygen -b 1024 -t dsa

This would created a file, id_dsa.pub mostly in $HOME/.ssh directory.

Cut and paste this file's contents onto a file authorized_keys2 in $HOME/.ssh/ directory of the other host.

If you are trying to get in as root, make sure that your sshd_config (usually it is /etc/ssh/sshd_config ) has "PermitRootLogin yes".

If you're making changes to sshd_config, make sure you restart sshd to bring those changes into effect. sshd can be restarted as "service sshd restart" as root.

Now, from hostA, run ssh hostB. If its the first time you're sshing to hostB, you may see a question like: "Are you sure you want to continue connecting (yes/no)? " , say yes, and bingo you're good to go...

Thursday, April 14, 2005

Second field in /etc/shadow explained.

An interesting thing about RHEL /etc/shadow file.

Its about the second field of /etc/shadow (if shadow passwords are enabled).

If the value is ! or *, the account is locked and the user is not allowed to log in.

If the value is !! a password has never been set before (and the user, not having set a password, will not be able to log in).

More here...

To disable an user, just replace the second field in his/her /etc/shadow entry with * or ! .

Wednesday, April 13, 2005

CNET.com --- stupid, mindless IT journalism.

Cnet article about DNS outages at Comcast explains DNS as:

"The DNS system essentially routes one's Internet protocol address to the appropriate Web site that the user wants to visit. "

Original Article here. Screenshot of article is at this link.

Huh? WTF?

They got that wrong, and backwards.

Essentially, a DNS server resolves the hostnames to an IP address.

Stop smoking, Cnet...!!

Friday, April 08, 2005

Microsoft Corp. v. Zamos (Goliath .v. David)

University of Akron student David Zamos bought educational copies of Microsoft Windows and Office XP Pro for $60 each. After realizing he'd have to wipe his computer to install them, he tried to return them. The college would not take them, neither would Microsoft. He was forced to keep them. The kid sold the un-opened pieces of the software on E-bay. Microsoft sued him for thousands of dollars in damages, their lawyers threatened to take his Ford Escort to recover $ 143.50.

Zamos has been fighting .

In short, instead of caving into
high-powered attorneys for the Software Giant, he decides to fight back, and goes to the press. Goliath is hit. Read on here...

Devsense, fusion
Google

Saturday, April 02, 2005

Gmail grows and Gmail ROCKS..!!

Looks like my Inbox just grew bigger.

I've now 1854 MB.



MSN Hotmail, you suck. Comes to mind is the time when I had 2MB as my Inbox Limit.

Yahoo's 6MB in those days were a true Luxury...!!

Best of all, Gmail lets me access from Thunderbird.

Oh, and I've not seen a spam in my Gmail Inbox.

Wednesday, March 09, 2005

Can you trust download.com?

Was reading about the Security Fix for PuTTY dated Feb 20, 2005, I stumbled upon this on their download page:

2004-12-23 Trojan PuTTY installer circulating

We've been alerted to a trojan PuTTY 0.56 installer that was posted on CNET's download.com for about a fortnight (now removed). We are informed it installed various spyware.

The file length was 509860 bytes (much shorter than any installer we've ever released) and the md5sum was 49550e478e9dd008998c2c5294a884c5.

We'd like to take this opportunity to encourage everyone to verify the signatures of PuTTY downloads before executing them. Details are on our Keys page.

Another solid proof that you cannot trust downloads.com and similar sites. Not that they wrote the program, they are just storing it to be downloaded, but still Spyware gets inside there copy. Whew...!!

Tuesday, March 08, 2005

Adblock options explained...

Gathered the following mostly from the forums.

Obj-Tabs:

This would place a translucent tab next to Flash movies and similar Objects, which can be clicked for blocking.

Collapse Blocked Elements:

Adblock will remove the space left where the blocked Object was.

Check Parent Links:

Adblock will also filter on the URL the ads point to, and not only their own URL. That is, the objects from a blocked server will also be blocked when this option is enabled.

Site Blocking:

If enabled, it will display Blocked Sites. If disabled, it shows the site in your filter list, but will not display any Objects.

See this for more info.

Tuesday, March 01, 2005

Gmail Down?



Tue Mar 1 12:43:53 EST 2005:

From the looks of it, incoming mails are not working at gmail. I could send out emails, but have not gotten the replies -- realised this when I called them up.

This is from the web interface of gmail.

Anyways, Gmail is in Beta, so cannot bitch about this aloud.

Thursday, February 24, 2005

How RAM is used in Linux



Stumbled upon a very good post here, which explains why "top" or similar utils always show all your RAM being used.

mine:> free -m
total used free shared buffers cached
Mem: 91 84 7 20 21 15
-/+ buffers/cache: 47 44
Swap: 513 58 455

The -/+ buffers/cache line shows how much memory is being used and is free.
91 Meg is the RAM available after being reserved plus occupied by Kernel (which
cannot be swapped out) .

You're good if you are not swapping much. I've ~ 58 Megs of swap being used, well, it is normal with hardly 90 some Megs of RAM.

Quote from sapphirecat's original thread: " The reason Linux uses so much memory for disk cache is because the RAM is wasted if it isn't used. Keeping the cache means that if something needs the same data again, there's a good chance it will still be in the cache in memory. Fetching the information from there is around 1,000 times quicker than getting it from the hard disk. If it's not found in the cache, the hard disk needs to be read anyway, but in that case nothing has been lost in time. "

RHEL ES 4.0 release 1 -- miseries while kickstarting..

Okay, I got a DL 360 to play with, has two Broadcom cards and the installer loads tg3.ko as the drivers, and it says links is up at 100 Half.



Hmmm...

Okay, but later fails to get a dhcp response from the network.



And, throws you back at:



When you hit enter, still asking it to get response from dhcp, it cannot even find the device(?):



Alright.

Now if you assign IP addresses manually and hit enter, it will not still get onto the network:



Arrgghh..!!

Now I pop in a floppy (vfat) with a ks.cfg which has static IP details in it, and boot the box with linux ks=floppy argument...

Look what happens, it cannot even read the floppy.




Updated (03.01.2005) :

I've submitted this as bug 149682 on Feb 24 to bugzilla. Here is the link.

Followers


Creative Commons License
This work is licensed under a Creative Commons License.