Thursday 5 July 2012

CDE AIX : start up and setup

To install CDE:
* smitty installp
   --> choose "install software bunde"
   --> choose X11 and Graphics

To remote :
* Use cygwin with x11 component installed (or X-manager if u like to pay money)
* X -query

To display in monitor when u are connecting using serial port at the beginning:
* ensure you have graphics card in your POWER machine
* plug the monitor (using special converter to the graphic card) and plug the usb mouse-keyboard at usb port POWER
* during boot, put password "admin" when prompted at SMS mode
* choose "chose console"
* it will emerge something in the monitor saying "press if u choose this as active console"
* you choose that number and now the SMS will be on monitor

To activate CDE login prompt:

0. * /usr/dt/bin/dtconfig -e  (enable)   -- opposed to -d to disable auto start the desktop
1. if using bitmap (graphical) monitor : verify file in /usr/dt/config/Xservers
2. if using number 1 and u wanna use additional character display (dump terminal) :
     -->  cp /usr/dt/config/Xservers to /etc/dt/config/Xservers
     --> verify the file
3. if wanna disable number 1 and only activate dump terminal:
    --> edit the /etc/dt/config/Xservers
    --> comment out the line containing "display 0" thingie

 4. to disable CDE login prompt in monitor local display (physical):
     --> comment out the line in /usr/dt/config/Xservers

To restart CDE to take effect after config file changed:

* /usr/dt/bin/dtconfig -kill
* /usr/dt/bin/dtconfig -reset
* /usr/dt/bin/dtconfig -e

 To activate session from native shell:
* xinit /usr/dt/bin/Xsessions

Sunday 29 April 2012

Fixing GPS navistar or other china brand

Accessing your GPS from PC:

1. connect your GPS to your PC using the usb cable

2. boot up your GPS, during the booting PC might not recognise it

3. after boot up, PC will recognise it as HDD external drive

4. if still PC does not recognise it, then check if external SD card is in your GPS

5. remove the external SD card

6. reboot the GPS

7. in windows you can copy/delete/move file in GPS (or flash) to your PC

8. you can update map, by accessing the navistar website and donwload the files there, then replace the files in your GPS with the new downloaded one.



Problem GPS signal can not be found, the question mark is in the satelite icon:

1. go to advance setting - system status

2. ensure you have 4 blue bar signal there, red signals meaning the satelite is detected (otherwise it wont be there), but the gps get low signal.

3. after you move to better position, if the signal is still weak, try to change your navigator path to different papagom com baud/rate to another ones, example in my case after i change to papagoCOM2_4800 is better than papagoCOM5_4800.

note : access navogator path by going to main menu (home icon), or exit first if you are in navi mode. then go to navigation setup icon, then choose the path there.

4. if still can not, then try update your maps using above instruction

5. if still can not, then it means your gps broken.

Multi maps on your GPS

Copy the maps folder (contain many files), example "indonesia-xxx-xxx" from your PC to the GPS "/flash/navi/maps/   "

reboot your GPS, and now when u navy and go to advance setting, you can switch maps in "maps options" from your original maps to your new maps.

Note that : GPS X5 can not locate maps stored in the external SD.

Thursday 23 February 2012

Redhat 6 on POWER 6 using VNC

1. How to clone : use dd command and then if u had done the network config, now you should edit the ifcfg-eth0/1/2/3/??? and change the HW address inside those file(s) following your target machine, otherwise the target has eth2/3 instead of 0/1 (if u have 2 ports)


2. Install as normal, by using SMS mode in POWER6 (either by choose "open firmware" from advance button in "activate" profile section OR press an immediate number 1 after menu booting)


3. If you overwrite an AIX LPAR, installation will fail with message "vfs unable to mount". In this case you go to Open firmware (either by choose "open firmware" from advance button in "activate" profile section OR press an immediate number ? after menu booting). In OF prompt, type "dev nvram" and then "wipe-nvram".


4. Reboot again and go to SMS mode again.

5. Type "tab" to see available option (rescue, vnc, auto=nodmraid), or just enter to pass through.

6. No need test media

7. Everything as normal until.. the selecting disk

8. When you see the menu contain 3 options (Enitre disk, free space, overwrite linux partition), below that there is supposed to be disk(s) that you can use. if not there, can lead to hang when u do something.

9. Figure out first why the disk(s) are not there.

10. After solved, go as normal.

11. Redhat 6 does not install many thing by default / only 2GB.

12. install createrepo by rpm command in cd-linux-ppc64/Packages (must install 2 dependencies bfore that, which is told after you run that command).
run : createrepo target-directory-where-the-repodata-local-reside

13. configure group installation: createrepo -g cd-linux-ppc64/repodata/xxxxx-comps-xxxx.xml target-directory-where-the-repodata-local-reside (must install 2 dependencies bfore that, which is told after you run that command)

13. yum grouplist

14. yum install Desktop

15. yum install tigervnc

16. activate : vncserver (config in /usr/bin/vncserver file), can see ur current options ps -ef | grep Xvnc, can initally use the option like vncserver -geometry 1024x768 -geometry 800x600. Then form client you can choose which, by command xrandr

17. from vncviewer somewhere : use IP and port 590X (X should be 1 for the first vncserverprocess) Might need to stop iptables services first.

18. can test in terminal : xset q --> to see the vnc properties

