Wednesday, August 19, 2015

How to fix Windows 10 Package KB3081438 failed to be changed to the Staged state. Status: 0x800f0816.

If you got error during Windows 10 (process download was stuck in something percentage), in Event Viewer (Win+X) > Windows Logs > Setup, you got
Package KB3081438 failed to be changed to the Staged state. Status: 0x800f0816, you need to restart Windows Update Service.
To fix that: Win+R and type services.msc, right click on Windows Update select restart.
You may check your update will continue, Windows button > Settings > Update & Security.

Tuesday, August 18, 2015

How to upgrade Debian 7 to Debian 8

ref: https://www.debian.org/releases/stable/i386/release-notes/ch-upgrading

checking system status:
1. make it full update
# apt-get update
# apt-get upgrade
2. disabling apt pinning /etc/apt/preferences.d or /etc/apt/preferences to allow new stable
3. check package status
# dpkg --audit
for aptitude
# aptitude search "~ahold"
for apt
# dpkg --get-selections | grep 'hold$'

remove unofficial source and add jessie repository in /etc/apt/sources.list

-------------------------
#

# deb cdrom:[Debian GNU/Linux 7.1.0 _Wheezy_ - Official amd64 CD Binary-1 20130615-23:06]/ wheezy main

#deb cdrom:[Debian GNU/Linux 7.1.0 _Wheezy_ - Official amd64 CD Binary-1 20130615-23:06]/ wheezy main

#deb http://security.debian.org/ wheezy/updates main
#deb-src http://security.debian.org/ wheezy/updates main
deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main

#deb http://kambing.ui.ac.id/debian/ wheezy main
#deb-src http://kambing.ui.ac.id/debian/ wheezy main
deb http://kambing.ui.ac.id/debian/ jessie main
deb-src http://kambing.ui.ac.id/debian/ jessie main

# wheezy-updates, previously known as 'volatile'
#deb http://kambing.ui.ac.id/debian/ wheezy-updates main
#deb-src http://kambing.ui.ac.id/debian/ wheezy-updates main

#deb http://http.debian.net/debian wheezy main
#deb-src http://http.debian.net/debian wheezy main

#deb http://http.debian.net/debian wheezy-updates main
#deb-src http://http.debian.net/debian wheezy-updates main

# Debian 7 (flash player adobe)
#deb http://ftp.de.debian.org/debian wheezy main contrib
#deb http://ftp.de.debian.org/debian wheezy main # duplicate

# Non Free Repository
#deb http://ftp.de.debian.org/debian wheezy main non-free
deb http://ftp.de.debian.org/debian jessie main non-free
-------------------------

add cd/dvd
1. verify cd/dvd
# mount /media/cdrom # this will mount the CD to the mount point
# ls -alF /media/cdrom # this should show the CD's root directory
# umount /media/cdrom # this will unmount the CD
2. add cd/dvd into apt
# apt-cdrom add

!MAKE SURE YOUR /etc/apt/sources.list refer either to “jessie”, no more wheezy

Start your upgrade
1. run
# apt-get update
if error appear "E: You don't have enough free space in /var/cache/apt/archives/."
# apt-get clean
# apt-get autoremove
2. minimal system upgrade
# apt-get upgrade
Must upgrade libc6 glibc
3. upgrade system
# apt-get dist-upgrade
4. use Package Updater to fix application update
5. add 3rd party repository

to fix and resume upgrade
# apt-get -f install

final repository /etc/apt/sources.list
#deb cdrom:[Debian GNU/Linux 8.0.0 _Jessie_ - Official amd64 CD Binary-1 2015042
5-12:54]/ jessie main

deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main

deb http://kambing.ui.ac.id/debian/ jessie main
deb-src http://kambing.ui.ac.id/debian/ jessie main

# Non Free Repository
deb http://ftp.de.debian.org/debian jessie main non-free

deb http://ftp.de.debian.org/debian jessie-backports main

How to fix grub-efi Debian 8 after windows 10 upgrade

After and during upgrading your Windows (with EFI/GPT) into Windows 10, grub-efi will broken.
----------------------------
Symtom:
----------------------------
error: no such partition
Entering rescue mode...
grub rescue>

1. Find linux
grub rescue> ls
(hd0) (hd0,gpt7) (hd0,gpt6) (hd0,gpt5) (hd0,gpt4) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1) (hd1)
grub rescue> ls (hd0,gpt6)
(hd0,gpt6): Filesystem is unknown.
grub rescue> ls (hd0,gpt7)
(hd0,gpt7): Filesystem is ext2.
2. It is mark as (hd0,gpt7) as ext2. We search boot directory
grub rescue> ls (hd0,gpt7)/boot
./ ../ ...... /grub ......
3. It is contains folder boot. Good! We set root and prefix for normal boot
grub rescue> set root=(hd0,gpt7)
grub rescue> set prefix=(hd0,gpt7)/boot/grub
grub rescue> insmod normal
grub rescue> normal
4. Finish your Windows installation or upgrade. You may need to repeat step no. 3, everytime Windows ask you to restart your computer.
5. Using step no. 3, we enter Debian OS to repair grub. We reinstall grub-efi-amd64, or run apt-get install without --reinstall to install grub-efi-amd64
apt-get install --reinstall grub-efi-amd64
6. Create directory /boot/efi
# mkdir /boot/efi
7. Search partition for EFI
# fdisk -l
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 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
Disklabel type: gpt
Disk identifier: 2248606F-393A-467A-9527-D0649049F9E3
Device         Start       End   Sectors   Size Type
/dev/sda1       2048    616447    614400   300M Windows recovery environment
/dev/sda2     616448    821247    204800   100M EFI System
/dev/sda3     821248   1083391    262144   128M Microsoft reserved
/dev/sda4    1083392 244840447 243757056 116.2G Microsoft basic data
/dev/sda5  245762048 567171071 321409024 153.3G Microsoft basic data
/dev/sda6  567171072 582795263  15624192   7.5G Linux swap
/dev/sda7  582795264 976771071 393975808 187.9G Microsoft basic data
8. We found EFI partition at /dev/sda2. Mount partition EFI into /boot/efi
# mount /dev/sda2 /boot/efi/
9. We install grub into EFI partition
# grub-install /dev/sda
Installing for x86_64-efi platform.
Installation finished. No error reported.
10. Done, you may restart your Debian.

Sunday, August 2, 2015

Android Development Tools: Which Packages to Install


As a minimum when setting up the Android SDK, you should download the latest tools and Android platform:
  1. Open the Tools directory and select:
    • Android SDK Tools
    • Android SDK Platform-tools
    • Android SDK Build-tools (highest version)
  2. Open the first Android X.X folder (the latest version) and select:
    • SDK Platform
    • A system image for the emulator, such as
      ARM EABI v7a System Image

The Android Support Library provides an extended set of APIs that are compatible with most versions of Android.
Open the Extras directory and select:
  • Android Support Repository
  • Android Support Library

To develop with Google APIs, you need the Google Play services package:
Open the Extras directory and select:
  • Google Repository
  • Google Play services
Note: Google Play services APIs are not available on all Android-powered devices, but are available on all devices with Google Play Store. To use these APIs in the Android emulator, you must also install the the Google APIs system image from the latest Android X.X directory in the SDK Manager.


Source: http://developer.android.com/sdk/installing/adding-packages.html