====== Debian "wheezy" on X200 ======
===== Requirements =====
* Debian 6.0 (squeeze) CD, burned from ISO image. You may use another methods.
* Access to Debian "wheezy" repository. Local repository is recommended.
* Basic GNU/Linux administration. ;-)
===== Installation =====
* Install Debian "squeeze" into your X200, follow the steps.
* Boot to your "squeeze", login as root.
* Edit /etc/apt/sources.list.# nano /etc/apt/sources.listComment "squeeze" repository, and add this line. The URL depends on your access to your repository, in my case it is local repo in wheezy directory inside /media/repo/. deb file:/media/repo/wheezy/ wheezy main
* Update your packages index.# apt-get update
* Upgrade installed packages.# apt-get upgrade
* Upgrade distribution release from "squeeze" to "wheezy".# apt-get dist-upgrade
===== Installed Programs =====
These programs are installed, including all programs required that stated in Configuration section.
* Systems: firmware-iwlwifi (non-free), powertop, rsync, synaptic.
* Desktop: GNOME3
* Office: LibreOffice, amora-daemon, pdftk.
* Graphics: Inkscape, The Gimp.
* Internet: Jitsi*, Mozilla Firefox*, Pidgin.
* Multimedia: GNOME MPlayer.
* From upstream project, not Debian official repository.
===== Configuration =====
==== Sudo ====
* Add your username to sudo group. # nano /etc/groupsudo:x:27:stwn
==== sysfs ====
* Install sysfsutils. # apt-get install sysfsutils
* Edit /etc/sysfs.conf. # nano /etc/sysfs.confdevices/platform/smapi/BAT0/start_charge_thresh = 40
devices/platform/smapi/BAT0/stop_charge_thresh = 50
devices/platform/thinkpad_acpi/bluetooth_enable = 0
devices/system/cpu/cpu0/cpufreq/scaling_governor = powersave
devices/system/cpu/cpu1/cpufreq/scaling_governor = powersave
class/backlight/acpi_video0/brightness = 5
class/scsi_host/host0/link_power_management_policy = min_power
class/scsi_host/host1/link_power_management_policy = min_power
module/snd_hda_intel/parameters/power_save_controller = Y
module/snd_hda_intel/parameters/power_save = 1
==== HDAPS ====
* Install hdapsd and tp-smapi-dkms# apt-get install hdapsd tp-smapi-dkms
* Edit /etc/modules, add tp_smapi.# echo "tp_smapi" >> /etc/modules
* Download [[http://gnome-hdaps-osd.sourceforge.net/|gnome-hdaps-osd archive]], extract to your desired directory location, install python-pyinotify, libaosd2, and test it.# tar zxvf gnome-hdaps-osd_v0.2.tar.gz
# cd gnome-hdaps-osd/
# nano README
# apt-get install python-pyinotify libaosd2
# ./gnome-hdaps-osd.py
==== GRUB ====
* Edit /etc/default/grub.# nano /etc/default/grubGRUB_TIMEOUT=0
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_DISABLE_RECOVERY="true"
* Update GRUB.# update-grub2
==== Power ====
* Edit /etc/default/grub.# nano /etc/default/grubGRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.i915_enable_rc6=1"
* Update GRUB.# update-grub2
* Reboot.
==== Plymouth ====
* Install plymouth.# apt-get install plymouth
* Add i915 module to /etc/initramfs-tools/modules/.# echo "i915" >> /etc/initramfs-tools/modules
* Set Plymouth default theme.# plymouth-set-default-theme spinfinity
* Update the initramfs image.# update-initramfs -u
==== SSH ====
* Install openssh-server.# apt-get install openssh-server
* Change the configuration to open SSH service to non-default port ;-) Use port above 1024.# nano /etc/ssh/sshd_configPort 22000
* Restart SSH service.# service ssh restart
===== Encrypted Partition =====
dm-crypt, cryptsetup, LUKS.
required package: cryptsetup
==== With LVM2 ====
* Backup your data, or else you will lose it.
* Check bad blocks with writing random patterns into partition /dev/sda5 and /dev/sda7. # badblocks -v -s -w -t random /dev/sda5
# badblocks -v -s -w -t random /dev/sda7
* Setup and initialize partition with LUKS. Supply this commands with your passphrase. # cryptsetup -v -y -s 256 luksFormat /dev/sda5
# cryptsetup -v -y -s 256 luksFormat /dev/sda7
* Open the LUKS format partition with your passphrase. # cyptsetup luksOpen /dev/sda5 yes0
# cyptsetup luksOpen /dev/sda7 yes1
* Create Physical Volume (PV) for LVM2. # pvcreate /dev/mapper/yes0
# pvcreate /dev/mapper/yes1
* Create Volume Group (VG) of LVM2 with "yes" name. # vgcreate yes /dev/mapper/yes0 /dev/mapper/yes1
* Check total Physical Extents (PE) of your VG. # vgdisplay | grep Total
Total PE 30000
* Create Logical Volume (LV). I use all PE in this case. # lvcreate -l30000 -n crypt /dev/mapper/yes
* Format the LV with ext4 or other type of filesystems. # mkfs.ext4 /dev/mapper/yes-crypt
* Edit /etc/crypttab. # nano /etc/crypttabyes0 /dev/sda5 none luks
yes1 /dev/sda7 none luks
* Edit /etc/fstab. # nano /etc/fstab/dev/mapper/yes-crypt /media/crypt ext4 relatime 0 2
* Reboot your machine and test it.
==== Without LVM ====
* Backup your data, use rsync.
* Check bad blocks with writing random patterns into partition /dev/sda6. # badblocks -v -s -w -t random /dev/sda6
* Setup and initialize partition with LUKS. Supply this commands with your passphrase. cryptsetup -v -y -s 256 luksFormat /dev/sda6
* Open the LUKS format partition with your passphrase. # cyptsetup luksOpen /dev/sda6 yes2
* Format ext4 or other type of filesystems. # mkfs.ext4 /dev/mapper/yes2
* Cari tahu UUID partisi jika diperlukan. # blkid /dev/sda6
* Edit /etc/crypttab.# nano /etc/crypttabyes2 /dev/sda6 none luksoryes2 UUID=AAAABBBBCCCC none luks
* Check UUID of that partition. # blkid /dev/mapper/yes2
* Edit /etc/fstab. # nano /etc/fstab/dev/mapper/yes2 /media/crypt2 ext4 relatime 0 2orUUID=XXXXYYYYZZZZ /media/crypt2 ext4 relatime 0 2Change the XXXXYYYYZZZZ with the output of blkid command before this step.
==== Backup LUKS Header ====
* Run this command for doing LUKS header backup. # cryptsetup luksHeaderBackup --header-backup-file mymachine.sdaX /dev/sdaX
* Run this command for doing LUKS header restore. # cryptsetup luksHeaderRestore --header-backup-file mymachine.sdaX /dev/sdaX