11/21/2007

My Folding@Home Home

Your information
User name: nk
Team number:
101861 (old. 90737)

Current/latest unit
Unit name, download time, progress: unitinfo.txt

Statistics
Personal statistics: http://vspx27.stanford.edu/cgi-bin/main.py?qtype=userpage&username=nk&teamnum=101861
Team statistics: http://vspx27.stanford.edu/cgi-bin/main.py?qtype=teampage&teamnum=101861

Project links
Home page: http://folding.stanford.edu
Statistics and project descriptions: http://folding.stanford.edu/stats.html
Downloads: http://folding.stanford.edu/download.html

(If any of the above links appear broken, please visit our home page for current links or an upgraded client program.)

10/19/2007

Recover root password under linux with single user mode

How-To: Recover root password under linux with single user mode

It happens sometime that you can't remember root password. On Linux, recovering root password can be done by booting Linux under a specific mode: single user mode.
This tutorial will show how to boot Linux in single user mode when using GRUB and finally how to change root password.

During normal usage, a Linux OS runs under runlevels between 2 and 5 which corresponds to various multi-user modes. Booting Linux under runlevel 1 will allow one to enter into a specific mode, single user mode. Under such a level, you directly get a root prompt. From there, changing root password is a piece of cake.

1. Entering runlevel 1

Some Linux distribution, such as Ubuntu for instance, offer a specific boot menu entry where it is stated "Recovery Mode" or "Single-User Mode". If this is your case, selecting this menu entry will boot your machine into single user mode, you can carry on with the next part. If not, you might want to read this part.

Using GRUB, you can manually edit the proposed menu entry at boot time. To do so, when GRUB is presenting the menu list (you might need to press ESC first), follow those instructions:

  • use the arrows to select the boot entry you want to modify.
  • press e to edit the entry
  • use the arrows to go to kernel line
  • press e to edit this entry
  • at the end of the line add the word single
  • press ESC to go back to the parent menu
  • press b to boot this kernel

