Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved]Move existing installation on to a new harddrive
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
ALF__
Tux's lil' helper
Tux's lil' helper


Joined: 30 Nov 2003
Posts: 143

PostPosted: Sat Oct 19, 2013 11:54 am    Post subject: [Solved]Move existing installation on to a new harddrive Reply with quote

Hello everyone!

I have outgrown my current harddrive, and want to move my gentoo installation on to a new drive.

It will be on the same computer.


Have i understood it correctly if i boot with the live cd, make all my partitions right, just use cp to copy everything over to the new partition?

Then chroot over from the live cd to the new partition, and run grub from there?


Any pointers appreciated :)


Last edited by ALF__ on Mon Oct 21, 2013 4:03 pm; edited 1 time in total
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Sat Oct 19, 2013 12:19 pm    Post subject: Reply with quote

More or less - be careful with the cp flags. I'd be inclined to use tar instead, but cp should worlk.
If you have a separate boot partition then you can just add the new gentoo to the grub menu
and delete the old one. Otherwise, as you say, you'll have to re-install grub.

(It might be worth adding the new gentoo to the old gentoo's grub menu and doing a test
boot before you update grub and delete the old gentoo.)


Will
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13830

PostPosted: Sat Oct 19, 2013 3:11 pm    Post subject: Reply with quote

I concur with regard to tar. Also, remember to copy each filesystem separately. For example, you want to copy the nodes in the dev directory of your root filesystem into the corresponding new root filesystem, so that you have them available even before devtmpfs is mounted there during boot.

For tar, you can use: tar -C /mnt/oldgentoo/fs -c -f - . | tar -C /mnt/newgentoo/fs -x -f - for each appropriate fs.
Back to top
View user's profile Send private message
ALF__
Tux's lil' helper
Tux's lil' helper


Joined: 30 Nov 2003
Posts: 143

PostPosted: Mon Oct 21, 2013 4:02 pm    Post subject: Reply with quote

Hello guys!

Thank you very much for your answer.


I managed to do it, and it was pretty straight forward.

Steps (just incase someone else finds this thread:

1. Booted with liveUSB.

2. Made up my partition setup on the new drive.

3. used tar to make a big ball of everything on the old disk.

4. Rolled out the data on the new disk, and also my boot partition.

5. chrooted over to the new disk, installed grub, and everything worked out great!


//Daniel
Back to top
View user's profile Send private message
_______0
Guru
Guru


Joined: 15 Oct 2012
Posts: 521

PostPosted: Sat Nov 02, 2013 8:45 pm    Post subject: Reply with quote

dd if=/dev/sda bs=1M iflag=direct | dd of=/dev/sdb bs=1M oflag=direct

for progress on a separate terminal.

watch -n 2 killall -USR1 dd
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