Category Archives: Linux

Linux based Operating Systems

Create macOS install usb using Linux

If you don’t have a spare Mac or your Mac is too old to download macOS from the Apple App Store then use the method below.

Create account on hackintosh.download

The download required macOS from https://www.hackintosh.download/category/3-macos/

Insert a usb (16GB+ recommended) into Linux PC usb port and run Terminal

Use fdisk to determine your usb dev name letter, e.g. /dev/sdc. It is very important to note the correct device letter or you may overwrite your own system or data drive!

sudo fdisk -l

Use dm2img to copy macOS (OS X El Capitan in this example) to your usb device (sdc in this example). This completely overwrites whatever is on the usb drive already!

sudo apt install dmg2img  # install dmg2img if not installed

sudo dmg2img -v -i ./EL_Capitan.dmg  -o /dev/sdc
Output from dmg2img...
dmg2img v1.6.7 (c) vu1tur (to@vu1tur.eu.org)

./EL_Capitan.dmg --> /dev/sdc

reading property list, 361779 bytes from address 6237611619 ...
partition 0: begin=192, size=430, decoded=284
partition 1: begin=908, size=430, decoded=284
partition 2: begin=1611, size=356137, decoded=239844

decompressing:
opening partition 0 ...         [2] 100.00%  ok
opening partition 1 ...         [2] 100.00%  ok
opening partition 2 ...      [5991] 100.00%  ok

When complete eject the usb to flush IO buffers (important!) by clicking on the usb icon on the desktop and click remove | eject.

Insert usb in your Mac and power-up holding down the Alt | Option key until the Install usb icon is displayed in the middle of the screen.

Select the install usb to install macOS

Once in Recovery mode select Disk Utility to erase disk (if new drive or clean install)

Exit Disk Utility

Select mac OS to install from main menu and install to your main HDD or SSD

Note: the download source above is not Apple approved. To be safe, once your Mac is up and running, download the mac OS again from the Apple Store and re-create the install usb and carry out a clean install.

 

Useful Linux Terminal Commands

Display details about firmware, cache, memory

$ sudo lshw -C memory
  *-firmware                
       description: BIOS
       vendor: FUJITSU // Phoenix Technologies Ltd.
       physical id: 0
       version: 6.00 R1.06.3012.A1
       date: 04/21/2011
       size: 110KiB
       capacity: 4032KiB
       capabilities: pci pnp upgrade shadowing escd cdboot bootselect int13floppynec int13floppytoshiba int13floppy360 int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer int10video acpi usb ls120boot zipboot biosbootspecification
  *-cache:0
       description: L1 cache
       physical id: 5
       slot: L1 Cache
       size: 64KiB
       capacity: 64KiB
       capabilities: burst synchronous internal write-through data
       configuration: level=1
...
  *-memory
       description: System Memory
       physical id: 2a
       slot: System board or motherboard
       size: 16GiB
     *-bank:0
          description: DIMM DDR3 Synchronous 1067 MHz (0.9 ns)
          product: 99U5471-021.A00LF
          vendor: Toshiba
          physical id: 0
          serial: DE131F7C
          slot: Slot-1
          size: 4GiB
          width: 64 bits
          clock: 1067MHz (0.9ns)
...

Test and Benchmark 3D Graphics

sudo apt install glmark2
glmark2

Create bootable usb using DD

This method depends on the iso file being designed as bootable, e.g Kaspersky Rescue Disk or Bitdefender Rescue CD, etc.

Plug in the USB flash drive and list its device name using fdisk

sudo fdisk -l
.
.
.
Disk /dev/sdc: 3.8 GiB, 4009754624 bytes, 7831552 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x052e500d

Device     Boot Start     End Sectors  Size Id Type
/dev/sdc1  *     2048 7831551 7829504  3.8G  c W95 FAT32 (LBA)

Unmount the device partition, e.g. sdc1.

umount /dev/sdc1

Copy the iso. file to the device (sdc) not the partition (sdc1). Note the larger block size (4M, default 512bytes) to speed up the transfer. The usb light will flash during copying. Note this can take a long time depending on iso file size. Be patient. When finished dd displays a summary report of bytes copied.

sudo dd if=filename.iso of=/dev/sdc bs=4M

Finally flush the io buffers and eject

sync

sudo eject /dev/sdc

Downgrade Linux Thunderbird

For those who have upgraded to latest Thunderbird to find Calendar add-on is suddenly not compatible. The quick fix is to roll-back to last version as follows:

Display Thunderbird available versions

apt-cache show thunderbird | grep Version

Select last version to rollback to, e.g.

sudo apt-get install thunderbird=1:52.9.1+build3-0ubuntu0.14.04.1

 

 

 

CA Useful Notes

Computer Active Useful Notes

www.snipca.com/nnnnn programs

