Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
transfer perfect install from old HD to new HD?
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
kraylus
l33t
l33t


Joined: 07 Jun 2002
Posts: 648
Location: ft.worth.tx

PostPosted: Sun Oct 27, 2002 9:32 am    Post subject: transfer perfect install from old HD to new HD? Reply with quote

i hadda really nice gentoo install working on my old HD and i bought an 80gb HD this weekend. i reinstalled on the 80gb and this install is b0rked from one end to the other. i did everything exactly the same too.

so i wanna simply take what i have on the other HD and put it on the new one. can this be done easily? will the new HD be able to boot it? what needs to be done?

thanks!
_________________
I used gentoo BEFORE it was cool.
Back to top
View user's profile Send private message
Rroet
Apprentice
Apprentice


Joined: 27 May 2002
Posts: 176
Location: The Hague, The Netherlands

PostPosted: Sun Oct 27, 2002 10:43 am    Post subject: Reply with quote

it should be fairly easy.

1. boot your system on the old harddrive
2. shutdown all services you do NOT need.
3. do the following command:
Code:
dd if=/dev/oldharddrive of=/dev/newharddrive bs=10240


afterthat check with Fdisk if it took along the "active Partition" setting also so it's able to boot. If not make the harddrive active.

Now you should have a kewl new harddrive with room to spare <you do need to allocate that free space into a new partition>
Back to top
View user's profile Send private message
px
Guru
Guru


Joined: 26 Sep 2002
Posts: 497
Location: Metz, France

PostPosted: Sun Oct 27, 2002 11:30 am    Post subject: Reply with quote

if you have to copy the content of a partition on another one, you can do:
1. place yourself into the root of the source partition
2. find . –xdev | cpio –pm /path/to/dest_partition
_________________
Nous autres, mordus d'informatique, préférons par-dessus tout passer notre temps à bidouiller nos ordinateurs, plutôt que les utiliser pour faire quelque chose de productif. [Dave Barry]
Back to top
View user's profile Send private message
axl
Veteran
Veteran


Joined: 11 Oct 2002
Posts: 1144
Location: Romania

PostPosted: Sun Oct 27, 2002 11:51 am    Post subject: no dd from one disk to another. bad dd :) Reply with quote

Rroet wrote:
it should be fairly easy.
Code:
dd if=/dev/oldharddrive of=/dev/newharddrive bs=10240



You don't want to do that. the two disks have diferent geometry. diferent partitions. what you want to do is this.

first boot as you allways boot or modify grub ( o option ) to boot with init=/bin/bash. the line should be bzImage root=/dev/hdxX init=/bin/bash. that should give you the oportunity to work with a clean clean system. first mount the root device in rw.

Code:
mount -o remount,rw /


you should then start devfsd.

Code:
/sbin/devfsd /dev


First partition the new disk accourding to your needs. Now you don't need proc or dev/pts or others to copy from one disk to the next so don't mount them. all you need is the original fs and the target fs to be mounted. so here is the layout you need.

Code:
mkdir /target
cd /
cp -rv `ls / | grep -v proc | grep -v target | grep -v dev` /target

this will probably take some time so go get some coffee or something.
after is done first make the missing directoryes in the target disk.
Code:
mkdir /target/proc
mkdir /target/dev

now that the main thing is over you can umount /target.
if you installed gentoo acording to the specifications ( i didn't ) and made a special partition for /boot you should to the same thing.
Code:
mount /boot
mount /dev/hd{your_newdisk_boot_fs /target
cp -rv /boot /target
umount /boot
umount /target


well that is about all there is unless I forgot something. so clean up, reboot change the disks and see your new gentoo working.
Code:
mount /proc
skill -9 `ps axw | grep devfsd | grep -v grep | gawk '{print $1;}'`
umount /proc
mount -o remount,ro /
reboot ( as i remember this doesn't work so do the magic key combination ... the windows key combination :) ctrl+alt+del


vrmmm here is your new gentoo. good luck
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