This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
doc:x200 [2013/04/25 00:00] stwn [Configuration] +sudo |
doc:x200 [2013/05/28 09:17] (current) stwn +backup luks header |
||
|---|---|---|---|
| Line 11: | Line 11: | ||
| * Edit /etc/apt/sources.list.<code># nano /etc/apt/sources.list</code>Comment "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/. <code>deb file:/media/repo/wheezy/ wheezy main</code> | * Edit /etc/apt/sources.list.<code># nano /etc/apt/sources.list</code>Comment "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/. <code>deb file:/media/repo/wheezy/ wheezy main</code> | ||
| * Update your packages index.<code># apt-get update</code> | * Update your packages index.<code># apt-get update</code> | ||
| + | * Upgrade installed packages.<code># apt-get upgrade</code> | ||
| + | * Upgrade distribution release from "squeeze" to "wheezy".<code># apt-get dist-upgrade</code> | ||
| ===== Installed Programs ===== | ===== Installed Programs ===== | ||
| - | hdapsd, openssh-server, rsync, synaptic. | + | These programs are installed, including all programs required that stated in Configuration section. |
| - | non-free: firmware-iwlwifi. | + | * 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 ===== | ===== Configuration ===== | ||
| ==== Sudo ==== | ==== Sudo ==== | ||
| * Add your username to sudo group. <code># nano /etc/group</code><code>sudo:x:27:stwn</code> | * Add your username to sudo group. <code># nano /etc/group</code><code>sudo:x:27:stwn</code> | ||
| + | ==== sysfs ==== | ||
| + | |||
| + | * Install sysfsutils. <code># apt-get install sysfsutils</code> | ||
| + | * Edit /etc/sysfs.conf. <code># nano /etc/sysfs.conf</code><code>devices/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</code> | ||
| ==== HDAPS ==== | ==== HDAPS ==== | ||
| * Install hdapsd and tp-smapi-dkms<code># apt-get install hdapsd tp-smapi-dkms</code> | * Install hdapsd and tp-smapi-dkms<code># apt-get install hdapsd tp-smapi-dkms</code> | ||
| * Edit /etc/modules, add tp_smapi.<code># echo "tp_smapi" >> /etc/modules</code> | * Edit /etc/modules, add tp_smapi.<code># echo "tp_smapi" >> /etc/modules</code> | ||
| + | * Download [[http://gnome-hdaps-osd.sourceforge.net/|gnome-hdaps-osd archive]], extract to your desired directory location, install python-pyinotify, libaosd2, and test it.<code># 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</code> | ||
| + | |||
| + | ==== GRUB ==== | ||
| + | * Edit /etc/default/grub.<code># nano /etc/default/grub</code><code>GRUB_TIMEOUT=0 | ||
| + | GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" | ||
| + | GRUB_DISABLE_RECOVERY="true"</code> | ||
| + | * Update GRUB.<code># update-grub2</code> | ||
| + | |||
| + | ==== Power ==== | ||
| + | * Edit /etc/default/grub.<code># nano /etc/default/grub</code><code>GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.i915_enable_rc6=1"</code> | ||
| + | * Update GRUB.<code># update-grub2</code> | ||
| + | * Reboot. | ||
| + | |||
| + | ==== Plymouth ==== | ||
| + | * Install plymouth.<code># apt-get install plymouth</code> | ||
| + | * Add i915 module to /etc/initramfs-tools/modules/.<code># echo "i915" >> /etc/initramfs-tools/modules</code> | ||
| + | * Set Plymouth default theme.<code># plymouth-set-default-theme spinfinity</code> | ||
| + | * Update the initramfs image.<code># update-initramfs -u</code> | ||
| + | |||
| ==== SSH ==== | ==== SSH ==== | ||
| * Install openssh-server.<code># apt-get install openssh-server</code> | * Install openssh-server.<code># apt-get install openssh-server</code> | ||
| * Change the configuration to open SSH service to non-default port ;-) Use port above 1024.<code># nano /etc/ssh/sshd_config</code><code>Port 22000</code> | * Change the configuration to open SSH service to non-default port ;-) Use port above 1024.<code># nano /etc/ssh/sshd_config</code><code>Port 22000</code> | ||
| * Restart SSH service.<code># service ssh restart</code> | * Restart SSH service.<code># service ssh restart</code> | ||
| + | |||
| + | ===== 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. <code># badblocks -v -s -w -t random /dev/sda5 | ||
| + | # badblocks -v -s -w -t random /dev/sda7</code> | ||
| + | * Setup and initialize partition with LUKS. Supply this commands with your passphrase. <code># cryptsetup -v -y -s 256 luksFormat /dev/sda5 | ||
| + | # cryptsetup -v -y -s 256 luksFormat /dev/sda7</code> | ||
| + | * Open the LUKS format partition with your passphrase. <code># cyptsetup luksOpen /dev/sda5 yes0 | ||
| + | # cyptsetup luksOpen /dev/sda7 yes1</code> | ||
| + | * Create Physical Volume (PV) for LVM2. <code># pvcreate /dev/mapper/yes0 | ||
| + | # pvcreate /dev/mapper/yes1</code> | ||
| + | * Create Volume Group (VG) of LVM2 with "yes" name. <code># vgcreate yes /dev/mapper/yes0 /dev/mapper/yes1</code> | ||
| + | * Check total Physical Extents (PE) of your VG. <code># vgdisplay | grep Total | ||
| + | Total PE 30000</code> | ||
| + | * Create Logical Volume (LV). I use all PE in this case. <code># lvcreate -l30000 -n crypt /dev/mapper/yes</code> | ||
| + | * Format the LV with ext4 or other type of filesystems. <code># mkfs.ext4 /dev/mapper/yes-crypt</code> | ||
| + | * Edit /etc/crypttab. <code># nano /etc/crypttab</code><code>yes0 /dev/sda5 none luks | ||
| + | yes1 /dev/sda7 none luks</code> | ||
| + | * Edit /etc/fstab. <code># nano /etc/fstab</code><code>/dev/mapper/yes-crypt /media/crypt ext4 relatime 0 2</code> | ||
| + | * Reboot your machine and test it. | ||
| + | |||
| + | ==== Without LVM ==== | ||
| + | * Backup your data, use rsync. | ||
| + | * Check bad blocks with writing random patterns into partition /dev/sda6. <code># badblocks -v -s -w -t random /dev/sda6</code> | ||
| + | * Setup and initialize partition with LUKS. Supply this commands with your passphrase. <code>cryptsetup -v -y -s 256 luksFormat /dev/sda6</code> | ||
| + | * Open the LUKS format partition with your passphrase. <code># cyptsetup luksOpen /dev/sda6 yes2</code> | ||
| + | * Format ext4 or other type of filesystems. <code># mkfs.ext4 /dev/mapper/yes2</code> | ||
| + | * Cari tahu UUID partisi jika diperlukan. <code># blkid /dev/sda6</code> | ||
| + | * Edit /etc/crypttab.<code># nano /etc/crypttab</code><code>yes2 /dev/sda6 none luks</code>or<code>yes2 UUID=AAAABBBBCCCC none luks</code> | ||
| + | * Check UUID of that partition. <code># blkid /dev/mapper/yes2</code> | ||
| + | * Edit /etc/fstab. <code># nano /etc/fstab</code><code>/dev/mapper/yes2 /media/crypt2 ext4 relatime 0 2</code>or<code>UUID=XXXXYYYYZZZZ /media/crypt2 ext4 relatime 0 2</code>Change the XXXXYYYYZZZZ with the output of blkid command before this step. | ||
| + | |||
| + | ==== Backup LUKS Header ==== | ||
| + | |||
| + | * Run this command for doing LUKS header backup. <code># cryptsetup luksHeaderBackup --header-backup-file mymachine.sdaX /dev/sdaX</code> | ||
| + | * Run this command for doing LUKS header restore. <code># cryptsetup luksHeaderRestore --header-backup-file mymachine.sdaX /dev/sdaX</code> | ||
| + | |||