Re: another "tar" question - backup XP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2004-08-03 (Tuesday) 22:44, Mick Mearns wrote:
> Hello list;
>   I would like to know how to zip/bzip2/tar.gz etc my Windows XP
> partition.
> 
>  I rarely use XP, when I last did - I realized what a PITA it was to
> get current.
> (fdisk/format/w98se/upgrade to XP/load drivers/load SP1/patch/load
> progs)
> 
> So I would like to make an iso (while I still have space), and burn it
> to DVD.
> 
> I know that Linux file permissions are not possible on vfat, but how do
> I save the vfat file attributes? hid/sys/archive
> 
> Is there a script out there to do this?
> 
> Thanks
>    Mick M.
> 
> =====
> Dogs have Masters - Siamese Cats have Staff!

    I do not know such, but I can give you an idea: mount your fat partition,
create a file with zeroes to take all the free space on that it, umount the
partition and compress and backup the whole partition. I assume you have your
XP on /dev/hda2, so:

[root@fedora ~]# mkdir /mnt/c
[root@fedora ~]# mount /dev/hda2 /mnt/c
[root@fedora ~]# cd /mnt/c
[root@fedora /mnt/c]# cat /dev/zero > ZEROFILE
cat: write error: No space left on device
[root@fedora /mnt/c]# rm -f ZEROFILE
[root@fedora /mnt/c]# cd
[root@fedora ~]# umount /mnt/c
[root@fedora ~]# sync
[root@fedora ~]# dd if=/dev/hda2 | bzip2 -vv -9 > /mnt/home/hda1.bz2
# ( or 'dd if=/dev/hda2 | gzip -9 > hda1.gz' )

    Then backup /mnt/home/hda1.bz2 where you want. You need the 'ZEROFILE'
in order to full the unused partition space with zeroes, which will be
compressed very much (128MB zeroes | bzip2 -9 > 112 bytes). When you need
to restore your XP just do 'bzcat hda1.gz > /dev/hda2'. All files and
permissions (this trick can be done a bit harder with any fs) will be 1:1.

!!! WARNING !!!
    1. You should restore to the same partition (size).
    2. Any mistake like /dev/hda1 instead of /dev/hda2 will totally destroy
/dev/hda1.
    3. This does not take care of the MBR. You might need to recover
it with the XP's rescue mode -> manual -> restore boot sector.
!!! WARNING !!!

    Hope this helps :)
    PS: I used such trick to 'clone' some machines with same hardware and
disks.

-- 
Regards,
  Doncho N. Gunchev    Registered Linux User #291323 at counter.li.org
  GPG-Key-ID: 1024D/DA454F79                        http://pgp.mit.edu
  Key fingerprint = 684F 688B C508 C609 0371  5E0F A089 CB15 DA45 4F79

Attachment: pgp0XDilHYX0N.pgp
Description: signature


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux