Category: Computer

Computer is miraculous!

Add vCPU in VMware Fusion for Windows

Add vCPU in VMware Fusion for Windows

As Windows Pro only supports 2 CPU sockets, after added 4 cores in VMware Fusion, the OS is still shown as 2 vCPU. To avoid this is, need to change cpuid.coresPerSocket to handle more than 2 cores.

Parameters

In .vmx file change following parameter, numvcpus is the total number of cores, which can be changed in GUI. cpuid.coresPerSocket should be changed to half of numvcpus.

numvcpus = "4"
cpuid.coresPerSocket = "2"

References

Odd behavior with Fusion 12.2 and Windows 11

How to disable Android File Transfer in Mac OSx

How to disable Android File Transfer in Mac OSx

Android File Transfer Agent conflicts with Garmin Music, so need to disable it in order to work.

Steps

Open the “Activity Monitor” and kill the “Android File Transfer Agent” process. Open “System Preferences” > “Accounts”. Go to the “Login Items” tab of your user. Remove the “Android File Transfer Agent”.

References

Avoid Android File Transfer starting automatically in Mac OS X after Android device plugin to USB port

Refill Canon 054 Cartridge

Refill Canon 054 Cartridge

Note: I haven't tried the process.

My print MF634Cx got error E015-0000, Canon support said it is not repairable. But I just got 4 new cartridges, want to reuse the ink. I bought a new MF645Cx, so want to try refilling the cartridges later. There are some refill videos on Internet.

Refill

To refill the cartridge, one method is to dig a hole, the second method is to open the cartridge.

Chip

Although some people said the number of page used indication will give error, refilled cartridge is still able to be used. Alternatively can buy CRG-054 Chip to replace it.

Product

For Canon LBP 621 622 623 MF641 MF642 MF643 MF644 MF645 Printer Toner Chip,For Canon CRG 054 CRG054 CRG-054 Toner Cartridge Chip

CRG-054 H Chip for Canon MF641cw MF642cdw MF644cdw LBP622cdw LBP621Cw LBP623Cw

Subcategories:

  • K CRG-054K 1.5K WW
  • C CRG-054C 1.2K WW
  • M CRG-054M 1.2K WW
  • Y CRG-054Y 1.2K WW
  • K CRG-054HK 3.1K WW
  • C CRG-054HC 2.3K WW
  • M CRG-054HM 2.3K WW
  • Y CRG-054HY 2.3K WW

Chip:

Chip location:

References

Refill 054

how to refill canon 054 and 054H toner cartridge 2023.Refill canon printer 046, 046H Toner cartridge
Cartridge Refilling 054 canon 621cw color laser printer toner cartridge
Refilling the Canon 054 \ Canon 046 cartridge | how and how to refill the Canon cartridge
Refill toner cartridge Compatible for Canon CRG-045 CRG-046 CRG-054 054H CRG-055 Color cartridge.

Dig a hole

How to refill CRG 045 045H CRG 046 046H

Error

Code E015-0000

Building dnsmasq docker-compose file with DHCP enabled

Building dnsmasq docker-compose file with DHCP enabled

Creating Dockerfile

Create Dockerfile as below, the VOLUME /data is pointing to configuration folder

FROM ubuntu:latest

VOLUME /data

RUN apt update
RUN apt install dnsmasq -y
RUN apt install iproute2 -y

CMD dnsmasq -q -d --conf-file=/data/dnsmasq.conf --dhcp-broadcast

Creating docker-compose.yml file

Must add cap_add parameter.

version: '2'

services:
  dnsmasq:
    container_name: dnsmasq
    image: dnsmasq
    build:
      context: .
      dockerfile: Dockerfile.dnsmasq
    restart: unless-stopped
    volumes:
      - /app/dnsmasq/data:/data
    networks:
      - my_macvlan_250
    cap_add:
      - NET_ADMIN

networks:
  my_macvlan_250:
    external: true

This is the same as below command

docker run --cap-add=NET_ADMIN --name dnsmasq -d -it --restart unless-stopped -v /app/dnsmasq/data:/data --network my_macvlan_250 dnsmasq

References

Install Synology CA Certificate into Linux OS

Install Synology CA Certificate into Linux OS

To trust Synology self generated CA in Linux OS, following steps can be used.

Export Synology CA Certificates from NAS

  • Launch Control Panel => Security
  • Click on Certificate tab
  • Click on Add button
  • Select the certificate named as synology
  • Select Explore certificate, then Next

