LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Copying from one hard drive to another (https://www.linuxquestions.org/questions/linux-hardware-18/copying-from-one-hard-drive-to-another-400775/)

Cirdan 01-07-2006 11:55 PM

Copying from one hard drive to another
 
As some of you may know, I have two hard drives. One of them I have Windows, other I have Linux. Because Windows is Windows, its going bad, and it runs chckdisk at bootup. My Dad said we probably need to whipe it out/reformat it. I fell I am ready to make the switch over to Linux full time. So since on my second hard drive I have built a LFS system, I really don't want to re-build it. Is it possible to just copy everything over? And what do I need to with the boot loader(Grub)?

carl0ski 01-08-2006 03:33 AM

Quote:

Originally Posted by Cirdan
As some of you may know, I have two hard drives. One of them I have Windows, other I have Linux. Because Windows is Windows, its going bad, and it runs chckdisk at bootup. My Dad said we probably need to whipe it out/reformat it. I fell I am ready to make the switch over to Linux full time. So since on my second hard drive I have built a LFS system, I really don't want to re-build it. Is it possible to just copy everything over? And what do I need to with the boot loader(Grub)?

i cant really say about grub but lilo will work.

copy all /
to you new hdd /mnt/new

LNS you should know how to change root and env?
cause i dont remember.
but once /mnt/new is your root you can edit
vi /etc/lilo.conf
edit it to suit where the hdd is (unfortunately different personally i hotswapped My ide drives at the point)

change hda to hdb or whatever

save and run
/sbin/lilo
it write a boot record to the MBR
hopefully:study:

silmaril8n 01-08-2006 03:42 AM

Is chroot the command needed?

carl0ski 01-08-2006 06:00 AM

yep chroot is it

it escaped my mind for some reason.

another risky method is hot swap hdds after copying and run lilo.

change to
init 1
remove power cable from each drive (Very important as if you unplug IDE first hdd gets wiped.) once power is off remove the ide cables.

the one you freshly copied stuff to make sure is master like the original and plug in its place .

then run lilo.


All times are GMT -5. The time now is 07:14 AM.