Hard Drive Swap Challenge
I have an old IBM Thinkpad that I use extensively but it only has a 6GB harddrive which is always full. I've decided to order a 20GB hard drive(the largest out there) before all the parts stop being supported. I do not want to reinstall things though because the current setup is years and years of software that I've painstakingly compiled and installed and gotten working together.
What I'm thinking about doing is using one of the floppy-disk sized RAMdisk linuxes to boot up with the old drive, then either find or write a small program to do a low level byte by byte copy of the hard drive to another computer. (I imagine worst case, is that I write a TCP program to open a connection and just copy bytes from stdin across it, or read them and dump them to stdout. Then I can use dd and pipe the output to this program) Then I'll shut it down, switch to the 20GB hard drive(they're all internal) again boot up with the RAM disk, partition the 20GB hard drive and then copy the 6GB back onto this one.
Now if both hard drives were the same size, this wouldn't be difficult. But they're not obviously. I am not familar with exactly what sort of stuff is at the low level of the file system. I was thinking that the old drive basically is partitioned very poorly with a var and a / and another spare partition. Conceivably if I just partitioned the root directory and the var on the 20GB to be the same size, and then later renamed the /usr and /home parititions on the root and then partitioned and mounted /usr and /home directories on the 20GB, then I could just copy the files over and no one would be the wiser. The important thing is that the first 6GB of the 20GB hard drive would basically be identical to the old drive.
Any suggestions? Has anyone done this? Which of the small linuxes should I use? Is this a bad idea? Any things I should watch out for? You have until I receive the hard drive in the mail. Answers should be in essay form.
noooooo. dont use dd (or any low-level byte by byte program). Thats a Bad Idea, especially when the drives are different sizes. Your drive will wind up corrupt. Use cpio or similar program, has options to preserve the permissions, etc. Then the only thing missing is your bootloader, which is easy.
|All times are GMT -5. The time now is 09:16 PM.|