2013-08-26

Get EFI GPT partition table information in Linux

在 Linux 下讀取 EFI GPT 格式的硬碟分割表資訊

You install Linux on EFI-based machine, the hard disk will be converted to GPT format.
The partition table information can't be get from the command 'fdisk', you should use command 'parted' instead.
root@twanubt01:~# fdisk -l /dev/sda
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1  1953525167   976762583+  ee  GPT
Partition 1 does not start on physical sector boundary.

root@twanubt01:~# parted /dev/sda print
Model: ATA WDC WD10EZEX-00K (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number  Start   End     Size    File system  Name  Flags
 1      1049kB  200MB   199MB   fat32              boot
 2      200MB   456MB   256MB   ext2
 3      456MB   1000GB  1000GB                     lvm



2013-08-23

Auto start TeamViewer in Lubuntu

設定 TeamViewer 在 Lubuntu 中自動啟動


This topic is about how to set TeamViewer auto start when you login Lubuntu (Ubuntu with LXDE window manager).


  1. Get TeamViewer first.
  2. Install TeamViewer with the command below
sudo dpkg -i teamviewer_linux.deb

or

sudo dpkg -i teamviewer_linux_x64.deb

After install, you can set it auto start when you login:

wyw@wyw-U115:~$ mkdir ~/.config/autostart
wyw@wyw-U115:~$ cd ~/.config/autostart/
wyw@wyw-U115:~/.config/autostart$ dpkg -L teamviewer | grep .desktop
...
/opt/teamviewer8/tv_bin/desktop/teamviewer-teamviewer8.desktop
...
wyw@wyw-U115:~/.config/autostart$ ln -s /opt/teamviewer8/tv_bin/desktop/teamviewer-teamviewer8.desktop .


Then reboot and check if it works.

2013-08-15

Windows 7 /Windows 8 crash after change BIOS SATA mode setting from IDE to AHCI

將 BIOS 的 sata mode 由 IDE 改為 AHCI 後, Windows 7 / Windows 8 就開不能開機了


I installed Windows 8 on SSD and forgot to change the SATA mode to AHCI in BIOS. So the score of AS SSD benchmark is not good:


"pciide - BAD" means the SATA mode is set to IDE in BIOS.

If you don't want to re-install Windows 7 / Windows 8, and just change the SATA mode from IDE to AHCI in BIOS, then it will crash (BSOD).

You have to change the registry setting first:


In HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\storahci\StartOverride, change the setting of key setting of "0" from 3 to 0.

Then change the SATA mode setting from IDE to AHCI:


After reboot, Windows 7 / Windows 8 will not crash and the score of AS SSD benchmark is good:





2013-08-14

Find your Windows 8 / Windows 8.1 Digital Product Key stored in UEFI BIOS

找出存在 UEFI BIOS 中的 Windows 8 / Windows 8.1 序號


You buy a Windows 8 / Windows 8.1 preloaded notebook/PC/AIO, you can't find Certificate of Authenticity (COA) sticker anymore (some small OEM still use COA on their Windows 8 shipping products). COA is used in Windows 7 and previous edition of Windows.

The Digital Product Key (DPK) to is used to activate Windows and it is unique. It is stored in the MSDM table and the MSDM table in stored in BIOS ACPI table.

There is a tool named RW utility can help you to find the DPK out. So far, the latest version is 1.6.4


2013-08-13

Check WinPE or OS system type (32bit or 64bit)

確認 WinPE 或 Windows 是 32bit 或 64bit


The way to check WinPE or Windows OS is 32bit or 64bit.


echo %processor_architecture%




2013-08-12

Find your Windows Wi-Fi password stored in wlan profile

找出自己 (或別人) 儲存在 Windows 裡的 Wi-Fi 密碼


If you have stored your Wi-Fi password in Windows, then others can find it out when they borrow you PC/Notebook.



Command to show your stored wireless profile:

netsh wlan show profiles


Get the password stored in profile named "CaffeineNoteII", for example,

netsh wlan show profiles CaffeineNoteII key=clear


There are two ways to delete the Wi-Fi profiles stored in Windows:

Method 1, use the command to delete it,

netsh wlan delete profile name="CaffeineNoteII"



Method 2, right click your Wi-Fi profile and select "forget this network":




How to check if your Windows is activated? (如何確認你的 Windows 已啟動?)

If you want to use script/batch to check your Windows 7 / Windows 8 activation, you can execute the command below (command prompt with Administrator privilege),

cscript c:\Windows\System32\slmgr.vbs /dli | find /i "license status"

(/i means ignore case-sensitive)

If you don't want to use script/batch. It is easy to check if your Windows 7 / Windows 8 is activated. Just press [Win Key] + [Pause/Break], then you will see the information below,