Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Upgrading hard drive - advice welcome
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
nadamsieee
Guru
Guru


Joined: 30 May 2003
Posts: 340
Location: Atlanta, GA, USA

PostPosted: Sat Mar 13, 2004 1:31 am    Post subject: Upgrading hard drive - advice welcome Reply with quote

Hello all,

Recently, a friend of mine found errors on his hard drive after noticing some strange behaviour from his Gentoo box. After using his LiveCD to fsck the entire drive, he decided that it would be best to just buy a new hard drive and move everything over.

So tomorrow I'm going to help him do the task of transferring everything over. The hope is that we will be able to copy the entire system over, make the new hard drive bootable, and watch everything just magically work.

Of course, reality may be slightly different; so any advice, tips, tricks, command specifics, etc would be greatly appreciated!

Thanks,
_________________
nadams (at) ieee (dot) org
Back to top
View user's profile Send private message
gareth
Apprentice
Apprentice


Joined: 15 Nov 2003
Posts: 234
Location: UK

PostPosted: Sat Mar 13, 2004 1:43 am    Post subject: Reply with quote

Sounds good.
As long as you keep the same partition setup as on the old drive, then the only thing that you'll need to do afterwards is run 'lilo' with the '-r' option to chroot onto wherever you've mounted the new drive. See the man page for details.
I recently upgraded my laptop's disk, but that involved copying from the old disk onto a Samba share, then back again onto the new disk, but the principle is the same.
Also remember to copy your boot partition aswell if you've created a seperate one as per the installation instructions (and mount it before running lilo).
Good Luck :wink:
Back to top
View user's profile Send private message
olias2
Apprentice
Apprentice


Joined: 23 Aug 2003
Posts: 234
Location: CANADA

PostPosted: Sat Mar 13, 2004 3:31 am    Post subject: Reply with quote

I used the 'cp -ax' command and it worked. Here's what I did...
    1. Installed the new harddrive as hdd.
    2. Booted with the Live CD.
    3. Made new partitions and formated them.
    4. mkdir for /mnt/new and /mnt/old
    5. Mount old and new root partitions to respective mount points.
    6. cp -ax /mnt/old/your_dir/* /mnt/new
    7. Umount both partitions.
    8. Mount old and new boot partitions to respective mount points.
    9. cp -ax /mnt/old/* /mnt/new
    ----- at this point I unmounted stuff and pulled out the old drive as well as made the new drive hda -----
    10. Rebooted from the Live CD and ran grub to install on MBR of new drive.
    11. Reboot
I didn't bother copping the /boot, /dev, /home, /mnt, /proc and /sys directories from the root partition but rather just mkdir for those. This is because my /boot and /home are on different partitions. Also, mkdir your mount points in /mnt but beware that if you copy /mnt that you will be also copping all that's mounted there.

Good luck. It's not too differcult.

Olias
_________________
A wise man realizes that he too is a fool and then humbles himself to learn that which is greater than he.
Back to top
View user's profile Send private message
nadamsieee
Guru
Guru


Joined: 30 May 2003
Posts: 340
Location: Atlanta, GA, USA

PostPosted: Sun Mar 14, 2004 2:03 pm    Post subject: Reply with quote

His system is up and running again. We even wiped the old drive and set it up as storage for 'unimportant' stuff. The only snag was when we made all of the new partitions (except the new boot) rieserfs instead of ext2. We forgot to update /etc/fstab before the first try at booting with the new drive.

Everything works now though, thanks again for the tips!
_________________
nadams (at) ieee (dot) org
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum