November 2009

VAX – MMJ DEC423 Pinout

Setting up serial connection to VAXstation 4000/60:

First made a serial cable, attention Vax use a DEC423 serial port designed for long distant terminal line:

--------------- 1 - DTR (Data terminal ready)
I             I 2 - TxD (Transmit data)
I 1 2 3 4 5 6 I 3 - GND (Signal ground)
I             I 4 - RxC (Receive common)
I             I 5 - RxD (Receive data)
---------I____I 6 - DSR (Data set ready)

Pin 2 of the phone connector goes to Rx pin of the serial (3 of DB25 or 2 of DB9), pins 3 & 4 go to ground (7 of DB25 or 5 of DB9), and pin 5 goes to Tx pin (2 of DB25 or 3 of DB9).

Then, make sure that the S3 switch (on the front of the 4000/60) is set to
the up position so that the VAX uses the serial console instead of the
graphics console.

Then, load up your favourite terminal application, set the speed to 9600
baud, make sure hardware handshaking is off, and see if you can talk to
the VAX.

My first VAX and VMS system

3 days ago I find a nice VAX Station 4000/60 on ebay for only 41 Euro (about 60 Dollars), obviously I bought it, and today delivery boy knock my door!

I paste the command/console output of the recovery procedure:

KA46-A V1.4-38E-V4.2
08-00-2B-92-4E-C7
24MB

?? 001 9 NI 0172

>>> sh config

KA46-A V1.4-38E-V4.2
08-00-2B-92-4E-C7
24MB

DEVNBR DEVNAM INFO
------ -------- --------------------------
1 NVR OK
2 LCG OK
HR - 8 PLN FB - V1.2
3 DZ OK
4 CACHE OK
5 MEM OK
24MB = SY=8MB, S0/1=8MB, S2/3=8MB, S4/5=0MB
6 FPU OK
7 IT OK
8 SYS OK
9 NI ?? 001 0172
10 SCSI OK
3-L0-RZ26B 6-INITR
11 AUD OK

>>> ?

BOOT [/[R5:]<bflg>] [<ddau>[:]]
CONTINUE
DEPOSIT [{ /B | /W | /L | /Q | /A }] [{ /P | /V | /I }] [/G] [/U] [/N:<n>]
[{ <addr> | <sym> | + | - | * | @ } [<datum>]]
EXAMINE [{ /B | /W | /L | /Q | /A }] [{ /P | /V | /I }] [/G] [/U] [/N:<n>]
[{ <addr> | <sym> | + | - | * | @ }]
FIND [{ /MEMORY | /RPB }]
HALT
HELP
INITIALIZE
LOGIN
REPEAT <cmd>
SET BOOT <ddau>
SET BFLG <bflg>
SET DIAGENV <1-3>
SET FBOOT <0-1>
SET HALT <1-3>
SET KBD <0-15>
SET MOP <0-1>
SET PSE <0-1>
SET PSWD
SET SCSI <0-7>
SET TRIG <0-1>
SHOW { BOOT | BFLG | CONFIG | DEV | DIAGENV | FBOOT | ETHER | ERROR |
ESTAT | HALT | KBD | MEM | MOP | PSE | SCSI | TRIG }
START <addr>
TEST [/UTIL] <devnam | devnbr>
UNJAM
X <addr> <cnt> ...
?

>>> B/1

-DKA300
SYSBOOT> SET/STARTUP OPA0:

SYSBOOT> SET WINDOWS_SYSTEM 0

%SYSBOOT-E-NOPARAM, no such parameter WINDOWS_SYSTEM
SYSBOOT> SET WRITESYSPARAMS 0

SYSBOOT> CONTINUE

VAX/VMS Version V5.5-2H4 Major version id = 1 Minor version id = 0

PLEASE ENTER DATE AND TIME (DD-MMM-YYYY HH:MM) 27-NOV-2009 3:51
$

$ SPAWN
SPAWN
%DCL-S-SPAWNED, process SYSTEM_1 spawned
%DCL-S-ATTACHED, terminal now attached to process SYSTEM_1
$ @SYS$SYSTEM:STARTUP
$! Copyright (c) 1993 Digital Equipment Corporation. All rights reserved.

%STDRV-I-STARTUP, VMS startup begun at 27-NOV-2009 04:00:59.19

The VAX/VMS system is now executing the system startup procedure.

%SET-I-NEWAUDSRV, identification of new audit server process is 00000088

The VAX/VMS system is now executing the site-specific startup commands.

%RUN-S-PROC_ID, identification of created process is 0000008C
%NCP-W-FILOPE, File open error , Permanent database

%NML-E-OPENOUT, error opening SYS$SYSROOT:[SYSEXE]NETLOGING.DAT; as output
-RMS-F-PLV, unsupported prolog version
%NCP-W-OPEFAI, Operation failure

%SYSTEM-F-TIMEOUT, device timeout
, timeout
, unit is active
, fatal hardware error
%NCP-W-UNRCMP, Unrecognized component , Circuit
Circuit = SVA-0

%NCP-I-NOINFO, No information in database
%RUN-S-PROC_ID, identification of created process is 0000008D
Job NCPSTART (queue SYS$BATCH, entry 1) started on SYS$BATCH
%RUN-S-PROC_ID, identification of created process is 0000008F
%SET-I-INTSET, login interactive limit = 20, current interactive value = 1
27-NOV-2009 04:03:07
Process SYSTEM_1 logged out at 27-NOV-2009 04:03:08.62

