[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Adding a new HDD - how do I move /var/lib/mysql ?



On 1/14/07, Abu Zaher <zaher14@gmail.com> wrote:
My question is slightly related to this post, so I'm posting it here.

I'm currently running my Sid on a 40GB hdd which is running out of life, In a few days I'll buy a new 80GB. Now what is the best way 2 dump my whole / to my hdd so that I can boot and do all my stuff from that hdd? I mean the above discussion is for /var/lib/mysql, will the same work for / ?

Bought a new hdd yesterday and solved the problem in my way.

First i booted with ubuntu live cd. Partitioned the new hard drive with some ext3 filesystem. Then mounted them:

#mount -t ext3 /dev/hda5 /mnt/new_debian
#mount -t ext3 /dev/hdc6 /mnt/old_debian

#cp -av /mnt/old_debian/. /mnt/new_debian/.

then mounted proc
#mount -t proc /proc /mnt/new_debian/proc

#chroot /mnt/new_debian /bin/bash

editted fstab and mtab to reflect my new hdd setting

#vim /etc/fstab
#vim /etc/mtab

Then run grub

#grub
> root (hd0,4)
> setup (hd0)
> quit

#grub-install /dev/hda

My new system is working as good as my old one now.


--
Abu Zaher Md. Faridee
---
Time heals every wound, but time itself is a wound that never heals.
Reply to: