Friday, December 23, 2016

phpsysinfo no longer works in Ubuntu 16.04 LTS

Symptom:

- You see either of the below two error messages when trying to browse a phpsysinfo web page.
- The problem is observed in both upgraded system and fresh install with 16.04 and 16.04.1




Cause:

- The first issue is due to missing PHP 7 mod for Apache 2 web server
- The reason for second issue is unknown but the latest phpsysinfo in github already resolve the issue.

Solution:

The first issue can be resolved by installing the required mod:
# apt-get install libapache2-mod-php7.0
The second issue can be resolved by replacing the phpsysinfo with latest version for github
# mv /usr/share/phpsysinfo /usr/share/phpsysinfo~
# git clone https://github.com/phpsysinfo/phpsysinfo.git
# mv /usr/share/phpsysinfo~/phpsysinfo.ini /usr/share/phpsysinfo/phpsysinfo.ini

Saturday, August 6, 2016

Setup targetcli in Ubuntu Server as a iSCSI Target for Windows Failover Cluster Storage

This post is for reference only and does not contain every steps of the configuration tasks.

Versions:

- Ubuntu Server 16.04.1 for iSCSI target installation
- Windows Server 2012 R2 for Cluster Service

Background:

There are a number of ways to create a iSCSI target supported for Windows Cluster service (i.e. the iSCSI target supports SCSI-3 persistent reservation), for instance, FreeNAS, OpenFiler or a dedicated NAS unit. Ubuntu Server is my choice due to its small footprints (512MB RAM or less). Among the packages available, targetcli (as opposed to iscsitarget) is the only choice to allow persistent reservation.

Procedures:

All commands below are run as root.

Step 1: Install and run the command
# apt-get install targetcli
# targetcli

Step 2: create a disk image with the name "disk01" on /mnt/vdb1/iscsi_disks/disk01.img with size 10 GB
/> cd backstores/fileio
/backstores/fileio> create disk01 /mnt/vdb1/iscsi_disks/disk01.img 10G

Step 3: create a target (assume iqn = iqn.2016-07.iscsisvr.local:storage.target00, which is the iSCSI identifier for the server side) and connect the backend storage
/backstores/fileio> cd /iscsi
/iscsi> create iqn.2016-07.iscsisvr.local:storage.target00
/iscsi> cd iqn.2016-07.iscsisvr.local:storage.target00/tpg1/luns
/iscsi/iqn.20.../tpg1/luns> create /backstores/fileio/disk01

Step 4: set IP address to listen and ACL (change the iSCSI initiator name accordingly, they are the clients that will connect to this iSCSI target)
/iscsi/iqn.20.../tpg1/luns> cd ../portals
/iscsi/iqn.20.../tpg1/portals> create 0.0.0.0
/iscsi/iqn.20.../tpg1/portals> cd ../acls
/iscsi/iqn.20.../tpg1/acls> create iqn.2016-07.iscsi.initiator.name:alias

Step 5: Define access rights (in this reference we only discuss demo mode, which means "open" access)
/iscsi/iqn.20.../tpg1/acls> cd ..
/iscsi/iqn.20.../tpg1> set attribute authentication=0 demo_mode_write_protect=0 generate_node_acls=1 cache_dynamic_acls=1
/iscsi/iqn.20.../tpg1> cd /
/> saveconfig
/> exit
Step 6: Complete. The effect should be immediate but I suggest doing a reboot.
Reference #1: https://www.server-world.info/en/note?os=Ubuntu_16.04&p=iscsi
Reference #2: http://linux-iscsi.org/wiki/ISCSI

Tuesday, March 8, 2016

Interrupt to Windows Startup Settings (Includes Safe Mode) on UEFI enabled PC

Symptom:

- Apply to Windows 8, 8.1 and 10.
- You cannot catch the chance to press <F8> during the Windows loader.

Cause:

- The system boots too quickly, especially for platform with native UEFI (CSM disabled) and SSD as the boot drive

Solution:

- There is not much advice if you can no longer boot up the Windows OS and you cannot find a bootable DVD / USB for recovery purpose
- Possible solution is to interrupt the POST screen by entering the "Boot Menu" (depends on your hardware, the keystroke can be <F12>, <Esc>, etc), on the boot device selection screen, start pressing the <F8> key continuously while you press the <Enter> key to select the suitable boot device. There is still a hope that you can interrupt the Windows loader and allows you to enter the Windows Startup Settings page.