View Single Post
Old 07-07-2008, 08:08 PM   #7 (permalink)
lensman3
Registered User
 
Join Date: Oct 2007
Location: Littleton, Colorado USA
Posts: 436
OS: xp 64 sp2 Fedora Core 8 (vmware xp core 8 x32) Minix


Re: Converting HDD

For a really obscure copy of directories use the following:

#to copy an entire directory tree.

1) mkdir <TARGET DIR>
2) cd <FROM DIR>
3) tar cf - . | ( cd <TARGET DIR> ; tar xBf - )

This series of command was used before the cp command had "-R" option that would recurse down directory trees. The 3rd line pipes one tar command into another tar command after changing into the target directory. The tar command preserves file dates.

I would suggest if you use the cp command to use the -Rp to recurse directories AND preserve time stamps on the files.

None of these commands will make the new disk bootable. You will have to re-register the GRUB with the kernel image and the boot file system.

I think your 80 Gbyte disk has two partitions on it. One is /boot and the other is / (root). If you set up the new disk with /boot EXACTLY the same as the old one, then run the "dd" command on /boot, I think you will preserve the booting ability. Use "dd in=/dev/sda1 of=/dev/sdb1. Note: that you are copying RAW disk sectors and not file systems. "dd" will read raw disk sectors and write them to the output. Once the boot has been copied, then the root file system can be copied with "cp" or tar or backup and restore. GRUB has to be able to find the root file system when it boot the kernel. If it doesn't find the root file system the kernel panics and the boot will hang. You can edit all the parameters when the initial GRUB screen is seen.

I hope this helps a little.
lensman3 is offline   Reply With Quote