Accounting information:
Buffered I/O count: 3431 Peak working set size: 888
Direct I/O count: 1440 Peak page file size: 3806
Page faults: 16606 Mounted volumes: 0
Charged CPU time: 0 00:00:22.71 Elapsed time: 0 00:02:18.06
%DCL-S-RETURNED, control returned to process STARTUP
$ SET DEFAULT SYS$SYSTEM
SET DEFAULT SYS$SYSTEM
$ RUN SYS$SYSTEM:AUTHORIZE
RUN SYS$SYSTEM:AUTHORIZE
UAF> MODIFY SYSTEM /PASSWORD=system
%UAF-I-MDFYMSG, user record(s) updated
UAF> EXIT
%UAF-I-DONEMSG, system authorization file modified
%UAF-I-RDBNOMODS, no modifications made to rights data base
$ LOGOUT
LOGOUT
SYSTEM job terminated at 27-NOV-2009 04:04:26.81

Accounting information:
Buffered I/O count: 99 Peak working set size: 1056
Direct I/O count: 46 Peak page file size: 3978
Page faults: 471 Mounted volumes: 0
Charged CPU time: 0 00:00:00.41 Elapsed time: 0 00:05:33.58

Welcome to VAX/VMS V5.5-2H4

Username:

Asterisk – permissions and ownership for the socket console

If you need to give asterisk operational permission to a simple user on linux system, first of all you can add it on asterisk group, then you can edit “asterisk.conf” usually on /etc/asterisk/ and give rwx permission to asterisk group like this (add if they don’t exist):

[files]
astctlpermissions => 770
astctlowner => asterisk
astctlgroup => asterisk
astctl => /var/run/asterisk/asterisk.ctl

Restart asterisk to apply changes.

Common error (wrong socket permission):

[leo@srv01 ~]$ /usr/sbin/asterisk -r
Asterisk 1.4.22-4 RPM by vc-rpms@voipconsulting.nl, Copyright (C) 1999 - 2008 Digium, Inc. and others.
Created by Mark Spencer
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
[leo@srv01 ~]$

Extract files from DEB package

Some day ago, I wrote about RPM extraction, today I need content of DEB packcage, on the contrary of rpm systems debian package manager allow to extract natively by this command:

#dpkg-deb -x somepackage.i386.deb

But my problem is different, I not using Debian sytem, fortunately DEB files are “ar” archives, which contain three files:
– debian-binary
– control.tar.gz
– data.tar.gz

first, extract “ar” archive with this simple command:

# ar vx somepackage.i386.deb

then extract the contents of data.tar.gz using tar:

# tar -xzvf data.tar.gz

Or, if you want, you can made in one step:

# ar p somepackage.i386.deb data.tar.gz | tar zx

Mac OS X – Time Machine network backup without Time Capsule

From OS X 10.5 (Leopard) Apple introduced Time Machine: a great combination of rsync/rsnapshot and a beautiful user interface.
Time Machine works in two modes: 1. local volume on local area or 2. Time Capsule over network.
Now I don’t wanna buy another box with apple logo over it for much $$$ when I have a lot of file servers on my network.

Now I explain a few hoops to get this system to work:

First: persuade Time Machine to see the SMB share as a Time Machine destination by activating the unsupported network drives feature by this console command:

# defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

Second: set up the file server with SMB dedicated share to Time Machine, create an appropriate disk image locally (see below) and copy it into share.

To create the disk image, you’ll need to find out two pieces of information about the computer you want to backup: its Computer Name and its Ethernet ID (Ethernet MAC address). The Computer Name is the one that you set in the Sharing System Preferences pane. For example my is “LeoBook2”.

You can get the Ethernet ID by this command (use wired mac nic even if you’ll be using wifi connection):

# ifconfig en0 | grep ether | sed s/://g | sed s/ether//

Compose image name following this syntax:
Computer Name, followed by an underscore, followed by the Ethernet ID without the colons, followed by .sparsebundle (Ex. “LeoBook2_000d9358ca26.sparsebundle”).

Now go to Terminal and type the following commands:

# DISK_IMAGE_NAME="LeoBook2_000d9358ca26.sparsebundle"
# DISK_SIZE=200000
# hdiutil create -library SPUD -megabytes $DISK_SIZE -fs HFS+J -type SPARSEBUNDLE -volname "$DISK_IMAGE_NAME" "$DISK_IMAGE_NAME"

After you’ve run this command, you should end up with a disk image in your Home. It looks like a single file, but it’s actually a directory (just like a application). Don’t forget to copy this disk image to the appropriate share on your server. Just dragging and dropping from the Finder should work fine.

Now you are able to use the share as Time Machine backup volume.

Have a fun
Leo

Extract files from RPM package

There is no direct RPM option available via rpm command to extract an RPM file. But there is a small utility available called rpm2cpio. It Extract cpio archive from RPM Package Manager (RPM) package.
Example extract RPM file using rpm2cpio and cpio command:

# rpm2cpio somepackage.x86_64.rpm | cpio -idmv

Output of rpm2cpio piped to cpio command with following options:
i: Restore archive
d: Create leading directories where needed
m: Retain previous file modification times when creating files
v: Verbose