Vahid Ghafarpour's Blog

نكات جالب از نظر وحيد غفارپور!

Sunday, May 27, 2007

Cisco 2600 router reset password

after start before boot complete you should press break to go to rommon
rommon 1 > confreg 0x2142
rommon 2 > reset

after reboot press no for questions

Router>
Router>enable
Router#copy startup-config running-config

Router#configure terminal
Router(config)#enable secret <>
Router(config)#^Z

Router#configure terminal
Router(config)#interface Ethernet0/0
Router(config-if)#no shutdown
Router(config-if)#
Router(config-if)#^Z
Router#

Router#copy running-config startup-config

Router#show version

Router#configure terminal
Router(config)#config-register 0x2102
Router(config)#^Z
Router#show version

next reboot it

Wednesday, May 16, 2007

grub restore

one time when I try to restore my grub I found this error

Due to a bug in xfs_freeze, the following command might produce a segmentation
fault when /mnt/root/boot/boot/grub is not in an XFS filesystem. This error is harmless and
can be ignored.
xfs_freeze: specified file ["/mnt/root/boot/boot/grub"] is not on an XFS filesystem
Installation finished. No error reported.
This is the contents of the device map /mnt/root/boot/boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(fd0) /dev/fd0
(hd0) /dev/sda


I try to fix it and at last I found these steps

load with liveCD

sudo grub

find /boot/grub/stage1

root (hd1,3)

setup (hd0)

quit

and it was solved

Tuesday, May 15, 2007

kannel with clickatell on http connection

this configuration work for me

group = smsc
smsc = http
smsc-id = click
system-id = xxxx #apiid
system-type = clickatell
smsc-username = xxx # username
smsc-password = xxxx # password
send-url = "http://api.clickatell.com/http/sendmsg"
port = 13015
denied-smsc-id = modem
allowed-smsc-id = click
connect-allow-ip = "127.0.0.1;192.168.*.*;196.30.96.134"

196.30.96.134 this ip needed for callback from clickatell

and callback url can be set as
http://xxx.xxx.xxx.xxx:13015/cgi-bin/sendsms
which set to your ip address and port
this work with kannel 1.4.1 or newer

it will handle all needed parameters and processes

Monday, May 14, 2007

Kannel with Mysql support in Ubuntu

For install the last version from source code you need to install libxml2-dev, libxml2-utils.
also you need libmysqlclientXX-dev for mysql support
and next you should configure
./configure --with-mysql

It should be noticed that you need gcc or g++ for compile source codes too.

Sunday, May 6, 2007

after install ubuntu-server I want to add ubuntu-desktop package to use in some cases so I do
#apt-get install ubuntu-desktop
after it I got this problem

Setting up acpid (1.0.4-5ubuntu4) ...
* Loading ACPI modules... [ ok ]
* Starting ACPI services... invoke-rc.d: initscript acpid, action "start" failed.
dpkg: error processing acpid (--configure):
subprocess post-installation script returned error exit status 1

after searching I found that I should stop acpid first and next do it again and it was fixed

#/etc/init.d/acpid stop
#apt-get install ubuntu-desktop

Labels:

Tuesday, May 1, 2007

ERROR 1016 (HY000)

I've got something like these

ERROR 1016 (HY000): Can't open file:

I fix it by

REPAIR TABLE tablename

Labels: