Monday, November 24, 2014

How To Backup BootSector/MBR for Windows Boot

Backup the BootSector/MBR

Some guides show only taking the first 512 bytes (MBR), others show the
first 63 blocks (MBR + Bootloader).

# dd if=/dev/sda of=/mnt/storage/sda.mbr bs=512 count=1
# dd if=/dev/sda of=/mnt/storage/sda.vbr bs=512 count=63

Friday, November 21, 2014

how to delete samba session on windows

control keymgr.dll

พอลบ user แล้วก็ใช้คำสั่ง net use ดูว่าเราค้างอยู่ในแชร์ไหนของ samba ก็ delete ออก
อย่างเมื่องเช้าค้างอยู่ใน folder share ก็ใช้ net use \\samba\share /delete

Sunday, November 16, 2014

how to permanently set max_user_watches of inotify in debian

add the following lines:

> fs.inotify.max_user_watches=200000

into this file: /etc/sysctl.d/local.conf

Saturday, November 15, 2014

how to get serial number of harddisk on dell server

Dell server uses PERC controller so...

smartctl -a -d megaraid,$a /dev/sda

$a is 0, 1, 2 and 3 for disk #0, #1, #2 and #3, expectively

Sunday, November 9, 2014


useful rsync command line

rsync -avz --delete --append src/ dst

Sunday, October 26, 2014

Thursday, October 23, 2014

debian missing firmware issue when installation

You have to put all directories

e.g. RTL8192E, RTL8192SU, rtl_nic and rtlwifi

into a vfat formatted usb drive. Then upon installation of debian,
it will ask you to insert it. You have to take off the usb drive
with debian installation software. Insert the usb drive with this firmware.
Next. Next. Then take off the usb drive with this firmware. Insert the
usb drive with debian installation software.

*** important ***

Then, you will encounter this error:

There was a problem reading data from the CD-ROM. Please make sure
it is in the drive. If retrying does not work., you should check
the integrity of your CD-ROM.

Failed to copy file from CD-ROM. Retry?

You have to ctrl+alt+f2 (switch to another console).

Then, mount /dev/sdc1 /cdrom, assuming the installation usb drive is

Switch back to the previous console. Go.

Friday, October 10, 2014


transmission-daemon -g /home/debian/.config/transmission-daemon transmission-remote -l
transmission-remote -t all -S # stop