There will be 4 files in the downloaded ZIP file

cert.pem
privkey.pem
syno-ca-cert.pem
syno-ca-privkey.pem

Copy the Synology CA certificate

Copy file syno-ca-cert.pem to server folder and rename it to .crt

cp syno-ca-cert.pem /usr/local/share/ca-certificates/syno-ca-cert.crt
update-ca-certificates

Note: the certificate file name must be .crt

Restart service

For any services used certificate generated by Synology CA certificate, restart the service

systemctl restart <service>

Test CA

Use openssl command

Run following commands

openssl s_client -connect server_address:443 -CAfile /usr/local/share/ca-certificates/syno-ca-cert.crt
openssl s_client -connect server_address:443 -CApath /etc/ssl/certs

Should return 0 (ok)

Verify return code: 0 (ok)

Use curl command

curl --verbose <URL> --cacert /usr/local/share/ca-certificates/syno-ca-cert.crt
curl --verbose <URL>

References

Install self generated CA certificate into Linux OS

Install self generated CA certificate into Linux OS

To trust self generated CA from client system, following steps can be used.

Retrieve CA certificate from server

Copy from CA certificate using browser

Click on lock icron beside address bar of browser, then view certificates.

Copy from server,

The self generated CA certificate normally can be found in server, such as xxxx.ca.crt.

Run command to retrieve from service

Following command will print out CA certificate, remove unnecessary lines, such as DONE, if any.

Note: I haven't validated the certificate retrieved using this method.

openssl s_client -showcerts -connect [server_address]:[port] < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'

Install CA certificate

Copy CA certificate into /usr/local/share/ca-certificates directory, such as xxxx.ca.crt, then run update-ca-certificates command to update system CA, then restart impacted service.

cp <xxxx.ca.crt> /usr/local/share/ca-certificates
update-ca-certificates
systemctl restart <service>

Note: the certificate file name must be .crt

Test CA

Run following command, should return 0 (ok) as below.

openssl s_client -connect server_address:443 -CApath /etc/ssl/certs

...
Verify return code: 0 (ok)

Lost network after PVE rebooted

Lost network after PVE rebooted

Error

After reboot of PVE, network interfaces detected, but no link activated, ip address command shows all physical interfaces are down, and interfaces LED lights are shut off when loading OS.

Getting permission denied error when run ifup command, when using python3 /usr/sbin/ifup -a command, getting error as another instance of this application is already running

After using strace python3 /usr/sbin/ifup -a command, found that the command tried to access folder /run/network, but it doesn't exist.

Solution

Create folder /run/network after rebooted, then run command python3 /usr/sbin/ifup -a to bring up network manually.

Note: This is only a temporary solution, because the folder /run/network will disappear. Will troubleshoot again when got time.

References

Renew Self Signed Certificate Using Synology DSM with custom CA

Renew Self Signed Certificate Using Synology DSM with custom CA

Renew server certificate

  • Launch Control Panel => Security
  • Click on Certificate tab
  • Click on Add button
  • Select Renew certificate, then Next
  • Fill up information for Create certificate signed request (CSR), then Next
  • Click on Download

Following files are created in downloaded ZIP file

  • server.csr
  • server.key

Generate certificate

Following the steps in the page below to create and import the certificates

Use Synology DSM to create Self Signed Certificate with custom CA

References

Use Synology DSM to create Self Signed Certificate with custom CA

Split Mirror in RHEL

Split Mirror in RHEL

To copy one LV to another VG using LV mirror method. This method can not be performed on-line because of vgsplit command.

Note: RHEL doesn't have cplv command.

Steps

vgcreate vg01 /dev/vdb
lvcreate -L 1G -n test1 vg01
vgextend vg01 /dev/vdc
lvconvert --type raid1 --mirrors 1 /dev/vg01/test1 /dev/vdc
lvdisplay -m vg01/test1
lvconvert --splitmirrors 1 --name test2 /dev/vg01/test1
lvdisplay -m vg01/test1
lvdisplay -m vg01/test2
vgchange -a n vg01
vgsplit -t -v /dev/vg01 /dev/vg02 /dev/vdc
vgsplit -v /dev/vg01 /dev/vg02 /dev/vdc
lvs
vgchange -a y vg01
vgchange -a y vg02

References

How to move / copy logical volume (lv) to another volume group (vg)?