31235 Android Magnifying Glass (IOS 31236)
30849 Appbuster Bulk Windows uninstall programs
30789 Search Companies House
29712 CloneApp Backup Windows App and System Settings default features
29899 MiTec Task Manager Delux – better Windows Task Manager
27353 Lasso to prioritise RAM for programs that need it
28329 NoBot AV scanner – use with AdwCleaner
28321 ControlMyMonitor colour tweaker, from NirSoft
28351 BleachBit remove hidden junk like ccleaner without paywall limitations
27011 Mpow’s Air Vent Mount <£10
26883 InSpectre Meltdown + Spectre detector and perf indicator – also disables patch
26868 Whocrashed 6.01 BSOD Analyser
26836 Cloudberry – remote access via web browser
25761 Google Backup&Sync 15GB free storage
26760 Drive Formatter – Wipe data
26400 DMEX Explorer tool ctrl-F1 menu to split windows
26359 W10 WinAero Tweaks
26358 Bootracer see which programs slow PC start up
25237 Windows Repair Pro
25199 Colorize Photos
24973 MusicBee + MediaMonkey.com
24368 Wise Program Uninstaller
23038 AllDup free duplicate file finder

Tips & Recommendations

Weed out broken system files
Run Deployment Image Servicing and Management tool
dism.exe /online /cleanup-image /Restorehealth
Once finished, check with System File Checker
sfc /scannow

Money Manager EX – replacement for Microsoft Money (support ended 2009)
Adobe Photoshop Express free Windows 10 basic photo editing app
clonapp.de Back up installed software to move to another PC/OS
Moneypool – Paypal Group to collect money
Logitech MK540 coffee prof kb + mouse – wireless only
Fast DNS 1.1.1.1/1.0.0.1 1dot1dot1dot.cloudflare.dns.com
www.easyscreenocr.com Extract text from screenshot
netsh wlan show profile “NETWORK” key+clear – Show WiFi password
netsh wlan show profile – Show WiFi networks
Notepad log book add .LOG to print time stamp on open
NordVPN nordvpn.com best paid for VPN £9.10/mon
TunnelBear alternative free/paid VPN 1.5GB/mon with TWitter a/c
www.aeroadmin.com free Unlimited Teamviewer alternative
Remove USB command line utility
https://www.uwe-sieber.de/drivetools_e.html

Recommended Printers

  • Brother MFC-J5330DW £120
  • Epson WF-3720DWF £80
  • Epson WF-2860DWF £70
  • HP Officejet 8715 £150 – bit noisy, but fast
  • Canon MG5750 £55 – no ADF
  • Canon TS6150 £100 – no ADF

Stretch YouTube Video To Fit Browser Window

Fit a YouTube video in the browser window as follows:

Normal YouTube Video URL is https://www.youtube.com/watch?v=grItaOxuyTE&t

To watch in a re-sizable window without switching to Full Screen rewrite the above URLas follows:

https://www.youtube.com/v/grItaOxuyTE&t

Append your YouTube video ID to www.youtube.com/v/VIDEO_ID to display a re-sizeable browser window.

In other words replace /watch?v= with /v/ in the normal URL

 

Mount EFI Partition from Linux

This blog (http://www.pjc.me.uk/efi-gpt/) is the only one that gets to anywhere close to answering this question. However you need to substitute “auto” instead of “fat32” in the mount command to get it to work. “xfs” and “fat32” threw out errors – actually the mount command after mounting shows it was “vfat”!

Here’s how I mounted the EFI partition on my external 500GB drive:

sudo parted -l print
Model: ATA ST3500630AS (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system     Name                  Flags
1      1049kB  135MB   134MB                                          bios_grub
2      135MB   345MB   210MB   fat32                                  boot
3      345MB   479MB   134MB   fat32                                  msftres
4      479MB   54.2GB  53.7GB  ntfs                                   msftdata
5      54.2GB  108GB   53.7GB  ntfs                                   msftdata
6      108GB   162GB   53.7GB  ntfs                                   msftdata
7      162GB   172GB   10.7GB  ext4
8      172GB   184GB   11.8GB  ext4
9      184GB   185GB   1074MB  linux-swap(v1)
10      185GB   228GB   42.8GB  hfs+            Apple_HFS_Untitled_2
11      228GB   282GB   53.6GB  hfs+            Apple_HFS_Untitled_3
12      282GB   335GB   53.6GB  hfs+            Apple_HFS_Untitled_4
13      335GB   389GB   53.6GB  hfs+            Apple_HFS_Untitled_5
14      389GB   488GB   99.2GB  hfs+            Apple_HFS_Untitled_6
15      488GB   489GB   650MB   hfs+            Recovery HD
16      489GB   500GB   10.9GB  hfs+            Apple_HFS_Untitled_2

sudo mount -t auto /dev/sdb2 /mnt/test

cd /mnt/test/
ls
boot  EFI

Use kdesudo Dolphin (as Root) to view and edit files on the EFI partition

Note use of Parted (supports GPT drives) to get the partition number

Increase VirtualBox Hard Disk Size

From the Host Command line use the VboxManage resize option to increase the disk capacity

VBoxManage modifyhd \path-to-vdi-location\Windows\ 10\ Pro.vdi --resize 35840

This example is from a Linux host and increases the total size of the disk to 35GB (35 * 1024MB)

Once this is completed start the image and and use Windows Disk Manager to extend the volume to use the unused partition space.

 

 

How to mount NTFS volume

 

  • ls /media
  • If you don’t see a folder for your Windows partition, you should create one with the following command:

    sudo mkdir /media/windows

  • Next, mount the partition in read-only mode onto this folder with this command:

    mount -t ntfs-3g -o ro /dev/sda3 /media/windows