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 04-06-2007, 12:56 AM   #1
greenberet
Member
 
Registered: Jun 2006
Posts: 50

Rep: Reputation: 15
Partition cloning using dd


Hi,
I have Suse 10.0 on my hard disk. I managed to mess up my entire partition table and therefore lost windows server 2003(which i unfortunately need for some college project.) When i try to install Windows, after install it gives me some error like "Missing Operating System." So i guessed its some partition problem.
Well, so i decided to save my current Linux Partition into an image, remove all partitions, install windows, and then restore Linux, using that image.
I have two hard disks, hda and hdd. I would like to save an image of hda3 in hdd1/suseimage.img.
I roughly know the method, but could you please tell me in short how to go about it. I have data in hdd1 and dont want to lose that. Also, when restoring should the partition sizes exactly match. Please help.
 
Old 04-06-2007, 05:48 AM   #2
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
You should have a read at Awesome's dd thread:

http://www.linuxquestions.org/questi...d.php?t=362506

Look for this command below and read down a bit, you may even want to compress it with gzip or bzip, in this command below you would change sdb2 in the "if" part to hda3, for the "of" section you would do something like this: 'of=/dev/hdd1/suse.img', BUT!, if hdd1 is a visible drive in Suse and has a mount point in /media or /mnt, you would have to change the "of" part to use the directory. For instance, if the drive is accessible from /mnt/data, your "of" section should be 'of=/mnt/data/suse.img
Code:
dd if=/dev/sdb2 of=/home/sam/partition.image bs=4096 conv=notrunc,noerror
WARNING: Don't take my example to heart, read the article, dd can be dangerous if not used properly!
 
Old 04-06-2007, 06:20 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The message about no operating system is probably due to the mbr being wiped out. See if the partitions exist before reinstalling. You may just need to run the "fixmbr" program. Some linux distro's save a backup of the mbr to the /boot directory. You may be able to use dd to copy the backup mbr to /dev/hda after booting up with a rescue disk.

Also use fdisk to mark the drive as active.

Last edited by jschiwal; 04-06-2007 at 09:07 AM.
 
  


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
cloning partition, wrong root linuxer12 Linux - General 5 02-20-2007 12:40 PM
Please, Please,Please help with HD Cloning... knichel Linux - Software 7 09-16-2006 10:19 PM
Moving/cloning partition LeftyAce Debian 17 01-13-2006 03:19 PM
Cloning Fat32 Partition - Knoppix? Mhehman Linux - Newbie 1 03-12-2005 04:31 AM
Cloning a / and swap partition for Red Hat 9 dravya Linux - General 2 05-07-2004 03:38 PM

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

All times are GMT -5. The time now is 05:43 PM.

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