# Download rEFInd from Sourceforge.net
$ curl -s -L http://sourceforge.net/projects/refind/files/0.11.2/refind-bin-0.11.2.zip -o refind.zip
# unpack downloaded file
$ unzip -q refind.zip
# Change directory
$ cd refind-bin-0.11.2
# Try installing rEFInd
$ sudo ./refind-install
ShimSource is none
Installing rEFInd on OS X....
Installing rEFInd to the partition mounted at /Volumes/ESP
**** ALERT: SIP ENABLED! ****
rEFInd cannot be installed because System Integrity Protection (SIP) seems
to be enabled! You must install rEFInd from your Recovery installation or
from another OS. To install from the Recovery system:
1. Reboot
2. Hold down Command+R as the chime sounds
3. When the OS has booted, select Utilities->Terminal
4. Change to this directory with the 'cd' command; it will probably be under
/Volumes/Macintosh HD/Users/ericnoel/refind-bin-0.11.2
5. Re-run this script.
If you believe SIP is NOT enabled, you may attempt an installation anyhow,
but it may fail.
For more on this subject, see http://www.rodsbooks.com/refind/sip.html
Do you want to attempt installation (Y/N)? y
Copied rEFInd binary files
Copying sample configuration file as refind.conf; edit this file to configure
rEFInd.
Could not set boot device property: 0xe00002bc
# If alerted with SIP, then try disabling SIP
# Reboot computer
# At startup chime, hold down Command+R key combination. The computer should turn into Recovery mode.
# Access Utilities->Terminal from the macOS Recovery window menu bar.
# From Terminal consolel. Disable SIP
# csrutil disable
# Restart computer
# Change directory to the extracted rEFInd folder
# Install rEFInd
$ sudo ./refind-install
ShimSource is none
Installing rEFInd on OS X....
Installing rEFInd to the partition mounted at /Volumes/ESP
Found rEFInd installation in /Volumes/ESP/EFI/refind; upgrading it.
Copied rEFInd binary files
Notice: Backed up existing icons directory as icons-backup.
Existing refind.conf file found; copying sample file as refind.conf-sample
to avoid overwriting your customizations.
# Reboot to recovery and enable back SIP
# csrutil enable
Technology blog for personal research and diary. Short Notes, Quick Reference, scripts, source codes, commands, etc
Friday, December 29, 2017
Sunday, December 17, 2017
[Kubernetes] [minikube] [macOS] [ High Sierra] [VMware Fusion] Error starting host: Temporary Error: Error configuring auth on host: OS type not recognized.
ERROR:
$ minikube start --vm-driver=vmwarefusion
Starting local Kubernetes v1.8.0 cluster...
Starting VM...
E1217 20:38:52.628679 394 start.go:150] Error starting host: Temporary Error: Error configuring auth on host: OS type not recognized.
Retrying.
FIX:
PRE-REQUISITES:
Check VM Driver
$ cat ~/.minikube/machines/minikube/config.json | grep DriverName
"DriverName": "vmwarefusion",
Check ISO version:
$ cat ~/.minikube/machines/minikube/config.json | grep -i ISO
"ISO": "/Users/ericnoel/.minikube/machines/minikube/boot2docker.iso",
"Boot2DockerURL": "file:///Users/ericnoel/.minikube/cache/iso/minikube-v0.23.6.iso",
"ConfigDriveISO": "",
Get password:
$ cat ~/.minikube/machines/minikube/config.json|grep -i pass
"SSHPassword": "tcuser",
Copy
$ ssh-copy-id -i ~/.minikube/machines/minikube/id_rsa.pub docker@$(minikube ip)
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/Users/spikes/.minikube/machines/minikube/id_rsa.pub"
The authenticity of host 'x.x.x.x (x.x.x.x)' can't be established.
ECDSA key fingerprint is SHA256:Df4JLDF3w7eBVj8Kw7XOXSXHjlWqXQI1fDLHtp12Nq3.
Are you sure you want to continue connecting (yes/no)? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
docker@x.x.x.x's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'docker@x.x.x.x'"
and check to make sure that only the key(s) you wanted were added.
Start minikube
$ minikube start --vm-driver=vmwarefusion
Starting local Kubernetes v1.8.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Downloading localkube binary
148.25 MB / 148.25 MB [============================================] 100.00% 0s
65 B / 65 B [======================================================] 100.00% 0s
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
Kubectl is now configured to use the cluster.
Loading cached images from config file.
$ minikube start --vm-driver=vmwarefusion
Starting local Kubernetes v1.8.0 cluster...
Starting VM...
E1217 20:38:52.628679 394 start.go:150] Error starting host: Temporary Error: Error configuring auth on host: OS type not recognized.
Retrying.
FIX:
PRE-REQUISITES:
Check VM Driver
$ cat ~/.minikube/machines/minikube/config.json | grep DriverName
"DriverName": "vmwarefusion",
Check ISO version:
$ cat ~/.minikube/machines/minikube/config.json | grep -i ISO
"ISO": "/Users/ericnoel/.minikube/machines/minikube/boot2docker.iso",
"Boot2DockerURL": "file:///Users/ericnoel/.minikube/cache/iso/minikube-v0.23.6.iso",
"ConfigDriveISO": "",
Get password:
$ cat ~/.minikube/machines/minikube/config.json|grep -i pass
"SSHPassword": "tcuser",
Copy
$ ssh-copy-id -i ~/.minikube/machines/minikube/id_rsa.pub docker@$(minikube ip)
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/Users/spikes/.minikube/machines/minikube/id_rsa.pub"
The authenticity of host 'x.x.x.x (x.x.x.x)' can't be established.
ECDSA key fingerprint is SHA256:Df4JLDF3w7eBVj8Kw7XOXSXHjlWqXQI1fDLHtp12Nq3.
Are you sure you want to continue connecting (yes/no)? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
docker@x.x.x.x's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'docker@x.x.x.x'"
and check to make sure that only the key(s) you wanted were added.
Start minikube
$ minikube start --vm-driver=vmwarefusion
Starting local Kubernetes v1.8.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Downloading localkube binary
148.25 MB / 148.25 MB [============================================] 100.00% 0s
65 B / 65 B [======================================================] 100.00% 0s
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
Kubectl is now configured to use the cluster.
Loading cached images from config file.
Wednesday, September 27, 2017
No audio on headphone / earphone right channel when plugged into Macbook
1. Plug earphone / headphone in Macbook / Macbook Pro headphone jack.
2. Open Settings
3. Select the Sounds option
4. Slide Balance to Center.
2. Open Settings
3. Select the Sounds option
4. Slide Balance to Center.
Wednesday, March 1, 2017
[ ok ] Setting up ALSA...warning: 'alsactl restore' failed with error message 'alsactl: load_state:1686: No soundcards found...'...done.
# Edit configuration file read by the early-stage boot firmware
sudo vi /boot/config.txt
# Add entry and save
dtparam=audio=on
# Reboot
sudo reboot
sudo vi /boot/config.txt
# Add entry and save
dtparam=audio=on
# Reboot
sudo reboot
Wednesday, February 1, 2017
FAT-fs (/dev/sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
# Install utility for making and checking MS-DOS FAT filesystems.
sudo apt-get install dosfstools
# Execute the following
sudo fsck.vfat -v -a -w /dev/sda1
dosfsck 3.0.13 (30 Jun 2012)
dosfsck 3.0.13, 30 Jun 2012, FAT32, LFN
Checking we can access the last sector of the filesystem
0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
Automaticaly removing dirty bit.
There are differences between boot sector and its backup.
Differences: (offset:original/backup)
71:53/2d, 72:50/33, 73:49/32, 74:4b/47, 75:45/42, 76:53/20, 77:2d/20
, 78:33/20, 79:32/20, 80:47/20, 81:42/20
Not automatically fixing this.
Boot sector contents:
System ID "BSD 4.4"
Media byte 0xf8 (hard disk)
512 bytes per logical sector
16384 bytes per cluster
32 reserved sectors
First FAT starts at byte 16384 (sector 32)
2 FATs, 32 bit entries
7590400 bytes per FAT (= 14825 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 15197184 (sector 29682)
1897568 data clusters (31089754112 bytes)
32 sectors/track, 255 heads
2 hidden sectors
60751870 sectors total
/SHARES/02-20170802072122.avi
File size is 1293488 bytes, cluster chain length is 655360 bytes.
Truncating file to 655360 bytes.
Reclaiming unconnected clusters.
Checking free cluster summary.
Free cluster summary wrong (1888494 vs. really 1888533)
Auto-correcting.
Performing changes.
/dev/sda1: 137 files, 9035/1897568 clusters
sudo apt-get install dosfstools
# Execute the following
sudo fsck.vfat -v -a -w /dev/sda1
dosfsck 3.0.13 (30 Jun 2012)
dosfsck 3.0.13, 30 Jun 2012, FAT32, LFN
Checking we can access the last sector of the filesystem
0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
Automaticaly removing dirty bit.
There are differences between boot sector and its backup.
Differences: (offset:original/backup)
71:53/2d, 72:50/33, 73:49/32, 74:4b/47, 75:45/42, 76:53/20, 77:2d/20
, 78:33/20, 79:32/20, 80:47/20, 81:42/20
Not automatically fixing this.
Boot sector contents:
System ID "BSD 4.4"
Media byte 0xf8 (hard disk)
512 bytes per logical sector
16384 bytes per cluster
32 reserved sectors
First FAT starts at byte 16384 (sector 32)
2 FATs, 32 bit entries
7590400 bytes per FAT (= 14825 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 15197184 (sector 29682)
1897568 data clusters (31089754112 bytes)
32 sectors/track, 255 heads
2 hidden sectors
60751870 sectors total
/SHARES/02-20170802072122.avi
File size is 1293488 bytes, cluster chain length is 655360 bytes.
Truncating file to 655360 bytes.
Reclaiming unconnected clusters.
Checking free cluster summary.
Free cluster summary wrong (1888494 vs. really 1888533)
Auto-correcting.
Performing changes.
/dev/sda1: 137 files, 9035/1897568 clusters
Wednesday, October 5, 2016
Install Kodi (Official Repository) on Raspberry Pi 3
After Raspbian Installation.
#Update Debian
sudo apt-get update
sudo apt-get upgrade
# Setup Wireless
# Edit Network interfaces
sudo vi /etc/network/interfaces
#add the following to the end of the interfaces file
auto wlan0
iface default inet dhcp
#Modify the following from the interfaces file
iface wlan0 inet dhcp
# Edit wireless configuration
sudo vi /etc/wpa_supplicant/wpa_supplicant.conf
# Add the following:
network={
ssid="xxxx"
psk="xxxx"
}
# Install Kodi
sudo apt-get install kodi
# Allow Keyboard/Mouse from Kodi
sudo usermod -a -G input kodi
# Enable Kodi during startup
sudo vi /etc/default/kodi
# Edit the following config to enable Kodi during startup
# Set this to 1 to enable startup
ENABLED=1
#if you plan using more than 2TB external usb for your media, install NTFS-3G driver
sudo apt-get install ntfs-3g
# List UUIDs of connected drives
$ls -l /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 15 Oct 5 06:48 3698ef8e-f24cf61dfg1e -> ../../mmcblk0p2
lrwxrwxrwx 1 root root 10 Oct 5 06:48 55D8D96AD8D94ABC -> ../../sda1
lrwxrwxrwx 1 root root 15 Oct 5 06:48 70D7-EA1E -> ../../mmcblk0p1
# take note of the UUID (highlighted) and types of files supported
$sudo blkid
/dev/mmcblk0: PTUUID="3386e05a" PTTYPE="dos"
/dev/mmcblk0p1: SEC_TYPE="msdos" LABEL="boot" UUID="70D7-EA1E" TYPE="vfat" PARTUUID="3487e05a-01"
/dev/mmcblk0p2: UUID="3698ef8e-f24cf61dfg1e" TYPE="ext4" PARTUUID="3487e05a-02"
/dev/sda1: LABEL="spikes-3tb-movies" UUID="55D8D96AD8D94ABC" TYPE="ntfs"
# Create a mount folder
$sudo mkdir /media/spikes-3tb-movies
# Backup file system table file
$sudo cp /etc/fstab /etc/fstab.bak
# Edit file system table file
$sudo vi /etc/fstab
# Add the following to the file system table entries (replace those highlighted)
UUID=55D8D96AD8D94ABC /media/spikes-3tb-movies ntfs nofail,noatime,auto,users,rw,uid=1000,gid=100,umask=0002 0 0
#Update Debian
sudo apt-get update
sudo apt-get upgrade
# Setup Wireless
# Edit Network interfaces
sudo vi /etc/network/interfaces
#add the following to the end of the interfaces file
auto wlan0
iface default inet dhcp
#Modify the following from the interfaces file
iface wlan0 inet dhcp
# Edit wireless configuration
sudo vi /etc/wpa_supplicant/wpa_supplicant.conf
# Add the following:
network={
ssid="xxxx"
psk="xxxx"
}
# Install Kodi
sudo apt-get install kodi
# Allow Keyboard/Mouse from Kodi
sudo usermod -a -G input kodi
# Enable Kodi during startup
sudo vi /etc/default/kodi
# Edit the following config to enable Kodi during startup
# Set this to 1 to enable startup
ENABLED=1
#if you plan using more than 2TB external usb for your media, install NTFS-3G driver
sudo apt-get install ntfs-3g
# List UUIDs of connected drives
$ls -l /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 15 Oct 5 06:48 3698ef8e-f24cf61dfg1e -> ../../mmcblk0p2
lrwxrwxrwx 1 root root 10 Oct 5 06:48 55D8D96AD8D94ABC -> ../../sda1
lrwxrwxrwx 1 root root 15 Oct 5 06:48 70D7-EA1E -> ../../mmcblk0p1
# take note of the UUID (highlighted) and types of files supported
$sudo blkid
/dev/mmcblk0: PTUUID="3386e05a" PTTYPE="dos"
/dev/mmcblk0p1: SEC_TYPE="msdos" LABEL="boot" UUID="70D7-EA1E" TYPE="vfat" PARTUUID="3487e05a-01"
/dev/mmcblk0p2: UUID="3698ef8e-f24cf61dfg1e" TYPE="ext4" PARTUUID="3487e05a-02"
/dev/sda1: LABEL="spikes-3tb-movies" UUID="55D8D96AD8D94ABC" TYPE="ntfs"
# Create a mount folder
$sudo mkdir /media/spikes-3tb-movies
# Backup file system table file
$sudo cp /etc/fstab /etc/fstab.bak
# Edit file system table file
$sudo vi /etc/fstab
# Add the following to the file system table entries (replace those highlighted)
UUID=55D8D96AD8D94ABC /media/spikes-3tb-movies ntfs nofail,noatime,auto,users,rw,uid=1000,gid=100,umask=0002 0 0
Tuesday, August 25, 2015
Step by Step Raspbian Installation on Raspberry Pi 2 using OS X Yosemite
Step by Step Raspbian (2015-05-05 Debian Wheezy) Installation on Raspberry Pi 2 Model B using OS X Yosemite
Download Raspbian
Download Raspbian image from Raspberry.org Downloads page
Verify downloaded Raspbian Image
Verify checksum of downloaded Raspbian image, it should match the SHA-1 from rasberrypi.org website. Open Terminal and execute openssl sha1 [path to image] command.
$ openssl sha1 2015-05-05-raspbian-wheezy.zip
SHA1(2015-05-05-raspbian-wheezy.zip)= cb799af077930ff7cbcfaa251b4c6e25b11483de
Extract image from the Raspbian ZIP file
Open Terminal, extract Raspbian image via unzip command
$ unzip 2015-05-05-raspbian-wheezy.zip
Archive: 2015-05-05-raspbian-wheezy.zip
inflating: 2015-05-05-raspbian-wheezy.img
Format microSD Card
1. Insert the MicroSD card into Standard SD Card adapter
2. Insert the SD Card into the SD Card Slot of your OS X Machine. SD Card will be mounted automatically.
3. Open Disk Utility, select the SD Card from the listed drives and click the Erase tab. Define a name for the partition in the Name field. Erase SD Card using MS-DOS (FAT) Format by clicking the Erase.. button.
Determine the BSD Name
Option 1 via Disk Utility. After erasing/formatting the SD Card, select the newly formatted/erased partition and click First Aid tab. Make sure the Show details is checked and then click Verify Disk button. Take note of the lines of text that appear and look for something like /dev/diskxx. Taken from the example below its ** /dev/rdisk2s1 .
Option 2 via Command line. Open Terminal, issue "df -h" command from the console. Take note of the SD device highlighted below e.g. /dev/disk2s1
$ df -h
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
/dev/disk1 465Gi 381Gi 83Gi 83% 100065414 21739407 82% /
devfs 186Ki 186Ki 0Bi 100% 644 0 100% /dev
map -hosts 0Bi 0Bi 0Bi 100% 0 0 100% /net
map auto_home 0Bi 0Bi 0Bi 100% 0 0 100% /home
/dev/disk2s1 15Gi 2.3Mi 15Gi 1% 0 0 100% /Volumes/UNTITLED
Using the device name of the partition determine the raw device name for the entire disk, by omitting the final "s1" and replacing "disk" with "rdisk" e.g. the BSD for the /dev/disk2s1 is /dev/rdisk2
Unmount the SD Card partition
Open Terminal, unmount the SD card partition (NOTE: do not Eject) using diskutil unmount command
$ sudo diskutil unmount /dev/disk2s1
Password:*
Volume UNTITLED on disk2s1 unmounted
Write Raspbian image to SD Card
Open Terminal, issue the dd command to convert and copy image to raw device. Take note of the correct raw disk device name e.g /dev/disk2s1 => /dev/rdisk2, /dev/disk3s1 => /dev/rdisk3..
$ sudo dd bs=1m if=2015-05-05-raspbian-wheezy.img of=/dev/rdisk2
Password:
3125+0 records in
3125+0 records out
3276800000 bytes transferred in 252.814853 secs (12961264 bytes/sec)
Eject SD Card
After the dd command finishes, eject the SD Card
$ sudo diskutil eject /dev/disk2
Password:
Disk /dev/disk2 ejected
Install Raspbian
Insert SD card into Raspberry Pi, plug-in device and follow installation instructions.
Download Raspbian
Download Raspbian image from Raspberry.org Downloads page
Verify downloaded Raspbian Image
Verify checksum of downloaded Raspbian image, it should match the SHA-1 from rasberrypi.org website. Open Terminal and execute openssl sha1 [path to image] command.
$ openssl sha1 2015-05-05-raspbian-wheezy.zip
SHA1(2015-05-05-raspbian-wheezy.zip)= cb799af077930ff7cbcfaa251b4c6e25b11483de
Extract image from the Raspbian ZIP file
Open Terminal, extract Raspbian image via unzip command
$ unzip 2015-05-05-raspbian-wheezy.zip
Archive: 2015-05-05-raspbian-wheezy.zip
inflating: 2015-05-05-raspbian-wheezy.img
Format microSD Card
1. Insert the MicroSD card into Standard SD Card adapter
2. Insert the SD Card into the SD Card Slot of your OS X Machine. SD Card will be mounted automatically.
3. Open Disk Utility, select the SD Card from the listed drives and click the Erase tab. Define a name for the partition in the Name field. Erase SD Card using MS-DOS (FAT) Format by clicking the Erase.. button.
Determine the BSD Name
Option 1 via Disk Utility. After erasing/formatting the SD Card, select the newly formatted/erased partition and click First Aid tab. Make sure the Show details is checked and then click Verify Disk button. Take note of the lines of text that appear and look for something like /dev/diskxx. Taken from the example below its ** /dev/rdisk2s1 .
Option 2 via Command line. Open Terminal, issue "df -h" command from the console. Take note of the SD device highlighted below e.g. /dev/disk2s1
$ df -h
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
/dev/disk1 465Gi 381Gi 83Gi 83% 100065414 21739407 82% /
devfs 186Ki 186Ki 0Bi 100% 644 0 100% /dev
map -hosts 0Bi 0Bi 0Bi 100% 0 0 100% /net
map auto_home 0Bi 0Bi 0Bi 100% 0 0 100% /home
/dev/disk2s1 15Gi 2.3Mi 15Gi 1% 0 0 100% /Volumes/UNTITLED
Using the device name of the partition determine the raw device name for the entire disk, by omitting the final "s1" and replacing "disk" with "rdisk" e.g. the BSD for the /dev/disk2s1 is /dev/rdisk2
Unmount the SD Card partition
Open Terminal, unmount the SD card partition (NOTE: do not Eject) using diskutil unmount command
$ sudo diskutil unmount /dev/disk2s1
Password:*
Volume UNTITLED on disk2s1 unmounted
Write Raspbian image to SD Card
Open Terminal, issue the dd command to convert and copy image to raw device. Take note of the correct raw disk device name e.g /dev/disk2s1 => /dev/rdisk2, /dev/disk3s1 => /dev/rdisk3..
$ sudo dd bs=1m if=2015-05-05-raspbian-wheezy.img of=/dev/rdisk2
Password:
3125+0 records in
3125+0 records out
3276800000 bytes transferred in 252.814853 secs (12961264 bytes/sec)
Eject SD Card
After the dd command finishes, eject the SD Card
$ sudo diskutil eject /dev/disk2
Password:
Disk /dev/disk2 ejected
Install Raspbian
Insert SD card into Raspberry Pi, plug-in device and follow installation instructions.
Subscribe to:
Posts (Atom)





