Hot keys….

Here is a list of hot keys I use, and what they mean (some are application-specific):

  • CTRL+ALT+BACKSPACE :: Kills the xserver and restarts it – useful if your desktop session just craps its pants and freezes up.
  • CTRL+ALT+F1…F6 :: Switches between console virtual terminals, supporting multiple logins at once – useful for when you are doing multiple things as root when you do not want to use a GUI.
  • CTRL+ALT+F7…F11 :: Switches between multiple GUI sessions – sustains having multiple folks locally logged into their desktops at the same time, great for family PCs.
  • CTRL+ALT+F12 :: Real-time kernel logs – watch ’em scroll by.
  • CTRL+<plus> :: Enlarges font size in Firefox/Mozilla.
  • CTRL+<minus> :: Reduces font size in Firefox/Mozilla.
  • CTRL+ALT+<plus> :: Increases X resolution.
  • CTRL+ALT+<minus> :: Decreases X resolution.
  • CTRL+ESC :: Starts KSystem Guard in KDE -shows the process table (similar to Task Manager in Windows).
  • ALT+TAB :: Tab through running apps, same as in Windows.
  • ALT+1..x :: Switch through tabs in Firefox/Mozilla.
  • CTRL+F1…F12 :: Switch through desktops in KDE.
  • CTRL+C :: Copy – same as in Windows.
  • CTRL+X :: Cut – same as in Windows.
  • CTRL+V :: Paste – same as in Windows.
  • CTRL+Z :: Undo – same as in Windows.
  • CTRL+Y :: Redo – same as in Windows.
  • CTRL+N :: New – same as in Windows.
  • CTRL+S :: Save – same as in Windows.
  • CTRL+A :: Select all – same as in Windows.
  • CTRL+C :: Stop a command or program running at a command line.
  • CTRL+T :: Make a new tab in Firefox/Mozilla.
  • CTRL+M :: Manage your bookmarks in Firefox/Mozilla.

And now for some MAGIC KEYS (only work if they are compiled into the kernel, but real life-savers)…

  • CTRL+ALT+SYSRQ+R :: Sets keyboard from raw mode to XLATE – very useful if your system locks out the keyboard.
  • CTRL+ALT+SYSRQ+S :: Disk sync.
  • CTRL+ALT+SYSRQ+E :: Kills all non-essential processes – doing this will nuke X, but may allo you to get to a console on F1 and reboot gracefully.
  • CTRL+ALT+SYSRQ+I :: Kills everything else except the bare essentials – may as well reboot by this time, but maybe there’s still hope…
  • CTRL+ALT+SYSRQ+B :: Boot – nope, no hope. This will appear as an unclean shutdown, and is the same as bumping the reset button on the front of your box.

Just remember, Raising Skinny Elephants Is Boring. Do it in sequence, from least spectacular to most. I think there are other keys out there, but I do not know what they are. BTW, the SYSRQ key is usually the same as the “Print Screen” key.

Video card upgrade…

Well, I absolutely do not seem to be able to use any nvidia driver past 8776 on my puny 128 meg 5200 nvidia card (AGPx4) – the screen just fritzs whenever I start the xorg server and the system locks up hard. Nothing works except magic key sequences (thank God for those!).

My main machine has an XFX-overclocked 6600GT (128 meg, AGPx8), and I am quite pleased with it, or was. I upgraded a friend’s computer last week with more RAM and a video card (she was only using the on-board intel adapter) – I steered her towards a 7600 GS AGP card (256 meg), and things moved along much more respectably. I, of course, fired up “glxgears” to see what was what, and the thing floored me. That damn card, a $140 GS, was flogging my year-old $200 6600GT by a factor of four, and is five times faster than the quadra 960 I use at work!  I can only guess at how fast the 7600GT is…

But I think I just figured out what I want for Christmas….

(I also think my son will like a 6600GT….)

More kernel 2.6.19…

Well, I have tried on several machines, and only the work machine successfully compiles all the way without errors.  Another would not even compile.  My son’s machine would compile, but then kernel panic’d on reboot because my ATA-Raid card was not read correctly.

I think I’ll wait a while on this version….

Besides, 2.6.18.5 seems fine for now.

Vanilla Kernel HowTo – Version 2.6

I don’t know about other distros, but I am pretty sure this is a method of installing a new 2.6 kernel that will work on just about any distro.

But, I am not sure, so YMMV.

I make it a point to boot into init level 3 (edit /etc/inittab), since I will have to recompile my nvidia module before getting xorg running. This keeps xorg from freaking out on reboot.

The steps I take are such:

  1. Download the latest stable kernel from The Linux Kernel Archive . You can also search here for older releases.
  2. Open a shell or change to a console prompt (CTRL+ALT+F1).
  3. df -h” :: In a shell, make sure there is plenty of space in the root partition (just a sanity check).
  4. mv /path/to/linux-2.6.19.tar.bz2 /usr/src && cd /usr/src” :: Log into a shell as root and move the downloaded kernel file to /usr/src, then go there.
  5. tar xvfj linux-2.6.xx.tar.bz2” :: Extract the contents of the kernel tarball, including it’s directory path info.
  6. ls -l” :: If you list the /usr/src directory, you may have some directories already there, along with the kernel file you just moved and the directory to which you just extracted it.
  7. rm -f linux && ln -s linux-2.6.xx linux && ls -l” :: If there is a linux link (it will probably point to an older linux-2.6.xx directory), delete it, relink it to the new kernel version directory, and verify such.
  8. cd linux” :: Change to the new kernel directory.
  9. make oldconfig” :: This creats a baseline .config file with the kernel build options selected from your running kernel. Saves time and helps insure that the new kernel will have the same success on your platform as the old kernel. Just accept all the defaults to keep changes to a minimum – you can tweak later after you are sure the new kernel work properly.
  10. make && make modules && make modules_install && make install” :: This does all the work – from start to finish, it takes that .config file you made and creates a new kernel off of it, all the modules selected, and installs both, right down to setting up the bootloader (lilo I am sure of, grub I assume so). For lilo, it also runs lilo afterwards.

Now, afterwards, I like to edit my /etc/lilo.conf (I use vi cuz I am used to it, but whatever floats your boat). I will make the new entry default and ensure it is named in the same manner as my other kernel entries. I really like being able to have different kernel versions to choose from, even though I do not use this unless I get into trouble. I run lilo after saving my changes and exiting vi.

Then I reboot. Usually, there are no problems, and I finish up by recompiling my nvidia module and reconfiguring vmware server (“vmware-config.pl”), and typing “X” to test xorg. If all is well, CTRL+ALT+BACKSPACE kills X, and I type “init 5” to start xorg (GDM and KDE). I also save off /usr/src/linux/.config to a config backup folder (on the /home partition) as hostname-2.6.xx.config.

Note 1: The stuff in /usr/src is just for building – if you need space and do not need the kernel headers for compiling software against, you can delete the /usr/src/linux and /usr/src/linux-2.6.xx directories to clear up a few hundred meg on your root partition. The real stuff is under /boot and /lib/modules.

Note 2: If you screw up and something doesn’t work right, or you want to tweak the kernel after a good reboot, go back to /usr/src/linux and “make menuconfig“. You can use other make config options as well for GUI support, but I like menuconfig, since you do not need X or a mouse running to use it. Once done, either repeat step 10, or save the new .config file off, “make mrproper” to clean everything up and return the directory to the same state it was in just after extracting it in step 5 and copy back the modified .config file. Then repeat step 10. What you have to lose is the potential to omit hardware drivers by accident, rendering your computer, say, soundless, for example. What you have to gain is a smaller, lighter, cleaner kernel, that may well run your system faster and improve stability.

Note 3: I have found that if you only add modules and do not go with the “make mrproper” method, the build time is dramitically shortened, as basically only the new items will be compiled. Nice touch.

Note 4: If you tweak your kernel, make sure that in the Filesystems area, you leave ext2 as compiled into the kernel. Regardless of what you use (I use Reiserfs), ext2 appears to be vital to the kernel and should not be a module, much less excluded. The file system you use can be a module, however, which leads me to believe that ext2 plays a role in the kernel boot sequence. In the past, excluding it or making it load as a module has always resulted in a kernel panic on the 2.6 kernel. I haven’t tried it lately, but I also figure that it is probably not a battle worth fighting. My kernels are already down to around 1.3 meg, down from the 1.7+ meg for stock Mandriva 2.6 kernels…. I also make sure LVM and RAID are compiled into the kernel, not as modules, however, for systems I build which use them.

Hope this helps someone else. Compiling a new kernel is not really that tough to do, and can show you a lot about what is going on under the hood.

Kernel 2.6.19….

I upgraded at work from 2.6.18.2. Curiously enough, the lilo problem I had been having (see Mysteries, Puzzles, and Enigmas) at work vanished. Lilo worked great, no weird rescue steps needed.

Everything seemed ok, until I tried to recompile my nvidia driver. It failed on multiple versions of the driver. The nvidia installer log wasn’t much help. I eventually gave up and went back to 18.2 kernel, where nvidia works fine. Same for 18.3.
I suppose if it is a real problem, I’ll learn more about it from other sites soon.

Event Viewer

At work, I can really get into a good groove working on our intranet. It is small, but interesting to work on. What can knock me out of that groove and really just poison the day is being snapped back to the reality of working with Windows by encountering another limitation. So, I need to search the event logs of a print server for a printer IP address, as a way of determining who is printing to it. Maybe I am approaching it wrong, I don’t know. But the most straightforward approach seems to be to search the logs. I forgot, however, that there seems to be no built-in way to parse through days and weeks of log entries, akin to grep’ing logs on a linux server, for Windows. I resigned myself to finding a vendor-provided or open-source free tool to do such. Googling found some items from Microsoft, but no download links. It was the end of the day, I was tired and frustrated from having to go to such lengths to do what seemed to be such a simple task, and the one tool I was able to download is command-line run with cryptic help options.

Maybe I am looking at this the wrong way, and should be focused on a different manner of determining who is printing to a printer than looking through the system event logs for the IP. Shows how much I have forgotten about Windows since I switched to Linux six years ago… This isn’t the first time I have wanted to parse through the logs, however. Seems like the best solution is to buy some third party bolt-on server app with an annual maintenence cost to it.

Why do Windows event logs have to be in some weird binary format? Why can’t they just be text?