19. mmhh, but maybe you dont have terminal yet, install xterm. or install gnome-terminal. better yet install with gnome-terminal-xxxxxx to make "open terminal" available in right-click desktop.

20. Now u might see the font in gnome terminal is weird, in this case you must install packages bitmap-xxxxx, and use that font.

Wednesday 1 February 2012

Disabling usb storage devices on windows XP

Disabling at BIOS:
Problem is your usb mouse/keyboard might not work.


Using gpedit:

Basically works well to prevent but only prevent for plug-before usb storage.
This one is same like u do manually in the regedit HKLM/CCS/Services/Usbstor/start value 4.
But gpedit will update periodically incase registry is changed by someone.

TIPS : use removeable device adm template which can donwnload at internet, import it by gpedit.msc, and when view PLEASE use "filter" and untick "ALL the RADIO button" otherwise you will see nothing in the right view of gpedit.msc

TROUBLE : when you plug a new-plug usb disk, it will change the "start" value to "3" and can be used after it automatically install the driver.

Tricks : Go to usbstor KEY and set permission to nothing can do anything, additionally also go to usbstor.sys file in \windows\system32\drivers and alter permission to nothing again.

In this point, the newly-plug usb device is detected but driver installation will fail. when you attach again next time the usb device will not be detected cause it is already plug-before usb device.

Friday 27 January 2012

unix permission directory explanation

directory (other)

x --> other can cd to it and traverse to sub dir under it (as long sub dir under it has the permission for it). can not do alter nor list file BUT can ls and ls -al to specific file and get the detail of it.


w --> other can not do anything, neither ls, touch, re, nor cd

r --> other can ls only (and autocomplete TAB works too), but will show only filename without any permission, date, ownership.


rwx --> you can do many things to folder/file under it

wx --> can cd and can alter file/folder under it, can also ls -al specific file and get the detail of a file, but can not get the whole list of file/folders under it.


rx --> can cd and can list the whole list of file INCLUDING the detail of the file. Can not alter file/folder including owned by him.


rw --> list the whole list WITHOUT the file detail. Can not do alter also (same like r only???)

Wednesday 25 January 2012

NTP on windows and linux

NTP (UDP 123)

one config as client and server in ntp.conf (might use another file like drift, keys and step ticker).

you can put "server LOCALHOST" but not necesary, as by defualt the driver creates 127.127.1.0 as ip local and in the config listed as it is.

Windows

1. net time /querysntp
2. net time /setsntp:XXXXXXX
3. net stop w32time ; net start w32time
4. w32tm /config /update
5. w32tm /resync

to test ntp server : w32tm /monitor /computers:xxxx.xxxx.xxx.xx

by GUI : go to "date/time setting", choose the 3rd tab, in the server field just type XXXXXXXXX (good hint!!!) and push synchronized.


Linux

ntpd is the service that sets and maintain system time, use port 123.

ntpdate is command which is not relate to ntp.conf
-- ntpdate -u XXXXXXX (u is used when port 123 is used alry, otherwise "ntp sockets is n used" message appears)

-- ntpdate (will give you "error no server to sync", u must put the server )

-- ntpdate XXXXXX (will update your time following the XXXX time)

-- ntpdate -q xxxxxxx (just testing the xxxxx time)

other command:
ntpd -d --> to see error/debug
ntpq -p --> list all the ntp servers that your pc using.


other errors:
bad file descriptor --> two ntpd are running, kill one of them

no server suitable for sync found --> usually happens when ntpdate -q XXXXXX right after restart ntpd on XXXXXX, wait for some time then try again. After a while ntpd server will be ready.

no associtae id 's returned --> after running ntpq -pn , caused by no "server xxxxx" parameter or no xxxxxx server, notice also if you put 127.127.1.0, do not wrongly mix with 127.127.0.1.


ESX:

For ntp client:
esxcfg-frewall -q ntpClients (-d to disable)

for ntp server:
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1002864

TIPS: stop the iptables on ESX !!!

Wednesday 28 December 2011

extending a partition on Linux / VMware /SAN disk without gparted

First of all extend the hard disk size, either using vmware console, san console or vmdisk-vmanager command.

In my example i extend sda from 10 to 12 GB.

In my current linux:
/dev/sda1,2,3 --> primary partition

/dev/sda4 --> extended partition
/dev/sda5 --> inside sda4, it is also the /home partition

After extend, see the result using fdisk -l,
Notice if the HD size now is 12 GB.
However the partition sector/unit is still remain the same as before.


Since the last sector is /dev/sda4, so now we extend it sda4 first, then we could extend the sda5.

using parted :
# select /dev/sda
# unit mb
# print
# resize 4 xxxxx yyyyy

xxxx is the beginning of the sector
yyyy is the end of sector

Notice that now the /dev/sda4 has some more spaces.

after that we need to resize the /dev/sda5

Follow this link to extend the size:
http://www.hermann-uwe.de/blog/resizing-ext3-partitions-with-parted

>>>>>>>>>>>

unfortunately resize ext3 can be failed with error like "file system has an incompatibility feature" which is caused by the ext3 has been customized by redhat.

The quick way is just by using fdisk, remove the sda5 partition, and create again using the total sector of /dev/sda4.

Now u have /dev/sda5 extended size.


The longest way is by modifying all the custom attribute redhat:
http://gtechnotes.blogspot.com/2005/10/parted-gives-error-filesystem-has.html

>>>>>>>>>>>>>>