2015年12月16日 星期三

Delete/Drop Linux hibernate

Story:
   One day, I was stupid to write a script to hibernate the system in a LOOP! Thus, the system always goes to sleep after I boot it... Hence, I need to delete/drop the hibernate file for my system to boot normally.  If you also has this requirement, you can follow the following step to make your system back to normal.

1) Boot into the other Ubuntu OS.  You can boot into Live USB/CD.

2) Open gparted application and ... format the swap partition.



3) After you did 2), check the UUID of swap in /etc/fstab.  It should match the one below. My swap partition is sda3.

$ ll /dev/disk/by-uuid
lrwxrwxrwx 1 root root 10 12月 18 08:01 6fc1830e-dc28-4ac3-8280-abe589caaf17 -> ../../sdb1
lrwxrwxrwx 1 root root 10 12月 18 08:01 7e2c74db-b055-478b-a4f5-efe6c7da8cd1 -> ../../sda1
lrwxrwxrwx 1 root root 10 12月 18 08:01 bd0a28dd-e394-42df-9f20-d3173c2e82c3 -> ../../sdb2
lrwxrwxrwx 1 root root 10 12月 18 08:01 eaee4cc9-cfdc-4d3c-a445-53ea1d2bf025 -> ../../sda2
lrwxrwxrwx 1 root root 10 12月 18 08:01 ee522705-2e15-47a5-a938-a737764a917b -> ../../sda3

3) Reboot.  That's all.

2015年12月15日 星期二

tmux breaks vim's color

If you use 256 color in your vim editor, and it is broken when you enter tmux. My solution is to force use 'tmux -2' when I enter tmux. You can also add it in ~/.bashrc.

alias tmux='tmux -2'