LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-07-2001, 10:26 AM   #1
zhenwu
Member
 
Registered: Jul 2001
Location: Taiwan (ex-Victoria BC)
Distribution: RH 9.0
Posts: 126

Rep: Reputation: 15
Ghosting Linux to new HD?


Hello all,

I'm about to buy a new HD, cuz my poor 3 gigger is plum out of room. What I'd like to know is, is there a way 'ghost' the contents of the old drive to the new drive so that I don't have to re-install from scratch? Also, if this is possible, what is the best way to 'prepare' the new drive for ghosting? (hmmm...maybe this should be in the 'newbie' section hehehe)

Or maybe if I do re-install can I move the directories over that contain (at least!) my X settings? I've worked very hard to set this system up to my liking and don't relish having to start from the beginning again.

Thanks in advance.

Last edited by zhenwu; 11-07-2001 at 10:31 AM.
 
Old 11-07-2001, 12:43 PM   #2
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 65
dd

I haven't done this. I've only read about it, but I'm certain it will work, although I might have a detail wrong:

Say your old 3 Gig is /dev/hda

and say your new drive is /dev/hdb

Partition /dev/hdb for linux native using diskdruid, cfdisk, fdisk... whichever. Also, give it some swap space on say, /dev/hdb4. Also, if /dev/hda has multiple partitions, you might want to re-create those partitions (don't worry about matching the sizes, there's no need as long as the one on /dev/hdb is big enough).

Then: dd if=/dev/hda1 of=/dev/hdb1

This is going to copy all of the data straight from the devices, byte for byte front to back. This may take a while. Heck, /dev/hdb1 doesn't even have to be mounted. You'll have to do this more than once if you have more than one linux native partition on /dev/hda.

Then swap the devices, make sure the jumpers are right, and reboot the machine.

Now, here's what I'm not sure about... I don't know if this is going to copy the MBR too, and therefore: LILO. My guess is that it won't since the MBR lies on the very front of the drive, which is technically just before /dev/hda1. So, keep a boot disk handy. Then once you're in you just have to re-run lilo.

If anyone notices anything I've gotten wrong, please comment.

Also, to be re-assuring, if this doesn't work it's just a matter of re-partition, reformat, re-try.

Good luck,


Finegan

Last edited by finegan; 11-07-2001 at 12:46 PM.
 
Old 11-07-2001, 02:03 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594
I tend to do this a lot :-]
Get partimage. Load the partimage 2 floppy system (boot/root) if you haven't got a way to make partimage load from another distro or disk. Make backup images of partitions (can be bzipped, split so it fit's on cdr's, etc etc) to a storage partition. Fdisk new disk so the partitions are the same in size, or larger. Smaller won't work. Boot, load partimage and "restore" the partitions. Boot the restored OS by means of rescue floppy/cdr/whatever, install lilo again, and off you go.

*I know, you could do the same with either cp or dd, but partimage makes an image of the used bytes on a disk, while cp only copies contents, and dd simply is lethal in the wrong hands. Next to that Saving 1GB takes me about 30mins, and ends up as an image less than 650MB (bzipped), restoring takes about 10mins...
 
Old 11-08-2001, 10:36 AM   #4
zhenwu
Member
 
Registered: Jul 2001
Location: Taiwan (ex-Victoria BC)
Distribution: RH 9.0
Posts: 126

Original Poster
Rep: Reputation: 15
So, just so I understand the process correctly:

1. buy new HD
2. format new HD, and create a partition to store the backup images
3. create images of old HD using partimage and put them in aforementioned partition.
4. unpack image into the main partition of new HD
5. give old HD to wife as a doorstop.

is that correct?

Thanks again.
 
  


Reply


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
Ghosting a drive in Linux lm317t Linux - General 10 07-28-2005 12:16 PM
Ghosting Linux PapaNoHair Linux - General 3 03-23-2004 06:42 PM
ghosting a linux HDD mehesque Linux - General 2 02-09-2004 06:23 PM
dd ghosting linux drive wright_pm Linux - General 3 04-27-2003 11:38 PM
ghosting a linux drive ?? g00fy_m Linux - Software 3 01-30-2003 11:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:37 AM.

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