LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-14-2004, 02:24 AM   #1
theonebeyond
Member
 
Registered: Aug 2004
Location: Germany
Distribution: Slackware 10.0
Posts: 258

Rep: Reputation: 30
Back up windows NTFS with Linux


Hi there!

I wonder if I could make an image of a NTFS-Partition with a clean and fresh intstalled Win2k or WinXP on it from Linux, and recover it later, if I kill Windows by some error or something.

Like with the programm ImageMagig from DOS...

Is that possible?

Greetings, Sascha
 
Old 10-14-2004, 05:48 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
If you have a partition, say /dev/hda1, (or any other block device) then you can create a backup image of it using:
Code:
bzip2 < /dev/hda1 > hda1bak.bz2
You can then restore the image from backup using:
Code:
bunzip2 < hda1bak.bz2 > /dev/hda1
Make sure that /dev/hda1 isn't mounted for either of these operations. You can restore onto any partition of exactly the same size and geometry. Obviously, if you don't have enough space to make the image, it won't work.

Edit: This works for any block device, provided that the device isn't in use when you try this. An NTFS partition contains all of its data inside the partition, so this will work. It's not optimal, though; it will sit and read sectors of empty space for example. You can also use the dd command to make this more efficient, by reading block sizes equal to the cache size on the disk.

Last edited by rjlee; 10-14-2004 at 06:03 AM.
 
Old 10-14-2004, 05:51 AM   #3
theonebeyond
Member
 
Registered: Aug 2004
Location: Germany
Distribution: Slackware 10.0
Posts: 258

Original Poster
Rep: Reputation: 30
And you are sure it works with NTFS drives?

It looks like it does to me, and that is exactly the way I thought it would be done... but I was too afraid to try until now :-)

Thanks very much!
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing some of my Linux partition back to NTFS HeavyWeight Linux - General 0 06-11-2004 12:02 PM
Linux -> NTFS and back Powerman Linux - Newbie 8 04-19-2004 10:54 PM
Back in Windows, I picked the wrong Linux. American Psycho Linux - General 13 03-16-2004 02:03 PM
Going back to Windows from Linux Miyamoto Linux - General 21 11-06-2003 04:00 PM
Deleted Windows (from Linux), Now it's BACK Hayz Linux - Newbie 6 09-15-2003 02:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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