View previous topic :: View next topic |
Author |
Message |
kraylus l33t
Joined: 07 Jun 2002 Posts: 648 Location: ft.worth.tx
|
Posted: Sun Oct 27, 2002 9:32 am Post subject: transfer perfect install from old HD to new HD? |
|
|
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 |
|
|
Rroet Apprentice
Joined: 27 May 2002 Posts: 176 Location: The Hague, The Netherlands
|
Posted: Sun Oct 27, 2002 10:43 am Post subject: |
|
|
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 |
|
|
px Guru
Joined: 26 Sep 2002 Posts: 497 Location: Metz, France
|
Posted: Sun Oct 27, 2002 11:30 am Post subject: |
|
|
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 |
|
|
axl Veteran
Joined: 11 Oct 2002 Posts: 1144 Location: Romania
|
Posted: Sun Oct 27, 2002 11:51 am Post subject: no dd from one disk to another. bad dd :) |
|
|
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.
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 |
|
|
|