Windows XP: change the disk drive letter

March 7th, 2009 4 comments

Recently I had to start installing applications on a removable/external hard disk due to lack of free space on my system/internal hard drive. Installing applications on Windows means registering them with the system, having shortcuts created and so on – they get integrated into the system. This means that the system will need to find files for those applications and it will use the full path for those files. That includes the hard drive letter that Windows assigns to storage devices (hard drives, cd-roms, usb memory cards, etc).

Unfortunately Windows doesn’t consistently assign the same drive letter to the same device and this makes things complicated. Fortunately Windows will only mess around your device letters if you start up your computer after connecting devices that you don’t usually connect. For example I normally connect my usb 3g modem, an usb hub with a keyboard and mouse connected into it and an external disk drive – and I connect them to the same usb ports every time. This makes Windows use the same device letter consistently. But if I connect an ebook reader with a memory card on it that will add 2 storage devices to the system and make Windows change the drive letter configuration.

The temporary solution I found was:

  1. Open Control Panel
  2. Open Administrative Tools (Windows XP Professional)
  3. Open Computer Management
  4. Select Disk Management under Storage
  5. An applet will open. Right-click on the drive you want to modify the drive letter.
  6. Select Change Drive Letter and Paths
  7. Select the drive letter and click Change.
  8. Select the drive letter you want to change to from the drop down list.

That’s it! you made it =)

Have fun!

Categories: Windows

Cisco VPN Client: Remote peer is no longer responding.

February 27th, 2009 5 comments

If you have a profile that used to work and is no longer working for you this might help… or not… The message “Remote peer is no longer responding” is used on more than one failure scenario.

Increase the log level on /etc/opt/cisco-vpnclient/vpnclient.ini:

[main]
BinDirPath=/usr/local/bin
EnableLog=1
[LOG.IKE]
LogLevel=15
[LOG.CM]
LogLevel=3
[LOG.CVPND]
LogLevel=3
[LOG.XAUTH]
LogLevel=3
[LOG.CERT]
LogLevel=3
[LOG.IPSEC]
LogLevel=15
[LOG.CLI]
LogLevel=3
[LOG.FIREWALL]
LogLevel=15
[LOG.PPP]
LogLevel=1
[LOG.DIALER]
LogLevel=1
[LOG.GUI]
LogLevel=1

Now Run:

# ipseclog ipseclog.txt &
Cisco Systems VPN Client Version 4.8.02 (0030)
Copyright (C) 1998-2007 Cisco Systems, Inc. All Rights Reserved.
Client Type(s): Linux
Running on: Linux i686 #1 SMP Wed Feb 11 23:58:12 EST 2009 i686
Config file directory: /etc/opt/cisco-vpnclient

[1] 5143
#

And now try connecting again.

After it fails check /var/log/ipseclog.txt and try finding DEL_REASON_PEER_NOT_RESPONDING.

Then if the profile you’re using has EnableNAT=1 try changing to EnableNAT=0 and try connecting again.

This solved the problem for me.

If you still have the problem try also restarting your Internet connection or the network service (Fedora):

# /etc/init.d/network restart

Categories: Cisco, Linux

Bash: send a running process to background

February 27th, 2009 No comments

Say you start a process and you forget to add the & character at the end of the line to send it to the background. You don’t need to restart the process if you’re using bash (and probably other shells – check the documentation of the one you’re using).

To send the running process to the background so that you get the shell prompt back to enter more commands you have to press CTRL+Z while the process is running. The process will be temporarily suspended until you send it to the foreground with the bg [jobspec] command.

Let’s see an example:

[root@localhost log]# tail -f cron
Feb 26 11:01:01 localhost CROND[5731]: (root) CMD (run-parts /etc/cron.hourly)
Feb 26 12:01:01 localhost CROND[5743]: (root) CMD (run-parts /etc/cron.hourly)
Feb 26 13:01:01 localhost CROND[5836]: (root) CMD (run-parts /etc/cron.hourly)
Feb 26 14:01:01 localhost CROND[6097]: (root) CMD (run-parts /etc/cron.hourly)
Feb 26 15:01:01 localhost CROND[6132]: (root) CMD (run-parts /etc/cron.hourly)
Feb 27 04:26:15 localhost crond[2844]: (CRON) STARTUP (1.2)
Feb 27 04:26:16 localhost crond[2844]: (CRON) INFO (running with inotify support)
Feb 27 04:26:20 localhost anacron[2912]: Anacron 2.3 started on 2009-02-27
Feb 27 04:26:20 localhost anacron[2912]: Will run job `cron.daily’ in 65 min.
Feb 27 04:26:20 localhost anacron[2912]: Jobs will be executed sequentially
^Z
[1]+  Stopped                 tail -f cron
[root@localhost log]# jobs -l
[1]+  4107 Stopped                 tail -f cron
[root@localhost log]# bg 1
[1]+ tail -f cron &
[root@localhost log]# jobs -l
[1]+  4107 Running                 tail -f cron &
[root@localhost log]# fg 1
tail -f cron
^C
[root@localhost log]# jobs -l
[root@localhost log]#

As you see when you press CTRL+Z (or ^Z) the process is suspended (stopped). You can see the list of jobs and their state by running jobs -l. This job was given the number 1. We can then send it to the background with bg 1 or bring it back to the foreground with fg 1. At the end I kill the process by pressing CTRL+C (^C).

You can stop the job with ^Z and then send it to the background using bg with no additional arguments. Actually you can use the character % as a job name. Let’s see the following example:

# tail -f test1
line 1
line 2
^Z
[1]+  Stopped                 tail -f test1
# %1 &
[1]+ tail -f test1 &
# jobs -l
[1]+  3855 Running                 tail -f test1 &
# tail -f test2
file 2 line 1
file 2 line 2
^Z
[2]+  Stopped                 tail -f test2
# %% &
[2]+ tail -f test2 &
#
# jobs -l
[1]-  3855 Running                 tail -f test1 &
[2]+  3857 Running                 tail -f test2 &
# %-
tail -f test1
^Z
[1]+  Stopped                 tail -f test1
# jobs -l
[1]+  3855 Stopped                 tail -f test1
[2]-  3857 Running                 tail -f test2 &
# kill %1

[1]+  Stopped                 tail -f test1
# kill %2
[1]+  Terminated              tail -f test1
# jobs -l
[2]+  3857 Terminated              tail -f test2
# jobs -l

The + flag on the output of jobs -l indicates the current job and the – flag indicates the previous job. The %% and %+ names refer to the current job while %- refers to the previous job. So instead of fg 1 you can use %1. And instead of bg 1 you can use %1 &. And so on…

Categories: Linux, Shell

CentOS 4.2 and nforce drivers (forcedeth issue)

December 27th, 2008 No comments

Today I had to install CentOS 64 bit on a desktop built on an ASUS P5N32-E SLI motherboard. This motherboard features a nForce 680i SLI chipset and other fancy stuff that are likely to cause trouble to Linux distributions, specially old versions.

I decided to go for CentOS 4.2 just because I had it available on a DVD from a magazine, it was 64-bit and as an entreprise distribution it should be stable.

Installation was straightforward although I had to specify the drivers to use for hard disk (sata_nv) just before it started.

Upon login into my new installation I noticed I didn’t had any ethernet interfaces configured. This motherboard has two gigabit ethernet interfaces. They should use forcedeth driver from nvidia but they’re not working. Loading forcedeth manually didn’t do it . Also using options msi=0 msix=0 also didn’t do it.

So I decided to download the most recent kernel package for CentOS 4 which is kernel-smp-2.6.9-78.0.8.EL.x86_64.rpm. I downloaded from another computer to an usb stick and copied over to my CentOS 4 host. Then as root I executed the command: rpm -i kernel-smp-2.6.9-78.0.8.EL.x86_64.rpm and rebooted.

After booting using the new kernel the system was able to find my ethernet devices. Aditionally it also found my onboard sound card.

After configuring them I was able to get network on my new system.

Categories: Hardware, Linux

Hello world!

December 20th, 2008 No comments

I’m excited to start a new version of my web site! On its past incarnations I failed to create content on a regular basis because of lack of time and the platform I was using. Now with WordPress and its easy and mature interface I can have more time to focus on the content instead of fixing technology.

So I wish you happy Christmas and an excellent new year of 2009!!

Categories: Uncategorized