Copying Windows system using Linux

eriddle at linuxcare.com eriddle at linuxcare.com
Mon Nov 20 12:04:44 PST 2000


Quoting Miroslav Hrachovec on Mon, Nov 20, 2000 at 01:00:57PM +0100 :
> > 
> > My LFS system shares one of my drives with a Windows 98 system, which I 
> > boot very infrequently.  I'm about to replace the drive with a larger 
> > one. I've got the HD upgrade mini-HOWTO, and I think I know what to do 
> > as regards copying my Linux partition over.
> > 
> > My question is: Can I use Linux to copy my Windows partition over as 
> > well - by mounting the old and new vfat partitions and using "cp -ax"? 
> > It seems to me that it should work, is there any reason it might not?
> > 
> 
> I don't know if it will work. At least you have to use FORMAT.EXE /s
> to make your drive bootable. Here helps no 'cp' no 'dd' It has to be
> FORMAT.EXE-generated bootsector. If you will succeeded let as know.
> 
> But, I have other solution. There is excelent program called Norton
> Ghost from Symantec. It is tool for saving partition/disk into one file.
> And it has capabilities to extract it to the larger partitition.
> It isn't free but you can Try before Buy ...
> 
> 
> 		Mirek
> 
> 
> > Steve
--snip--

rsync, written by Andrew Tridgell, author of Samba, is a great tool.
I recently upgraded my hard drive using it, but I use it every day for
back ups as well.  Basically, here is what I did...

1.  mounted all my LFS filesystems, including my vfat windows partition.
	I mounted as vfat under /mnt/vfat using
	mount -t vfat /devforwin98partition /mnt/vfat

2.  Made sure I had enough space for everything on my rsync server
    and ran the following command:
	rsync -azv --exclude /proc /* rsyncserver::lfslapback
	
	This archives, and zips verbosely, excludes the /proc directory
	everything in / to the rsync server I have running.
	
	Before I had a server, I just tunneled through ssh like this:
	rsync -azv --exclude /proc /* -e ssh eriddle at serverIP:/mnt/backup/.

3.  Partitioned the new drive using Linuxcare's BBC, including the vfat
	partition.

4.  Used Windows boot disk to format c: /s

5.  Used Windows boot disk to set the MBR with fdisk /mbr

6.  Tested the windows boot to make sure the MBR was fixed.

7.  Booted with the BBC, set up networking, remounted all my partitions
	the way I wanted them, including /mnt/vfat, making all the mount
	points along the way, including /proc.

8.  cd to the top of your mounted tree (cd /mnt/newdrive ) and
	then run the rsync command.  
	rsync -azv rsyncserver::lfslapback/* /.
    or
	rsync -azv -e ssh eriddle at serverIP:/mnt/backup/* /.

9.  Verify my lilo.conf and fstab are in order and run lilo

10. Reboot!  Done!

Since I keep a daily backup, it was no problem.  The BBC has everything
else I need, but if you do not have one, you may need to use a boot disk
that will get you on the network.  If you have the BBC (on a laptop), all
you need to do is do a pcmcia start, then trivial-net-setup, which will
set you up with ssh if you are connected to the net.  Then remount the
partitions the way I want them.  Very cool.  Hope that helps.

Cheers,
Ed

-- 
Ed Riddle, Linuxcare, Inc.
Office: 415.354.4229, FAX 415.701.7457
ed at linuxcare.com, http://www.linuxcare.com/
Linuxcare. Support for the revolution.

-- 
Unsubscribe: send email to lfs-apps-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message




More information about the blfs-support mailing list