Wednesday, June 27, 2018

Ubuntu 18.04 on old HP Compaq 6710b Laptop

HP Compaq 6710b is my oldest laptop given by ONGC way back in 2006. The laptop had windows vista initially and having a Intel core2 duo CPU @ 2.2 GHz with  2 GB RAM. It was brand new but slow as hell.

Later , installed Windows 10 under the magnanimous program of Microsoft who did not allow upgrade to Win 10 from vista but allowed to install it without activation. Updates continued to happen , everything happened, but it continued to be slow as hell.

Then, ONGC under its EPP(somewhere in 2014) allowed purchase of another HP laptop with 4 GB RAM , however this time we purchased the laptop instead of the L1 route earlier. 6710b continued working as the latest laptop evolved from win 8 to win 8.1 , windows 10 and finally to the latest April Update of Win 10 pro. However, 6710b continued to be slow as hell.

In 2018, ONGC EPP, I purchased a powerhorse, Asus FX series 16 GB RAM, Latest Nvdia card(1060 I guess), Intel 7th gen HQ CPU, 7200 rpm 1TB HDD and 128 GB SSD. Out of concern for the geriatric laptop, I purchased 2 sticks of 2 GB RAM for Rs 2000/- in total to give a 4 GB upgrade to the 6710b, However, 6710b continued to be slow as hell.

Finally, decided to give 6710b exit to windows by totally removing windows and installing Ubuntu 18.04 released this April. Now this old laptop is decent and not slow as hell

However, it did take some time to boot (3 minutes), which was odd, when the laptop is not slow as hell, why should the boot be slow as hell?
(1) here is the error it threw up during boot
(2)sudo nano /etc/default/grub
(3) 
(4) Added GRUB_CMDLINE_LINUX_DEFAULT="quiet video=SVIDEO-1:d" and removed "splash"

(5) saved and sudo update-grub

Now , boot time reduced to 20 seconds :)

Old laptop is no longer damn slow as hell :)


Note: Also came to know that boot menu can be displayed by pressing shift during boot and pressing E key against a kernel entry allows to edit it and boot with the edited entry to test before making changes permanent as mentioned in steps (2) onwards




Thursday, May 17, 2018

configuring ccproxy and internet gateway for routing internet from one network to another

CCproxy is software used to give internet connection to neighboring computers in the same network (connected to same switch or wifi network). It is simple and easy to use. 

This particular use-case is for situation when internet is required in an adjacent network (say 192.168.32.*, which say is the LAN) and the internet connected Proxy server is in another network (say 192.168.43.* which say is the jio network coming from wifi or mobile)

Steps:-
1. Open CC Proxy , do the settings as follows:-
2. Start the proxy server

3. install winpkfilter (which is the internet gateway)

(a) click the local area connection and  select the NAT status as client, meaning your LAN connection (say 192.168.32.10) will be client and click ok.

(b) click on wireless connection and NAT status will be provider, give the proper IP address of the JIO or wifi provided IP address (say 192.168.43.232) and click OK

(c) Click Start NAT as seen above

4. In one of the LAN PCs (say 192.168.32.25), add the following command in command window with admin privileges to add the IP address of JIO computer . Note that all Pcs in the LAN will be in the 192.168.32.* network.

route add 192.168.43.232 mask 255.255.255.255 192.168.32.10

5. ping the 192.168.43.232 computer, it should ping.

6. Open any browser and add proxy address as 192.168.43.232 and port as 808

7. open and browse internet in this network while your jio is connected to another network



 

Thursday, April 26, 2018

variables need to be explicitly declared even though óption explicit'option not given

INTRODUCTION
1. It is considered a good practice to use óption explicit'at the beginning of a module or code block, doing so, will need unique declaration of each variable in the module.

2. Though, this is good for organized coding, it can take the fun out of quick coding.

PROBLEM
1. I had not used option explicit anywhere, however, when a excel macro file developed elsewhere, was copied to my system, the code execution stopped at each undeclared variable. Declaring that variable solved the issue, however, code will stop at the next undeclared variable.

2. I checked the options menu in VB editor, "require variable declaration was also unchecked". This was a huge problem as I may have had dozens of undeclared variables. Why was I facing this problem in my home laptop while elsewhere it worked?

3. googled, found someone else also faced the same problem. The issue was using "References"which are not installed (Active X controls, like comctl2.ocx etc).

4. Clicked Tools-->References, and indeed there was highlighted a checkbox with "Missing: common controls (SP6). Unchecked this missing reference, and everything solved.  The code did not stop at any undeclared variable.

5. Meanwhile installed the common control active x and got the functionality was also obtained (separate blog post created for same)
 

making date time picker controls (sp6) work in Excel 2007

1. It is better to install MS office as 32 bit software even in 64 bit systems if legacy VBA code is being used in some excel files.

2. The common controls (mscomct2.ocx) will not work if office installed as 64 bit application.

3. The common control components like Microsoft Date time picker are obtained if the mscomct2.ocx active x file is added to the system.

4. Do not confuse between Mscomctl.ocx and mscomct2.ocx. The former is used for VB6 and later is used for VBA. download the correct ocx file and register to get the date time picker control in Excel VBA.

5. see this link (or google, if this does not open) for procedure to register active x controls.
https://www.ablebits.com/office-addins-blog/2016/10/12/insert-calendar-excel-datepicker-template/#Register-date-picker

6. irrespective, if your application is installed as 32 bit (meaning it is stored c:\program files (x86) ) in the 64 bit OS system , the OCX file has to be copied to C:\windows\syswow64 and then procedure as mentioned in step 5 to be applied.  The 64 bit applications are stored in normal program files folder (C:\program files)

7. By doing step 5 & 6, the date time picker control started appearing in VBA of excel.

 

Saturday, September 23, 2017

Running out of space in main Linux parttion, resize offline, solve screen flicker problem

I was looking for a light weight linux distribution for my old laptop and found this Lubuntu Zetsy. I had thought being lightweight, about 4 GB of Hard disk space would be enough with say 500 MB Swap space.

The main hard disk drive is 100 GB and windows 10 was installed in it. Earlier a 11 GB space was shrunk from this 100 GB drive and formatted as NTFS (Drive D:) This 100 GB drive was further shrunk using disk management utility in Windows 10 to create unallocated space of about 4 GB.

The partition table looks as follows:-


After installing Lubuntu Zetsy in 4 GB space, it was working fine, however, package upgrade messages started appearing, but there was not enough space to upgrade as total size available was only 3.43 GB (488 MB swap). I could ignore these messages but for a fact that subsequent login was taking to black screen and required two or three retries to reach main desktop (say after power save etc). Googling about the problem pointed to fact that upgrading the packages can solve the problem.

I was avoiding upgrading as disk space was minimal, one day I did take the chance and did apt-get upgrade from command line, the upgrade started and midway gave a message of insufficient disk space after about 200 MB of disk space was only left. root user was dismounted and system dropped to initramfs shell. In short, my Linux smoked out  :))

Now, I had to somehow add some storage to this original 4 GB partition. since it was bang adjacent to the 90 GB windows partition, I thought I could shrink some 4 GB from this 90 GB windows partition and add to original 4 GB to make it grow to 8 GB. question was how? and will my data be safe after this exercise? or will the entire thing go in smoke too :))

I decided to backup the complete laptop data onto another desktop just in case. after that, google helped me to zero on GPARTED, the linux utility to resize partitions.  Again, after shrinking 4 GB of unallocated space from Windows, booted using a live CD to Linux for my partition resize operation, this was the actual picture of partitions:-



Following are the step wise observations:-

1. It is only possible to have four primary partitions in MBR scheme of partitioning (sda1, sda4, sda2 & sda3 in my case were already there)

2. Note that the linux partitions sda5 (ext4 filesystem, 3.43 gb) & sda6 (swap, 488 mb) are contained in sda4 which is marked as extended partition.

3. I tried resizing sda5, but it wouldn't budge.

4. As I had booted into linux using live DVD, All hard disk partitions were unmounted by default except swap. A 'lock' symbol was appearing against sda6 & sda4.

5. Right clicked sda6 and clicked the swapoff and lock symbol vanished on sda6 & sda4. Now I could resize sda4 to the unallocated space adjacent. after this, i could resize sda5 which as you can see is inside sda4.

6. A warning was issued by gparted after resizing sda5 that linux may not boot.

7. swapon done on sda6 and lock symbol reappeared on sda4 & sda6.

8. Rt click in lower pane of gparted and click on ' apply all operations'. this is the confirmation step for all changes. it took 5 minutes to complete all operations.


REBOOTING
After Rebooting, GRUB2 boot menu appeared and I selected ubuntu, but same problem reappeared, that is trying to load GUI but failing and not even opening a terminal screen on pressing ctrl + Alt + F1. So, it appears that partition ops are success, now only linux issues need to be troubleshooted.

After turning on laptop, press ESC key continuously, after GRUB2 appears, you can see an extra entry "advance options for Ubuntu". Select this option  and select option of "fix broken packages". dpkg started installing the packages which were left off earlier midway after hard disk space had been exhausted.

After dpkg finished, I rebooted again to GRUB2 main entry ubuntu and everything worked perfectly! Rebooted again to windows an found everything was normal there too!.

So, resized partition offline without any loss of files.








Thursday, March 9, 2017

Running classic asp on Windows 10 64 bit

In the latest version of Windows 10 Pro 64 bit, following has to be done:-

1.Go to Control Panel - Programs and Features - Turn Windows features on or off.

2.Select Iinternet Information services;World wide web services->and click on ASP & click OK
ok! worked

error message: error-800a0e7a-provider-cannot-be-found-it-may-not-be-properly-installed
for running classic asp with connect to access database  on 64 bit computer running windows 10, do these changes:

Check the site's Application Pool in IIS -->Application Pools->Default App pool (rt click)->  Advanced Settings :

1) Managed Pipeline Mode : Classic
2) Advanced / Enable 32-Bit Applications: True

USE SYSTEM DSN 32 BIT FOR ACCESS DATABASE
create 32 bit  system DSN, by going to  control panel -> administrative tools->ODBC Data sources 32 bit and creating the DSN.
That worked!

OLE DB connection in which code is written as
MyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\inetpub\wwwroot\mysite\cd-cat\database\cd_data.mdb;Persist Security Info=False"

requires the OLEDB provider to be installed

I got this error:-
Microsoft Office Access Database Engine error '80004005'
Could not find installable ISAM
This can be solved by following https://support.microsoft.com/en-in/help/209805/you-receive-a-could-not-find-installable-isam-error-message-or-some-fi

However, decided to use only DSN connection

Friday, February 10, 2017

A note about fittings used in instrumentation

Fittings are extremely important accessory in a process plant. The array of fittings available is bewildering as they span across all the fields of human endeavor and  industry. No process industry which handles fluids can do without fittings, apart from industry they are found in transport (ships, aircraft, spacecraft, motor vehicles), HVAC (Heating Ventilation and Air conditioning), fuel and water supply systems. I have tried to collate some material available in Internet to understand the various types of fittings, the various thread types like NPT, BSP etc and links to resources to help order the required fittings for a job and also to understand and classify the fittings available in hand.

The document begins with introduction to various types of fittings and digresses briefly to understand the various 'thread' types and then describes how tube connections carrying process fluids and instrument Air are mated to the fitting. Each of these are labeled as sections. Section 1 is intro, 2 describes the thread technology, 3 describes way to identify a particular thread with aid of charts, 4 gives a special emphasis on BSP thread, a very confusing thread type (I hope the confusions should end once you go through the blog ;) ) 5, describes the tube connections like flared, flareless (bite type), o-ring face seal and 60 degree cone.

Section 6 has some misc resources on how much to tighten a fitting with a wrench after the initial 'hand-tight' and links to various guides by parker and swagelok. There is a link for on-line identification of a fitting type after giving the required inputs an some video resources for tube bending, sealing using teflon, selecting correct hoses and tubes etc.


I would have posted in the blog format, however, I had begun by creating the blog in MS word and though the text could be published to blog, the images and hyperlinks refused to resolve. Therefore, uploaded my created document to google drive and linked it here.

Click here to download the document and hope the information is useful
click here to download the pdf version of the same file.