The kernel should be booting as usual (except for the graphical splash screen you might be used to), and you will finally get a root prompt (sh#).

Here we are, we have gained root access to the filesystem, let's finally change the password.

2. Changing root password

As root, changing password does not ask for your old password, therefore running the command:

# passwd

will prompt you for your new password and will ask you to confirm it to make sure there is no typo.

That's it, you can now reboot your box and gain root access again

 

Source: http://www.debuntu.org/recover-root-password-single-user-mode-and-grub

 

 

10/07/2007

Hide Users on the Welcome Screen on Windows XP

Hide Users on the Welcome Screen on Windows XP

When you add an account for certain users with Windows XP, their user names will appear on the Welcome Screen. Sometimes a user needs to be added to a Windows XP machine, because the user needs access (via the network) to resources on the machine, but the user will not be physically logging in on the computer. You can remove this user name from the Welcome Screen, while still maintaining the user account.

  1. Start the Registry Editor
  2. Go to HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ Winlogon \ SpecialAccounts \ UserList \
  3. Right-click an empty space in the right pane and select New > DWORD Value
  4. Name the new value exactly as the Username
  5. Leave the Value data as 0
  6. If you want to enable this user again on the Welcome Screen, either double-click the Username value, and change the Value data to 1, or delete the Username
  7. Close the registry editor

Install Wordpress in Debian Etch

 

Install Wordpress in Debian Etch

 
WordPress is a state-of-the-art semantic personal publishing platform with a focus on aesthetics, web standards, and usability. What a mouthful. WordPress is both free and priceless at the same time.

Wordpress Requirements

* Apache Web server

* PHP 4.2 or greater

* MySQL 3.23.23 or greater

* The mod_rewrite Apache module

First you need to install apache2 with php support and mysql with php support

Apache with PHP Support check here

Mysql Database installation check here

Mysql with php support you need to run the following command

#apt-get install php4-mysql

after that you need to install wordpress using the follwoing command

#apt-get install wordpress

This will install the wordpress now you need to go to /usr/share/doc/wordpress/example folder to setup apache to point to /usr/share/wordpress. See the examples/apache.conf

Create a file called wordpress under /etc/apache2/sites-available/ and enter the following and save the file

Alias /blog /usr/share/wordpress
<Directory /usr/share/wordpress>
Options FollowSymLinks
AllowOverride Limit Options FileInfo
DirectoryIndex index.php
</Directory>

Now you need to enable this site using the following command

#a2ensite wordpress

Now reload apache using the following command

#/etc/init.d/apache2 restart

Database setup can be done with the help of a script in examples/setup-mysql

To setup mysql database for wordpress you need to follow this

setup-mysql [-n NAME] [-h | -d | -b] FQDN

Creates by default a Wordpress mysql configuration depending on required fully
qualified domain name(FQDN).

Options:
-n name for the mysql user and database
-h help
-d destroy and purge
-b backup

Example: You want your blog to be served from http://blog.example.com for user ‘wordpress’.

Then run:
sudo sh setup-mysql -n wordpress blog.example.com

Example:-

#sh setup-mysql -n wordpress 172.20.2.18

After finishing this you need to go to http://your-server-ip/blog/ you should see the following message

It doesn’t look like you’ve installed WP yet. Try running install.php.

Click on install.php link and you should see the following screen saying welcome to wordpress installation in this click on First Step

 

Source: http://www.debianadmin.com/install-wordpress-in-debian-etch.html

10/06/2007

Reset Debian Firewall

iptables -F INPUT
iptables -P INPUT ACCEPT

10/03/2007

Keeping your clock current, automatically

If you have a system which is doing something important such as handling mail, or running as firewall, it's essential that you keep the correct date and time. This allows your logs to have the correct timestamps upon them.

If you're collecting logs from multiple hosts time becomes even more important. Having the logfiles with wrong dates and times means that you'll be comparing entries out of order.

Thankfully there exists a simple protocol for keeping the dates and times of computers connected to a network in sync. It is called NTP, the Network Time Protocol.

There are several packages related to NTP in the Debian archive, probably the simplest is the client ntpdate.

Install it by running, as root, apt-get install ntpdate, and your machine will be automatically setup to sync time from the public servers which have the name pool.ntp.org.

If you wish to change them to point to an internal time server of your own you can adjust this by editting the file /etc/default/ntpdate.

Source: http://www.debian-administration.org/articles/25

Howto: automatically remove files older than 'x' days

Tape backups have failed me too many times, so I now do my Windows backup to an external hard drive. One of the office staff is in charge of swapping out our backup drives and taking it offsite. I needed a solution that would remove old backups without user intervention so they wouldn’t have to worry about having enough space available for the backup to complete.

My hard drives can hold four backups, so here’s a very simple .vbs script that deletes files from I:\Backup Files that are more than three days old:

Dim Fso

Dim Directory

Dim Modified

Dim Files

Set Fso = CreateObject(”Scripting.FileSystemObject")

Set Directory = Fso.GetFolder(”I:\Backup Files”)

Set Files = Directory.Files

For Each Modified in Files

If DateDiff(”D”, Modified.DateLastModified, Now) > 3 Then Modified.Delete

Next

Save this as filename.vbs

To execute this file, run:

cscript.exe filename.vbs

--------------------------------

You can read all about the 800a0408 error at http://www.computerperformance.co.uk/Logon/code/code_800A0408.htm

The quotation mark is not the correct ASCI character

 

Source: http://thebackroomtech.wordpress.com/2007/06/12/howto-automatically-remove-files-older-than-x-days/

Installing MRTG in Debian

Installing MRTG (Multi Router Traffic Grapher) in Debian
 
Installing MRTG in Debian

#apt-get install mrtg snmpd

The installation will create an mrtg subdirectory where the Apache Web pages reside. On your Debian system the path of this subdirectory is:

/var/www/mrtg

Now you need to edit the mrtg configuration file to edit the some of the settings

File is located at /etc/mrtg.cfg you need to change the global settings as follows

# Global Settings

RunAsDaemon: yes
EnableIPv6: no
WorkDir: /var/www/mrtg
Options[_]: bits,growright
WriteExpires: Yes

Title[^]: Traffic Analysis for

You will find a crontab running every 5 minutes as user root

# cat /etc/cron.d/mrtg
0-55/5 * * * * root if [ -x /usr/bin/mrtg ] && [ -r /etc/mrtg.cfg ]; then env LANG=C /usr/bin/mrtg /etc/mrtg.cfg >> /var/log/mrtg/mrtg.log 2>&1; fi

Now we need to assign the snmp community name in snmp configration file /etc/snmp/snmpd.conf

# sec.name source community
# com2sec paranoid default public
com2sec readonly default public
#com2sec readwrite default private

Now you need to restart the snmp service

#/etc/init.d/snmpd restrat

The configuration file creating using

#cfgmaker public@localhost > /etc/mrtg.cfg

Creating a configuration file for a device using

#cfgmaker public@192.168.0.1 >> /etc/mrtg.cfg

With the configuration file created correctly there's only one other thing you have to do and that's to use the indexmaker utility to create the summary home page. Since you have to re-run this command every time you make certain changes to the /etc/mrtg.cfg configuration file,

Creating index file for the webserver using

#indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html

Now you need to reboot your system wait for five minutes or so and then take a look at your summary home page. If your Debian system's IP address is 172.16.0.20 then you'd type in the following in the address bar of a browser running on a system on the same network:

http://172.16.0.20/mrtg/

Your summary home page should come up with a graph for each target entry in the configuration file. If a graph looks like there's no data on it, click on it and check the statistics to see if any traffic is being seen. Small amounts of traffic won't show up on the graphs because we used the Unscaled statement

Some of examples how to monitor cpu and memory usage

CPU Usage

/etc/mrtg/cpu.cfg

WorkDir: /var/www/localhost/htdocs/mrtg
LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
Target[localhost.cpu]:ssCpuRawUser.0&ssCpuRawUser.0:public@127.0.0.1+ ssCpuRawSystem.0&ssCpuRawSystem.0:public@127.0.0.1+
ssCpuRawNice.0&ssCpuRawNice.0:public@127.0.0.1
RouterUptime[localhost.cpu]: public@127.0.0.1
MaxBytes[localhost.cpu]: 100
Title[localhost.cpu]: CPU Load
PageTop[localhost.cpu]: <H1>Active CPU Load %</H1>
Unscaled[localhost.cpu]: ymwd
ShortLegend[localhost.cpu]: %
YLegend[localhost.cpu]: CPU Utilization
Legend1[localhost.cpu]: Active CPU in % (Load)
Legend2[localhost.cpu]:
Legend3[localhost.cpu]:
Legend4[localhost.cpu]:
LegendI[localhost.cpu]: Active
LegendO[localhost.cpu]:
Options[localhost.cpu]: growright,nopercent

Memory Usage

/etc/mrtg/mem.cfg

LoadMIBs: /usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt
Target[localhost.mem]: .1.3.6.1.4.1.2021.4.6.0&.1.3.6.1.4.1.2021.4.6.0:public@localhost
PageTop[localhost.mem]: <H1>Free Memory</H1>
WorkDir: /var/www/localhost/htdocs/mrtg
Options[localhost.mem]: nopercent,growright,gauge,noinfo
Title[localhost.mem]: Free Memory
MaxBytes[localhost.mem]: 1000000
kMG[localhost.mem]: k,M,G,T,P,X
YLegend[localhost.mem]: bytes
ShortLegend[localhost.mem]: bytes
LegendI[localhost.mem]: Free Memory:
LegendO[localhost.mem]:
Legend1[localhost.mem]: Free memory, not including swap, in bytes

Creating jobs for the above two examples

CPU

/etc/cron.mrtg/cpu

#!/bin/sh
/usr/bin/mrtg /etc/mrtg/cpu.cfg

Memory

/etc/cron.mrtg/mem

#!/bin/sh
/usr/bin/mrtg /etc/mrtg/mem.cfg

Run each script 3 times (disregard the warnings)

/etc/cron.mrtg/cpu
/etc/cron.mrtg/mem

Make the Index Files

#/usr/bin/indexmaker --output=/var/www/mrtg/index.html \
--title="Memory and CPU Usage :)" \
--sort=name \
--enumerate \
/etc/mrtg/cpu.cfg \
/etc/mrtg/mem.cfg

Make the mrtg.cfg file

#cfgmaker --global "WorkDir: /var/www/mrtg/" \
--global "Options[_]: growright,bits" \
--ifref=ip \
public@localhost > /etc/mrtg/mrtg.conf

Cronjob setup

/bin/cat >> /var/spool/cron/crontabs/root
*/5 * * * * /bin/run-parts /etc/cron.mrtg 1> /dev/null

Now you logon to your web browser and check you should see the graphs
 
 

Optimizing SQUID in Linux

cache_mem

This is one of the top two options as far as performance impact goes. The default value here is 8 MB, which is a safe option for just about any system size.  But since your box is not lacking in memory it can safely be raised to 32 MB, and even 48 if you have stripped all other services off of your server.  If your box is lacking in memory, go back to the hardware section and reread the part about memory...you need a bunch of memory for a fast web cache.  You should be aware that cache_mem does not limit the process size of squid.  This sets how much memory squid is allowed to set aside for "hot objects" which are the most recently used objects.  Having said all that, keep in mind that the buffer cache in Linux is also quite good, so the gains you'll see by raising this are very small, but still measurable.

cache_dir

This is where you set the directories you will be using. You should have already mkreiserfs'd your cache directory partitions, so you'll have an easy time deciding the values here.  First, you will want to use about 60% or less  of each cache directory for the web cache.  If you use any more than that you will begin to see a slight degradation in performance. Remember that cache size is not as important as cache speed, since for maximum effectiveness your cache needs only store about a weeks worth of traffic.  You'll also need to define the number of directories and subdirectories.  The formula for deciding that is this:

x=Size of cache dir in KB (i.e. 6GB=~6,000,000KB) y=Average object size

(just use 13KB z=Number of directories per first level directory

`(((x / y) / 256) / 256) * 2 = # of directories

As an example, I use 6GB of each of my 13GB drives, so:

6,000,000 / 13 = 461538.5 / 256 = 1802.9 / 256 = 7 * 2 = 14

So my cache_dir line would look like this:

cache_dir 6000 14 256

Those are really the two important ones.  Everything else  is just picking nits.  You may wish to turn off the store log since there isn't much one can do with it anyway:

cache_store_log none

If, after all of this you still find your squid being overloaded at times, try setting the max_open_disk_fds to some low number.  For a single disk cache, 900 is a good choice.  For a dual disk cache, try 1400.  To get the perfect number for your cache you'll need to keep an eye on the info page from the cache manager during a particularly heavy load period. Watch the file descriptor usage, and then set this number about 10%below it.  This can help your cache ride out the heaviest loads without getting too bogged down.

Also, the following may be set to improve performance marginally:

half_closed_clients off
maximum_object_size 1024 KB

--------------------------------------------------------

Disk space and memory

A cache can always use more disk space, but as the size of your disk-cache grows, you will need more memory to index it. There's a straightforward rule for memory.

Divide the size of your disk cache by 13 Kbytes, and multiply that by 130 bytes. Add the size of cache_mem, and add about 2.5 Mbytes more for executable files, libraries, and other sundry overhead. For example: We have a 10-Gbyte drive, and a cache_mem of 8 Mbytes.

10 Gbytes/13 Kbytes = 769,230
769,230 x 130 bytes = 99,999,900 bytes (or 97,656 Kbytes)
97,656 Kbytes + 2.5 Mbytes + 8 Mbytes = 10,849,656 Kbytes or about 108 Mbytes

The example server needs 108 Mbytes available to Squid to support 10 Gbytes of cache_dir.

Provide as much disk space as you can provide RAM to support it. Squid performs very badly when it starts to swap. Remember to set aside memory for anything else on the machine (DNS, cron, operating system, etc.).

Refresh patterns

Refresh patterns determine the lifetime of the object. Within an object lifetime, Squid will serve the object without requesting an IMS ("if modified since") request. Once the lifetime is exceeded, Squid will keep the object but will send an IMS request to the origin server. If the object has been modified since it was first cached, Squid requests the new copy. If not, it keeps the old copy. Either way, the object is marked as fresh again.

Here's our (default) basic refresh pattern:

refresh_pattern . 0 20% 4320

The dot (.) is the the regular expression pattern, and matches anything. It uses POSIX regular expressions. (See man 7 regex).

The zero (0) is the minimum freshness time. If it's anything other than zero, it will override any expiration headers given with the object. If the content provider actually provided an expiration header, we should usually honor it.

The last term (4320) is the maximum freshness time. The object becomes stale after this many minutes in the cache.

The 20 percent is used for our default case, for when there's no information from the content provider about the lifetime of the object. Squid takes x percent (20 percent in this example) of the difference between the last-modified time of the object and the current time, and uses that as the object lifetime. If the object lifetime is less than the minimum set by the refresh_pattern, it is increased to at least that. If it's greater than the supplied maximum, it's reduced to that.

Non-standard files

Some kinds of files can be maintained much longer than others. Zip, tar.gz, tgz, and .exe files rarely change content without also changing name. Using regular expressions, we can create a set of refresh patterns like this:

refresh_pattern -i exe$ 0 50% 999999 refresh_pattern -i zip$ 0 50% 999999 refresh_pattern -i tar\.gz$ 0 50% 999999 refresh_pattern -i tgz$ 0 50% 999999

Refresh pattern options

Note that these options violate the HTTP standard. Do not use them lightly.

override-expire pretends there is no expiration header on the object and calculates purely based on last-modified times. This permits you to cache sites that abuse the use of expiration headers, but also inhibits updates of frequently changed content (such as news sites).

ignore-reload prevents the object being refreshed when the user presses the refresh button on their browser. This does not perform well when the object has no content length -- you may wind up with a broken object that the users cannot reload.

reload-into-ims transforms reloads into validations. Beware: Web servers may permit an object to be updated without the last-modified time being altered. The server may then insist that the object is still valid when it actually is not.

 

DO increase maximum_object_size. 40 Mbytes is not too large. 800 Mbytes might cache the large downloads.

DO increase the ipcache_size and fqdncache_size.

Source: http://www.linux-faqs.com/squid.php

Source: http://www.linuxdevcenter.com/pub/a/linux/2001/07/26/squid.html?page=2

Server Monitoring With munin And monit On Debian Etch

Version 1.0
Author: Falko Timme <ft [at] falkotimme [dot] com>
Last edited 04/24/2007

In this article I will describe how you can monitor your Debian Etch server with munin and monit. munin produces nifty little graphics about nearly every aspect of your server (load average, memory usage, CPU usage, MySQL throughput, eth0 traffic, etc.) without much configuration, whereas monit checks the availability of services like Apache, MySQL, Postfix and takes the appropriate action such as a restart if it finds a service is not behaving as expected. The combination of the two gives you full monitoring: graphics that let you recognize current or upcoming problems (like "We need a bigger server soon, our load average is increasing rapidly."), and a watchdog that ensures the availability of the monitored services.

Although munin lets you monitor more than one server, we will only discuss the monitoring of the system where it is installed here.

This tutorial was written for Debian Etch, but the configuration should apply to other distributions with little changes as well.

I want to say first that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you!

1 Preliminary Note

Our system's hostname is server1.example.com, and we have a web site www.example.com on it with the document root /var/www/www.example.com/web.

2 Install And Configure munin

To install munin on Debian Etch, we do this:

apt-get install munin munin-node

Next, we must edit the munin configuration file /etc/munin/munin.conf. We want munin to put its output into the directory /var/www/www.example.com/web/monitoring, therefore we change the value of htmldir, and we want it to use the name server1.example.com instead of localhost.localdomain in the HTML output, therefore we replace localhost.localdomain with server1.example.com. Without the comments, the changed file looks like this:

vi /etc/munin/munin.conf

dbdir   /var/lib/munin htmldir /var/www/www.example.com/web/monitoring logdir  /var/log/munin rundir  /var/run/munin  tmpldir /etc/munin/templates  [server1.example.com]     address 127.0.0.1     use_node_name yes

Next we create the directory /var/www/www.example.com/web/monitoring and change its ownership to the user and group munin, otherwise munin cannot place its output in that directory. Then we restart munin:

mkdir -p /var/www/www.example.com/web/monitoring
chown munin:munin /var/www/www.example.com/web/monitoring
/etc/init.d/munin-node restart

Now wait a few minutes so that munin can produce its first output, and then go to http://www.example.com/monitoring/ in your browser, and you see the first statistics.

3 Password-Protect The munin Output Directory (Optional)

Now it is a good idea to password-protect the directory /var/www/www.example.com/web/monitoring unless you want everybody to be able to see every little statistic about your server.

To do this, we create an .htaccess file in /var/www/www.example.com/web/monitoring:

vi /var/www/www.example.com/web/monitoring/.htaccess

AuthType Basic AuthName "Members Only" AuthUserFile /var/www/www.example.com/.htpasswd <limit GET PUT POST> require valid-user </limit>
Then we must create the password file /var/www/www.example.com/.htpasswd.
We want to log in with the username admin, so we do this:
htpasswd -c /var/www/www.example.com/.htpasswd admin
 
Enter a password for admin, and you're done!
 
Source: http://www.howtoforge.com/server_monitoring_with_munin_monit_debian_etch

10/02/2007

Ad blocking with ad server hostnames and IP addresses

A list of ad servers and how to use them to easily block 90% of ads on the web.
http://pgl.yoyo.org/adservers/

9/28/2007

Calamaris

Calamaris

The Calamaris is a software written in Perl that effects the generation of reports detailed of the use of the InterNet using the archives of logs of some servers well proxy, as the NetCache, Inktomi Traffic Server, Oops! proxy server, Novell InterNet Caching System, Compaq Tasksmart, Netscape/iplanet Web Proxy server and are clearly the Squid. The generated reports are well simple in the presentation, however very rich in extracted details of the archives of logs, they can be generated in same format HTML or in text to be sent way email.

The use of this software is very simple, first has that to lower the version most recent of it in http://cord.de/tools/squid/calamaris/Welcome.html.en, to unpack the archive in the directory of its preference, in ours in case that /usr/local/calamaris, after this already can use it. Below we have necessary a simple example of comando1 for generation of the reports of log of the Squid.# /usr/local/calamaris/calamaris -a -F html /var/log/squid/access.log >/srv/www/default/html/calamaris/index.html


The command above already is enough for generation of excellent reports of the analysis of logs. In this in case that we use the option - the one that says to the Calamaris to be generated all the reports, - F HTML specifies the format of the report that we want, in the case in HTML, /var/log/squid/access.log is where it is located the archive of log of the Squid and /srv/www/default/html/calamaris/index.html the localization of the generated report, in this case a folder in the tree of the Apache of form that can be analyzed of any station of the net.
 

9/11/2007

How can I set the system date and time from the command prompt (bash shell)?

Use date command to display the current date and time or set the system date and time over ssh session.
This is useful if the Linux server time and/or date is wrong, and you need to set it to new values from the shell prompt.
Use the following syntax to set new data and time:

date set="STRING"

For example, set new data to 2 Oct 2006 18:00:00, type the following command as root user:

# date -s "2 OCT 2006 18:00:00"
 
 

8/30/2007

Ubuntu Linux shutdown the X server

How do I shutdown the X server, so that I have a command line prompt on the console?
 

If you are using GNOME:

sudo /etc/init.d/gdm stop

Again to start GNOME desktop:

sudo /etc/init.d/gdm start

 

source : http://theos.in/ubuntu-linux-shutdown-the-x-server.html

How to use apt-get behind proxy server (Ubuntu/Debian)

If you’re using Synaptic

Open up your Synaptic package manager (usually as root), go to Settings-> Preference -> Network. Enter your proxy server details like : username:password@proxyserver.net, and put the proxy server port (usually 8080).

If you’re using command-line apt-get

Edit your /etc/bash.bashrc file as root.

Put these line at the end of your /etc/bash.bashrc file :

export http_proxy=http://username:password@proxyserver.net:port/ export ftp_proxy=http://username:password@proxyserver.netport/ 

You can omit the username:password, if your proxy server has no password.

 

The lower-case export lines with quotes worked for me:
export http_proxy=”http://username:password@proxyserver.net:port”
export ftp_proxy=”http://username:password@proxyserver.net:port”
But I appended them to the file /etc/profile instead of /etc/bash.bashrc so that it would effect synaptic from the menus (and lots of other system programs).

 

 

Source : http://blog.mypapit.net/2006/02/how-to-use-apt-get-behind-proxy-server-ubuntudebian.html

8/27/2007

Fixing Ubuntu 7.04 Fiesty Fawn Mouse under Virtual PC 2007

 

Fixing Ubuntu 7.04 Fiesty Fawn Mouse under Virtual PC 2007

OK, one of my readers “John” (thanks John!) shared a link to an unsupported patch that fixed the Ubuntu 7.04’s mouse under Virtual PC. Let me give you the quick summary of what I did:

  1. Fired up a new VirtualPC with the Fiesty Fawn “Live CD” in the drive. Booted up in safe graphics mode.
  2. Once up, I activated the keyboard mouse using the fix I described in my post “Ubuntu 7.04 and Virtual PC 2007 – Mouse Issue Workaround (sort of)” at http://shrinkster.com/p2u.
  3. I then installed Ubuntu, it was pretty straightforward although a bit annoying using the numeric keypad as a mouse. One hint, sometimes it didn’t recognize my mouse click until I moved the mouse off a button then back on.
  4. After the install I rebooted, then in my new install repeated step 2 to activate the keyboard mouse in my new install. Setting this in the Live CD didn’t carry over to the new install.
  5. I then opened firefox and went to the link John provided, https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/87262/comments/13. Since that’s a lot of typing, I shrinksterized it to make it very easy to type, http://shrinkster.com/p2t.
  6. Joe Soroka has posted a script, I downloaded it using the “shell script” link at the very top of the message and saved it to my home folder.
  7. I opened my File Browser (use Left Alt+F1 select Places, Home Folder). I moved the mouse (again using the numeric keypad) and clicked once on the sh file I’d saved.
  8. Now in the browser, with the file highlighted, hit left alt+enter or select File, Properties on the File Browser menu.
  9. In the dialog that appears, move to the Permissions tab, and check on the box that says “Allow executing file as program”. Click the close button to close the dialog.
  10. Now double click the sh file or press enter. You should see a dialog appear that asks if you want to open in a text editor or run the script. Select the “run in terminal” option. (Update, added “in terminal” based on feedback.)
  11. While the script executes it will ask for your admin password, give it.
  12. At one point it will also stop to ask if you want to skip or configure grub manually, or let it do it for you. I pressed enter to let the script do it for me.
  13. That ended the app, when the terminal window closed I rebooted (still using the numeric keypad as my mouse).
  14. When Ubuntu came back up, it flashed a quick message from the grub asking which kernel I wanted to load, I just took the default.
  15. I logged in and what do you know, my mouse worked!
 
 
 

Ubuntu 7.04 and Virtual PC 2007 - Mouse Issue Workaround (sort of)

Update: A reader named John posted a link to a fix, see my post on May 17 (http://shrinkster.com/p2w) for full details. But keep reading this post, as you’ll need the info here to implement the fix.

OK, thanks to a suggestion I saw on the Ubuntu forums, I found a workaround for the no mouse issue, of sorts. This won’t give you the mouse back, but it will let you use Ubuntu 7.04 using keyboard control.

First, let me take a second to explain what the issue is. There was a bug in the kernel code that affected many different distros of Linux. Apparently the kernel was not finding PS/2 style mice. Some work has been done and now most PS/2 style mice are now being found.

Except, sadly for the ones being emulated. Both VMWare and VirtualPC emulate a PS/2 style mouse, and are not getting found by the kernel. Remember, it doesn’t matter what type of mouse you have hooked up to the host box (I have two mice, a Logitech MediaPlay and Microsoft Travel mouse, both USB). It only matters what the virtual machine is telling the guest OS (Ubuntu), which is PS/2 style mouse.

OK, that explained let’s play with Ubuntu some. Fire up Virtual PC, then use the CD menu to either capture an ISO image or capture the CD Drive you have the Ubuntu Desktop disk in.

When the menu appears, select “Start Ubuntu in Safe Graphics Mode” by hitting the down arrow once and pressing Enter. If you fail to do this, you’ll get garbled graphics.

Once Ubuntu gets fully loaded, press the left ALT key plus F1 (Left ALT+F1, remember VPC takes over the right ALT). This should highlight the Applications menu. Press the right arrow twice to System, then down once to Preferences. Now press the right key once to get to Accessibility, then right again. Finally go down to Keyboard Accessibility and press ENTER.

When the Keyboard Accessibility Preferences window appears, you should already be on the “Enable keyboard accessibility features”. (You can tell you’re on it because of the little ‘dancing ants’ rectangle around it.) Just press the SPACE BAR to check this on, as you see below.

Now press the TAB key to get on the Basic tab. Press the RIGHT ARROW key twice to get the Mouse Keys highlighted.

Press TAB again to get to the “Enable Mouse Keys” and press the SPACE BAR to check it on. Now tab on down to the Close button and press ENTER.

What you just did was turn the numeric keypad into your mouse. When you press left (number 4 ), the mouse moves left, press the up arrow (number 8 ) mouse goes up, and so on. The angles work, pressing 7 (the home key on my keypad) moves up and to the left, for exampe. Finally, the number 5 key works as the mouse click.

One thing to be aware of, these only work with the numeric keys. It will not work with the standard arrow keys. Laptop owners with compact keyboards are in for a painful experience, you’ll have to hit NUMLOCK to activate the mouse, then turn Numlock off to be able to type letters again.

Well there you go, a way you can use Ubuntu 7.04 in Virtual PC 2007. Not the greatest solution, but might work for you until the kernel issue gets fixed.

 
 
 
 

7/31/2007

Not enough server storage is available to process this command

Found this on Microsoft site. Also works in Windows XP.
Click here for the original page.


Clients cannot access network shares. Additionally, Event Viewer on the Windows server may log one or more of the following event messages in the system log:    Event ID   : 2011
   Source     : Srv
   Description: The Server's configuration parameter "IRPStackSize" is too
                small for the server to use a local device. Please
                increase the value of this parameter.



1.Click Start, and then click Run.
2.Type regedit, and then click OK.
3.Navigate to the following key:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters
4.In the right pane, double-click the  IRPStackSize value.

NOTE: If the IRPStackSize value does not already exist, use the following procedure to create it:
a. In the Parameters folder of the registry, right-click the right pane.
b. Point to New, and then click DWord Value.
c. Type IRPStackSize.

IMPORTANT: Type "IRPStackSize" exactly as it is displayed because the value name is case-sensitive.
5.Change the Base to decimal.
6.In the Value Data box, type a value that is larger than the value that is listed.  

If you created the IRPStackSize value using the procedure described in step 4, the default value is 15. It is recommended that you increase the value by 3. Therefore, if the previous value was 11, type 14, and  then click OK.
7.Close the Registry Editor.
8.Restart the computer. If the problem persists after you complete the preceding procedure, try to  increase the value of IRPStackSize even more.  The maximum value for Windows 2000 is 50 (0x32 hex).

7/24/2007

To give a server more then one name.

It is possible to access one of your 2000 or 2003 servers with different names then the one assigned to it.
 
 
Found this article on the Microsoft site.
 

Connecting to SMB share on a Windows 2000-based computer or a Windows Server 2003-based computer may not work with an alias name.
 
Additionally, to resolve this problemin Windows 2000 Server you must complete all of the following steps: 1.Create the CNAME record for the file server on the appropriate DNS server, if the CNAME record is not already present.
 
2.Apply the hotfix to the computer for which the CNAME record was created, not the DNS server. (Unless the DNS server and file server in question is the same computer, and then all of the changes is applied is to that server.) This hotfix affects the LAN Manager Server Service and does not affect DNS functionality.
 
3.Apply the following registry change to the file server to which you installed the hotfix. To do so: a. Start Registry Editor (Regedt32.exe).
     b. Locate and click the following key in the registry: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters
     c. On the Edit menu, click Add Value, and then add the following registry value:
 
 Value name: DisableStrictNameChecking
 Data type: REG_DWORD
 Radix: Decimal
 Value: 1
 
     d. Quit Registry Editor.
 
4.Restart your computer.
 

Windows Server 2003
To resolve this problem in Windows Server 2003, complete the following steps: 1.Create the CNAME record for the file server on the appropriate DNS server, if the CNAME record is not already present.
 

2.Apply the following registry change to the file server. To do so, follow these steps: 
     a. Start Registry Editor (Regedt32.exe).
     b. Locate and click the following key in the registry: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters
     c. On the Edit menu, click Add Value, and then add the following registry value:
 
     Value name: DisableStrictNameChecking
     Data type: REG_DWORD
     Radix: Decimal
     Value: 1
 
     d. Quit Registry Editor.
 
3.Restart your computer.

Free Web Counter
Free Counter