Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?


  Search this Thread
Old 10-17-2004, 10:11 AM   #1
Registered: May 2004
Distribution: Gentoo, Debian, OpenBSD, NetBSD
Posts: 157

Rep: Reputation: 16
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.

Last edited by Peterius; 10-17-2004 at 10:13 AM.
Old 10-17-2004, 10:42 AM   #2
Registered: Sep 2004
Distribution: Slackware 10, Gentoo
Posts: 292

Rep: Reputation: 30
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing grub to external USB hard drive for later use as internal hard drive dhave Linux From Scratch 2 12-10-2005 08:48 AM
Can I run the swap partition on th second hard drive? dwhswebhosting Linux - Software 2 06-03-2004 05:33 PM
DSL hard drive install and swap Sparkfist DamnSmallLinux 2 05-04-2004 10:38 PM
new hard drive, grub and swap? freychef Linux - Hardware 3 01-26-2004 08:55 AM
Can I do this? Hard drive swap. bulliver Linux - Hardware 7 12-26-2002 01:54 PM > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 01:45 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration