19 May 2010

Clone hard disk

With dd_rescue, this task becomes more easy.
1. boot into a Linux LiveCD, use fdisk -l to identify your hard disks, if /dev/sda is the old one, and /dev/sdb is the new one, go to next step
2. install sys-fs/ddrescue, and clone the disk
ddrescue -v /dev/sda /dev/sdb
this task will complete after 2 hours or less if the old one is 80GB hard disk (in my case)

3. almost finish, remove the old one, boot into the new one, your os should be ok.

4. another task: if new hard drive is bigger than the old one, free space will not be used, you will see it as free space, create new partition and mount it, or resize current partitions.

5. if you're using LVM2 for your system, read this

11 May 2010


Lâu lắm rồi không cafe về đêm (khoảng giữa 9h đêm cho đến khuya), cũng rất hiếm khi ra ngoài quá 11h, đi chả để làm gì, mà về cũng chả để làm gì, ngoan lạ.