LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 10-31-2006, 11:36 PM   #1
bioalchemist
Member
 
Registered: Oct 2005
Distribution: mandriva
Posts: 106

Rep: Reputation: 15
I want to back up my windows install ...


using linux. Is there a way to get my system the way I want it and then make an "image" of it on a separate hard drive that I can later use to re-image the windows partition on my system hard drive?
 
Old 11-01-2006, 12:01 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You can use the dd command to do that. You can even pipe the output of the dd command through tar or gzip or bzip to compress the image. If the drive is 1/3 full, for example, the compressed image file will be similarly smaller. If you want to save the image to an external drive, keep in mind that some file system such as fat32 have a 2 GB limit on filesize. In that case, you could also pipe the output through the split command.

Last edited by jschiwal; 11-01-2006 at 12:39 AM.
 
Old 11-01-2006, 05:36 AM   #3
saini_mw
Member
 
Registered: Jun 2005
Location: On the top of the World
Posts: 114

Rep: Reputation: 15
I think you want to make a single image file from your HDD so that you can save your all the HDD contents including your MBR & Partitions, if yes..?

Norton Ghost is the best option.

Regards,

Harinder Singh.
 
Old 11-01-2006, 08:17 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by saini_mw
Norton Ghost is the best option.
Harinder Singh.
Not so.....Ghost costs money, dd is free

One of the big epiphanies with Linux is discovering the simplicity of utilities such as dd---and how the SW industry was able to package them and actually SELL them....

Would you pay $ for --eg-- Winzip?
 
Old 11-01-2006, 08:50 AM   #5
bioalchemist
Member
 
Registered: Oct 2005
Distribution: mandriva
Posts: 106

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jschiwal
You can use the dd command to do that. You can even pipe the output of the dd command through tar or gzip or bzip to compress the image. If the drive is 1/3 full, for example, the compressed image file will be similarly smaller. If you want to save the image to an external drive, keep in mind that some file system such as fat32 have a 2 GB limit on filesize. In that case, you could also pipe the output through the split command.

Hmmm OK this sounds possible - thanks for all the replies. I have a 30 Gb partition that is my "C" Drive for windows - the rest of the HD is storage (160 total). I'm going to be storing my back up on a networked hard drive, so file system shouldn't be a problem. One thing though - once I have my backup, how will I be able to retrieve it when needed? Is there a way to install from that backed up image?
 
Old 11-01-2006, 12:13 PM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by bioalchemist
Hmmm OK this sounds possible - thanks for all the replies. I have a 30 Gb partition that is my "C" Drive for windows - the rest of the HD is storage (160 total). I'm going to be storing my back up on a networked hard drive, so file system shouldn't be a problem. One thing though - once I have my backup, how will I be able to retrieve it when needed? Is there a way to install from that backed up image?
If you use a utility like dd to make backups by cloning the whole disk, then restoring is simply a reversal of the process.
Be careful---dd is the ultimate power tool. One typo and it will wipe out your whole system without even blinking.

With 2 identical drives, you can clone like so:
dd if=/dev/hda of=dev/hdb bs=4096 clones a to b
reverse the hda and hdb to go the other way.

To image to a file:
dd if=/dev/hda of=</path/filename> bs=4096 (There needs to be room for the file)

Here's the premier tutorial on dd:
http://www.linuxquestions.org/questi...d.php?t=362506
 
Old 11-01-2006, 01:12 PM   #7
bioalchemist
Member
 
Registered: Oct 2005
Distribution: mandriva
Posts: 106

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by pixellany
If you use a utility like dd to make backups by cloning the whole disk, then restoring is simply a reversal of the process.
Be careful---dd is the ultimate power tool. One typo and it will wipe out your whole system without even blinking.

With 2 identical drives, you can clone like so:
dd if=/dev/hda of=dev/hdb bs=4096 clones a to b
reverse the hda and hdb to go the other way.

To image to a file:
dd if=/dev/hda of=</path/filename> bs=4096 (There needs to be room for the file)

Here's the premier tutorial on dd:
http://www.linuxquestions.org/questi...d.php?t=362506

So does it matter that the partition is NTFS format? In other words, I'd be backing up an NTFS partition, which shouldn't be a problem, but then on the re-install end I'd be writing to an NTFS partition ... does that make sense?

So would it be acceptable to boot linux (from a 2nd HD (sda)) and then use dd to image only the 1 30 GB partition of my other HD (sdb), then can I still use dd to put that image back if it's NTFS file system? I thought NTFS write capabilities were not there yet ....

thanks for the link, also - I will read it thoroughly.
 
Old 11-01-2006, 01:58 PM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
dd works at the raw device level---it neither knows nor cares about filesystems.

Again, use dd with caution. It's like a table saw with no blade guard......

Last edited by pixellany; 11-01-2006 at 02:02 PM.
 
Old 11-01-2006, 02:02 PM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Another note: I am not 100% sure about using dd to clone just one partition. If this DOES work, then the restore process has to include being sure that the partition is put where the partition table expects to find it. Perhaps the link I posted answers this.
Otherwise: Google or "man dd"
 
Old 11-01-2006, 06:03 PM   #10
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
If you use split to divide up the image before storing on the network drive, you can use the cat command with a wild card to join the fragments when restoring. If you don't have an if= argument, dd takes the stream from stdin. Another advantage of splitting up the image is that you can use par2create to add redundancy in case one of the segments gets damaged or deleted.

Actually, you can simply cat out the entire partition in the first place instead of using dd.
EX: cat /dev/hdc >/mnt/network-drive/hdc-Nov01-06.img
This works using simple commands because in Unix ( and Linux ) everything is a file.


EX 2: dd if=/dev/hdc1 bs=4096 | gzip -c | split -b 200m /mnt/remotestore/hdc-Nov01-06.img.

The reverse would be
cat /mnt/network-drive/hdc-Nov01-06.img.* | gunzip | dd of=/dev/hdc bs=4096

SMB shares may have limit on the lengths of files that can be transferred. I'm not certain about that but you should check it out with Google. Also, if the shared folder is on a fat32 partition, then the 2 GB limit holds.

Read the dd manpage or info page or the coreutils manual. You can send the dd command the SIGUSR1 signal and it will respond with the progress so far on stderr. For very large streams that may take hours, this is better than simply cat'ing to or from the partition.

Last edited by jschiwal; 11-01-2006 at 06:11 PM.
 
  


Reply



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
Can't Install Windows back onto my SimplyMEPIS pc. drumsticks77 Linux - General 2 06-25-2006 12:04 AM
Tried to install windows, now am having trouble getting back to suse 9 makhand Linux - Distributions 4 02-01-2004 05:04 PM
Windows ME back-up - before mandrake install perfect20002 Linux - Newbie 2 06-19-2003 12:28 PM
How to install it back to windows?????? udayatay Linux - General 2 05-17-2003 02:25 AM
Cant get back into Windows : ( thetruevoice Linux - Software 3 09-07-2001 11:25 AM

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

All times are GMT -5. The time now is 05:47 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