|
|||||||||
| Register | FAQ | Top Statistics | Today's Posts | Donate | Gallery | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
Hi,
Cloning your Windows ntfs partition - from Mepis 6.5. ============================== You probably already know that Mepis 6.5 has the capability to read/write from and to your Windows NTFS partitions (thanks to ntfs-3g). This is a very nice feature for those with a dualboot system involving Windows. But there's more news in that specific area, even if it has not been really brought up sofar........: Mepis 6.5 also has ntfsprogs installed by default. Have a look at : http://wiki.linux-ntfs.org/doku.php?id=ntfsprogs for details. Ntfsprogs does consist of a wide selection of ntfs related utilities, and one of them is ntfsclone. And ntfsclone is a nice tool to make backups of and restore NTFS-partitions. Have a look here: http://wiki.linux-ntfs.org/doku.php?id=ntfsclone for details. What does ntfsclone do? ============== Ntfsclone is a utility for making backups -and restoring backups- of your working NTFS Windows-partition - from within Mepis. You could say that the linux 'dd' command can do that too. Except for the fact that 'dd' will also copy non-allocated (empty) blocks, making the backup image just as large as the original ntfs partition. And compressing the bit-for-bit 'dd-image' will not significantly reduce its size, especially not when these non-allocated blocks still contain the remains of (for instance) long deleted multimedia files. Clever Backups. ========= Now....how does ntfsclone handle this in a more clever way? The ntfs tool knows the internal structures of NTFS and is able to completely skip empty blocks. Its backup image may therefore be just a bit larger than the combined size of the actual files being backed-up and some filesystem meta-data. An optimal image-size can be achieved when you delete the Windows swapfile in Windows before making the ntfsclone backup in Mepis. How to make a backup? ============== Regular: If you want to make a backup called hda1.ntfs of the filesystem on the NTFS partition /dev/hda1 then do as follows: Open a konsole and type: ntfsclone -s -o hda1.ntfs /dev/hda1 Compressed: In order to further reduce the image filesize you can compress files at the same time. You do this by piping the output of the command to gzip, instead of directly to the imagefile: ntfsclone -s -o -- /dev/hda1 | gzip -c > hda1.ntfs.gz A fresh Windows installation with some installed programs will backup this way to an image file of around 600-800 MB Compressed AN Splitted: If you want to backup larger ntfs partitions (like 4-5 GB or more), for instance to an USB-harddisk that has been FAT32 formatted -which will require a filesize limit of slightly less than 4 GB- or to a writeable DVD you will probably need to also split the compressed imagefile. That can be done in an added pipelined command: ntfsclone -s -o /dev/hda1 | gzip -c | split -a 3 -b 700m - hda1.ntfs.gz The result will be backup-files of size 700 MB with names ranging from hda1.ntfs.gz.aaa through hda1.ntfs.gz.zzz How to restore a backup? =============== First you need to make sure that you do have an NTFS partiton of AT LEAST equal size as your (total of) uncompressed imagefile(s). That NTFS partition may be empty (or just reformatted), or contain data (which will then be overwritten).. Note: Please note before doing the backup how much space will be needed if you plan to use this scenario.... Regular: The easiest method is of course restoring an uncompressed image. Use the letter O (capital O) instead of the (lowercase letter) o : ntfsclone -r -O /dev/hda1 hda1.ntfs Compressed: If the image been compressed using gzip then you will need to reverse the pipeline: gunzip -c hda1.ntfs.gz | ntfsclone -r -O /dev/hda1 - Compressed and Splitted: Splitup imagefiles can be joined by cat: cat hda1.ntfs.gz.* | gunzip -c | ntfsclone -r -O /dev/hda1 Additional tool in ntfsprogs ================ If you have restored the image to a MUCH bigger partition you can (after the first start of Windows) resize it. Just boot up you livecd and issue the command: ntfsresize /dev/hda1 and expand the NTFS filesystem to fit the actual size of the partition. Regards, Ko Last edited by Eadwine Rose : 04-21-2007 at 02:10 PM. |
|
#2
|
|||
|
|||
|
Made it a sticky for you Ko :)
__________________
Registered Linux user #375470 SimplyMEPIS 8.0-32 2.6.27-1-mepis-smp #1 SMP PREEMPT i686 GNU/Linux Dual boot with W2K Pro * ASRock P4S61 / 1024Mb DDR * 2,67GHz Intel Celeron D * 81,96Gb Maxtor 6Y080L0 * 22" Samsung SyncMaster P2250 * SiS661FX 64MB (not in use) ATI RADEON 9550 AGP8 256MB * SiS AC'97 sound controller SI7012 Audio * SiS900 PCI Fast Ethernet * Logitech E3500 webcam * HP Scanjet 2400 (not supported) / DeskJet 840C * KDE 3.5.10 In Memoriam Dixie: 1-6-1991 - 4-10-2009 |
|
#3
|
||||
|
||||
|
That's pretty cool howto, thaks Ko.
|
|
#4
|
|||
|
|||
|
Hey I have a question. If there a way to ghost a drive to another. This way works but requires twice as much space than neccesary. eg. it requires that you backup to a drive with enough space for the NTFS file then to restore it to another. How would I clone a drive in one step. eg have a harddrive in computer which is being upgraded to another drive with a larger size - how would i do it?
I was thinking of using a live cd to clone a laptop to another drive thats mounted via a portable USB2 Laptop HDD Does this method copy the MBR also? Thanks
__________________
Fedora 12 - 64bit - Nvidia 9600GT - AMD Quad Core Phenom - 1.5 Terrabytes Storage - 8GB DDR2 RAM BOFH / SYSADMIN / Novell CLA and CLP |
|
#5
|
|||
|
|||
|
Just to answer my own question above ^^
If i wanted to directly copy one drive to another i could simply type Code:
dd if=/dev/olddrive of=/dev/newdrive EG. dd if=/dev/hda of=/dev/sdb Then copy MBR with: Code:
dd if=/dev/olddrive of=/dev/newdrive bs=512 count=1 Hope this helps someone. |
|
#6
|
||||
|
||||
|
In my (limited) experience, imaging a whole drive e.g. /dev/hda will include the mbr, so when the image is copied to new drive, the mbr (and thus grub etc) will be included...
|
|
#7
|
||||
|
||||
|
Ko, you do not mention whether the drive or partitions intended for backing up or restoring have to be mounted or unmounted, so am I right to interpret this omission (possibly deliberate) as an indication that they should be mounted when using ntfsclone?
And secondly, does the ntfs-3g driver have any conflicts that you (or another mepislover) know about with ntfsprogs and ntfsclone when such an operation is running? Mike P |
|
#8
|
||||
|
||||
|
Quote:
Mike P |
|
#9
|
||||
|
||||
|
Quote:
Quote:
Might be useful to check into the ntfsprogs links provided earlier. Regards, Ko |
|
#10
|
|||
|
|||
|
[quote=ko;50503]Hi,
Regular: If you want to make a backup called hda1.ntfs of the filesystem on the NTFS partition /dev/hda1 then do as follows: Open a konsole and type: ntfsclone -s -o hda1.ntfs /dev/hda1 How do you put the backup "hda1.ntfs" on a external USB drive /dev/sdb1 ? Very good how-to. jozien |
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|