<br><br><div class="gmail_quote">On Fri, Nov 13, 2009 at 5:35 PM, Mr. Teo En Ming (Zhang Enming) <span dir="ltr"><<a href="mailto:space.time.universe@gmail.com">space.time.universe@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5"><br><br><div class="gmail_quote">On Fri, Nov 13, 2009 at 1:25 PM, Mr. Teo En Ming (Zhang Enming) <span dir="ltr"><<a href="mailto:space.time.universe@gmail.com" target="_blank">space.time.universe@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div><br><br><div class="gmail_quote">On Fri, Nov 13, 2009 at 11:17 AM, Mr. Teo En Ming (Zhang Enming) <span dir="ltr"><<a href="mailto:space.time.universe@gmail.com" target="_blank">space.time.universe@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br><div class="gmail_quote"><div><div></div><div>On Fri, Nov 13, 2009 at 5:40 AM, Sergey Vlasov <span dir="ltr"><<a href="mailto:vsu@altlinux.ru" target="_blank">vsu@altlinux.ru</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>
On Fri, Nov 13, 2009 at 12:57:22AM +0800, Mr. Teo En Ming (Zhang Enming) wrote:<br>
[...]<br>
<div>> # VM 11: Rocks 5.1 x86_64 HPC Compute Cluster HVM domU<br>
><br>
> kpartx -av /dev/virtualmachines/rocks0001<br>
><br>
> dd if=/dev/virtualmachines/rocks0001 of=$DEST/rocks0001.mbr bs=512 count=1<br>
><br>
> partimage -d -M -b -z1 save /dev/mapper/virtualmachines-rocks0001p1<br>
> $DEST/virtualmachines-rocks0001p1.img<br>
><br>
> partimage -d -M -b -z1 save /dev/mapper/virtualmachines-rocks0001p2<br>
> $DEST/virtualmachines-rocks0001p2.img<br>
><br>
> partimage -d -M -b -z1 save /dev/mapper/virtualmachines-rocks0001p5<br>
> $DEST/virtualmachines-rocks0001p5.img<br>
<br>
</div>Note that this VM (and some other VMs listed in your script) uses<br>
logical partitions.  In this case just saving a copy of MBR will not<br>
be enough to save partition layout - MBR describes only 4 primary<br>
partitions, and restoring just MBR will not restore extended<br>
partitions.<br>
<br>
One way to backup the complete partition layout is by saving also<br>
the output of "sfdisk -d $device"; the resulting file can be used as<br>
input to sfdisk to restore all partitions, including logical ones.<br>
Saving MBR is still needed together with sfdisk, because it saves<br>
the boot code (used for HVM) and CHS geometry information (which can<br>
be used during boot in some cases).<br>
<br></div></div>-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.10 (GNU/Linux)<br>
<br>
iEYEARECAAYFAkr8gM8ACgkQW82GfkQfsqLa+QCaAqpO5NWhYHtKVi3M5ytERw27<br>
eC0AnjsJuG34MAR1jZRejBiJCVybQvc1<br>
=RRGH<br>
-----END PGP SIGNATURE-----<div><br>
<br>_______________________________________________<br>
Xen-users mailing list<br>
<a href="mailto:Xen-users@lists.xensource.com" target="_blank">Xen-users@lists.xensource.com</a><br>
<a href="http://lists.xensource.com/xen-users" target="_blank">http://lists.xensource.com/xen-users</a><br></div></blockquote></div><br><br><br>Thank you for pointing this out. Otherwise I would made incomplete backups.<br>


<br>
Would it be best practice to always backup both the MBR and the partition geometry using sfdisk whenever cloning our harddisks on desktops and servers?<br><br>Besides sfdisk, there are also other partitioning tools like fdisk, cfdisk, and parted.<br>



<br>Could these other tools also be used for backing up the partition geometry like sfdisk?<br><br>Thank you.<div><div></div><div><br clear="all"><br>-- <br>Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical Engineering)<br>



Alma Maters:<br>(1) Singapore Polytechnic<br>(2) National University of Singapore<br>My Primary Blog: <a href="http://teo-en-ming-aka-zhang-enming.blogspot.com" target="_blank">http://teo-en-ming-aka-zhang-enming.blogspot.com</a><br>


My Secondary Blog: <a href="http://enmingteo.wordpress.com" target="_blank">http://enmingteo.wordpress.com</a><br>
My Youtube videos: <a href="http://www.youtube.com/user/enmingteo" target="_blank">http://www.youtube.com/user/enmingteo</a><br>Email: <a href="mailto:space.time.universe@gmail.com" target="_blank">space.time.universe@gmail.com</a><br>


Mobile Phone (Starhub Prepaid): +65-8369-2618<br>
Street: Bedok Reservoir Road<br>Country: Singapore<br>
</div></div></blockquote></div><br></div></div>Hi,<br><br>I have made some improvements to the backup/cloning script. Please help me to vet it through for any mistakes. Thank you very much!<div><br><br><SCRIPT><br>
</div></blockquote></div></div></div></blockquote><div>       ***SNIPPED*** <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div class="h5">
<div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div></SCRIPT><br><br></div><div><div></div><div>-- <br>Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical Engineering)<br>


Alma Maters:<br>(1) Singapore Polytechnic<br>(2) National University of Singapore<br>My Primary Blog: <a href="http://teo-en-ming-aka-zhang-enming.blogspot.com" target="_blank">http://teo-en-ming-aka-zhang-enming.blogspot.com</a><br>

My Secondary Blog: <a href="http://enmingteo.wordpress.com" target="_blank">http://enmingteo.wordpress.com</a><br>
My Youtube videos: <a href="http://www.youtube.com/user/enmingteo" target="_blank">http://www.youtube.com/user/enmingteo</a><br>Email: <a href="mailto:space.time.universe@gmail.com" target="_blank">space.time.universe@gmail.com</a><br>

Mobile Phone (Starhub Prepaid): +65-8369-2618<br>
Street: Bedok Reservoir Road<br>Country: Singapore<br>
</div></div></blockquote></div><br></div></div>Hi All,<br><br>This is the final version of my backup script. I have gone through the script once to make sure there are no mistakes. If I want to capture any errors during the execution of the backup/cloning script, which of the following commands do I run?<br>

<br># ./backup-script.sh > backup.log<br><br>OR <br><br># ./backup-script.sh 2> backup.log<br><br>After completing the backup script, I will proceed to write the restore script.<br><br>If there are any errors, please let me know because I do not want to make any mistakes with the cloning process. Thank you.<br>

<br><SCRIPT><br><font size="1">***SNIPPED***<br></font><div><div></div><div class="h5"></SCRIPT><br><br>-- <br>Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical Engineering)<br>
Alma Maters:<br>(1) Singapore Polytechnic<br>(2) National University of Singapore<br>My Primary Blog: <a href="http://teo-en-ming-aka-zhang-enming.blogspot.com" target="_blank">http://teo-en-ming-aka-zhang-enming.blogspot.com</a><br>
My Secondary Blog: <a href="http://enmingteo.wordpress.com" target="_blank">http://enmingteo.wordpress.com</a><br>
My Youtube videos: <a href="http://www.youtube.com/user/enmingteo" target="_blank">http://www.youtube.com/user/enmingteo</a><br>Email: <a href="mailto:space.time.universe@gmail.com" target="_blank">space.time.universe@gmail.com</a><br>
Mobile Phone (Starhub Prepaid): +65-8369-2618<br>
Street: Bedok Reservoir Road<br>Country: Singapore<br>
</div></div></blockquote></div><br>Dear All,<br><br>This is the *initial* version of my data restore script.<br><br><SCRIPT><br><font size="1">#!/bin/sh<br><br>###############################################################################################################<br>
###############################################################################################################<br># Script to Restore Xen Host/Dom0 and all DomUs which are using Logical Volumes as Virtual Hard Disks<br>###############################################################################################################<br>
###############################################################################################################<br><br># Written by:<br> <br># Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical Engineering)<br>
# Alma Maters:<br># (1) Singapore Polytechnic<br># (2) National University of Singapore<br># Primary Blog: <a href="http://teo-en-ming-aka-zhang-enming.blogspot.com">http://teo-en-ming-aka-zhang-enming.blogspot.com</a><br>
# Secondary Blog: <a href="http://enmingteo.wordpress.com">http://enmingteo.wordpress.com</a><br># Youtube Videos: <a href="http://www.youtube.com/user/enmingteo">http://www.youtube.com/user/enmingteo</a><br># Xen Tutorials and Video Demos: <a href="http://www.xen.org/support/tutorial.html">http://www.xen.org/support/tutorial.html</a><br>
# Email: <a href="mailto:space.time.universe@gmail.com">space.time.universe@gmail.com</a><br># MSN: <a href="mailto:teoenming@hotmail.com">teoenming@hotmail.com</a><br># Mobile Phone (Starhub Prepaid): +65-8369-2618<br># Street: Bedok Reservoir Road<br>
# Country: Singapore<br><br># First written: 13 November 2009 Friday 6:49 P.M. Singapore time<br># Last updated: 13 November 2009 Friday 8:25 P.M. Singapore time<br><br># REFERNCE: "Geek Sheet: Bare-metal backup and recovery", May 7th, 2008, Jason Perlow<br>
# URL: <a href="http://blogs.zdnet.com/BTL/?p=8759">http://blogs.zdnet.com/BTL/?p=8759</a><br><br># Usage Instructions:<br><br># Boot up your desktop/server with System Rescue CD version 1.3.2 for i386/amd64. <br># Then execute this restore script. You need to adapt this script to work for your environment.<br>
# Download System Rescue CD from <a href="http://www.sysresccd.org/Main_Page">http://www.sysresccd.org/Main_Page</a><br><br># No. of QC Checks Performed on this restore script: 0<br><br>###############################################################################################################<br>
# Declare Variables<br>###############################################################################################################<br><br>HARDDISK=/dev/sda<br>SOURCE=/media/hitachi/test<br><br>###############################################################################################################<br>
###############################################################################################################<br># Restoring Xen Host/Dom0<br>###############################################################################################################<br>
###############################################################################################################<br><br># Restore the Master Boot Record<br>dd if=$SOURCE/f11-xen-dom0-sda.mbr of=$HARDDISK bs=512 count=1<br>
<br># Restore the Partition Geometry<br>sfdisk $HARDDISK < $SOURCE/f11-xen-dom0-partition-geometry-sda.sfdisk<br><br># Re-create the LVM2 PV containing the host operating system/dom0<br>pvcreate --uuid ??? /dev/sda2<br>
<br># Re-create the LVM2 PV containing all the virtual machines<br>pvcreate --uuid ??? /dev/sda3<br><br># Restore the LVM2 metadata for the volume group containing the host operating system/dom0<br>vgcfgrestore --file $SOURCE/vg_fedora11_host-vgcfg.lvm2.metadata vg_fedora11_host<br>
<br># Restore the LVM2 metadata for the volume group containing all the virtual machines<br>vgcfgrestore --file $SOURCE/virtualmachines-vgcfg.lvm2.metadata virtualmachines<br><br># Activate all the volume groups<br>vgchange -ay<br>
<br># Restore all filesystems for the host operating system/dom0<br>fsarchiver restfs -v $SOURCE/f11-xen-dom0-filesystems.fsa id=0,dest=/dev/sda1 \<br>id=1,dest=/dev/vg_fedora11_host/lv_home \<br>id=2,dest=/dev/vg_fedora11_host/lv_root \<br>
id=3,dest=/dev/vg_fedora11_host/lv_var<br><br># Re-create the swap partition<br>mkswap /dev/vg_fedora11_host/lv_swap<br><br>###############################################################################################################<br>
###############################################################################################################<br># Restoring Xen-based Virtual Machines/DomUs/Guest Operating Systems/VMs<br>###############################################################################################################<br>
###############################################################################################################<br><br>### NOTE: Check for swap partitions in each virtual machine and do a mkswap.<br><br># VM 1: Fedora 11 x86_64 PV domU (MPICH2 Virtual Supercomputer Center)<br>
###############################################################################################################<br><br>zcat $SOURCE/virtualmachines-f11-pv-hpc-node0001.img.gz | dd of=/dev/virtualmachines/f11-pv-hpc-node0001<br>
<br># VM 2: Fedora 11 x86_64 PV domU (MPICH2 Virtual Supercomputer Center)<br>###############################################################################################################<br><br>zcat $SOURCE/virtualmachines-f11-pv-hpc-node0002.img.gz | dd of=/dev/virtualmachines/f11-pv-hpc-node0002<br>
<br># VM 3: Fedora 11 x86_64 PV domU (MPICH2 Virtual Supercomputer Center)<br>###############################################################################################################<br><br>zcat $SOURCE/virtualmachines-f11-pv-hpc-node0003.img.gz | dd of=/dev/virtualmachines/f11-pv-hpc-node0003<br>
<br># VM 4: Fedora 11 x86_64 PV domU (MPICH2 Virtual Supercomputer Center)<br>###############################################################################################################<br><br>zcat $SOURCE/virtualmachines-f11-pv-hpc-node0004.img.gz | dd of=/dev/virtualmachines/f11-pv-hpc-node0004<br>
<br># VM 5: Fedora 11 x86_64 PV domU (MPICH2 Virtual Supercomputer Center)<br>###############################################################################################################<br><br>zcat $SOURCE/virtualmachines-f11-pv-hpc-node0005.img.gz | dd of=/dev/virtualmachines/f11-pv-hpc-node0005<br>
<br># VM 6: Fedora 11 x86_64 PV domU (MPICH2 Virtual Supercomputer Center)<br>###############################################################################################################<br><br>zcat $SOURCE/virtualmachines-f11-pv-hpc-node0006.img.gz | dd of=/dev/virtualmachines/f11-pv-hpc-node0006<br>
<br># VM 7: Fedora 11 x86_64 PV domU (MPICH2 Virtual Supercomputer Center)<br>###############################################################################################################<br><br>zcat $SOURCE/virtualmachines-f11-pv-hpc-node0007.img.gz | dd of=/dev/virtualmachines/f11-pv-hpc-node0007<br>
<br># VM 8: Fedora 11 x86_64 PV domU (MPICH2 Virtual Supercomputer Center)<br>###############################################################################################################<br><br>zcat $SOURCE/virtualmachines-f11-pv-hpc-node0008.img.gz | dd of=/dev/virtualmachines/f11-pv-hpc-node0008<br>
<br># VM 9: FreeBSD 8.0 RC2 UNIX amd64 HVM domU<br>###############################################################################################################<br><br>zcat $SOURCE/virtualmachines-freebsd.img.gz | dd of=/dev/virtualmachines/freebsd<br>
<br># VM 10: OpenSolaris 2009.06 UNIX amd64 PV domU<br>###############################################################################################################<br><br>zcat $SOURCE/virtualmachines-opensolaris.img.gz | dd of=/dev/virtualmachines/opensolaris<br>
<br># VM 11: Rocks 5.1 x86_64 HPC Compute Cluster HVM domU (based on CentOS 5.2)<br>###############################################################################################################<br><br># Add partition mappings in /dev/mapper<br>
kpartx -av /dev/virtualmachines/rocks0001<br><br># Restore MBR<br>dd if=$SOURCE/virtualmachines-rocks0001.mbr of=/dev/virtualmachines/rocks0001 bs=512 count=1<br><br># Restore partition geometry<br>sfdisk /dev/virtualmachines/rocks0001 < $SOURCE/virtualmachines-rocks0001.sfdisk<br>
<br># Restore all filesystems<br>partimage -e -b restore /dev/mapper/virtualmachines-rocks0001p1 $SOURCE/virtualmachines-rocks0001p1.img.000<br><br>partimage -e -b restore /dev/mapper/virtualmachines-rocks0001p2 $SOURCE/virtualmachines-rocks0001p2.img.000<br>
<br>partimage -e -b restore /dev/mapper/virtualmachines-rocks0001p5 $SOURCE/virtualmachines-rocks0001p5.img.000<br><br># Delete partition mappings in /dev/mapper<br>kpartx -dv /dev/virtualmachines/rocks0001<br><br># VM 12: Rocks 5.1 x86_64 HPC Compute Cluster HVM domU (based on CentOS 5.2)<br>
###############################################################################################################<br><br># Add partition mappings in /dev/mapper<br>kpartx -av /dev/virtualmachines/rocks0002<br><br># Restore MBR<br>
dd if=$SOURCE/virtualmachines-rocks0002.mbr of=/dev/virtualmachines/rocks0002 bs=512 count=1<br><br># Restore partition geometry<br>sfdisk /dev/virtualmachines/rocks0002 < $SOURCE/virtualmachines-rocks0002.sfdisk<br><br>
# Restore all filesystems<br>partimage -e -b restore /dev/mapper/virtualmachines-rocks0002p1 $SOURCE/virtualmachines-rocks0002p1.img.000<br><br>partimage -e -b restore /dev/mapper/virtualmachines-rocks0002p2 $SOURCE/virtualmachines-rocks0002p2.img.000<br>
<br>partimage -e -b restore /dev/mapper/virtualmachines-rocks0002p5 $SOURCE/virtualmachines-rocks0002p5.img.000<br><br># Delete partition mappings in /dev/mapper<br>kpartx -dv /dev/virtualmachines/rocks0002<br><br># VM 13: Rocks 5.1 x86_64 HPC Compute Cluster HVM domU (based on CentOS 5.2)<br>
###############################################################################################################<br><br># Add partition mappings in /dev/mapper<br>kpartx -av /dev/virtualmachines/rocks0003<br><br># Restore MBR<br>
dd if=$SOURCE/virtualmachines-rocks0003.mbr of=/dev/virtualmachines/rocks0003 bs=512 count=1<br><br># Restore partition geometry<br>sfdisk /dev/virtualmachines/rocks0003 < $SOURCE/virtualmachines-rocks0003.sfdisk<br><br>
# Restore all filesystems<br>partimage -e -b restore /dev/mapper/virtualmachines-rocks0003p1 $SOURCE/virtualmachines-rocks0003p1.img.000<br><br>partimage -e -b restore /dev/mapper/virtualmachines-rocks0003p2 $SOURCE/virtualmachines-rocks0003p2.img.000<br>
<br>partimage -e -b restore /dev/mapper/virtualmachines-rocks0003p5 $SOURCE/virtualmachines-rocks0003p5.img.000<br><br># Delete partition mappings in /dev/mapper<br>kpartx -dv /dev/virtualmachines/rocks0003<br><br># VM 14: Rocks 5.1 x86_64 HPC Compute Cluster HVM domU (based on CentOS 5.2)<br>
###############################################################################################################<br><br># Add partition mappings in /dev/mapper<br>kpartx -av /dev/virtualmachines/rocks0004<br><br># Restore MBR<br>
dd if=$SOURCE/virtualmachines-rocks0004.mbr of=/dev/virtualmachines/rocks0004 bs=512 count=1<br><br># Restore partition geometry<br>sfdisk /dev/virtualmachines/rocks0004 < $SOURCE/virtualmachines-rocks0004.sfdisk<br><br>
# Restore all filesystems<br>partimage -e -b restore /dev/mapper/virtualmachines-rocks0004p1 $SOURCE/virtualmachines-rocks0004p1.img.000<br><br>partimage -e -b restore /dev/mapper/virtualmachines-rocks0004p2 $SOURCE/virtualmachines-rocks0004p2.img.000<br>
<br>partimage -e -b restore /dev/mapper/virtualmachines-rocks0004p5 $SOURCE/virtualmachines-rocks0004p5.img.000<br><br># Delete partition mappings in /dev/mapper<br>kpartx -dv /dev/virtualmachines/rocks0004<br><br># VM 15: Rocks 5.1 x86_64 HPC Compute Cluster HVM domU (based on CentOS 5.2)<br>
###############################################################################################################<br><br># Add partition mappings in /dev/mapper<br>kpartx -av /dev/virtualmachines/rocks0005<br><br># Restore MBR<br>
dd if=$SOURCE/virtualmachines-rocks0005.mbr of=/dev/virtualmachines/rocks0005 bs=512 count=1<br><br># Restore partition geometry<br>sfdisk /dev/virtualmachines/rocks0005 < $SOURCE/virtualmachines-rocks0005.sfdisk<br><br>
# Restore all filesystems<br>partimage -e -b restore /dev/mapper/virtualmachines-rocks0005p1 $SOURCE/virtualmachines-rocks0005p1.img.000<br><br>partimage -e -b restore /dev/mapper/virtualmachines-rocks0005p2 $SOURCE/virtualmachines-rocks0005p2.img.000<br>
<br>partimage -e -b restore /dev/mapper/virtualmachines-rocks0005p5 $SOURCE/virtualmachines-rocks0005p5.img.000<br><br># Delete partition mappings in /dev/mapper<br>kpartx -dv /dev/virtualmachines/rocks0005<br><br># VM 16: Slackware64 13.0 amd64 HVM domU<br>
###############################################################################################################<br><br># Add partition mappings in /dev/mapper<br>kpartx -av /dev/virtualmachines/slackware64<br><br># Restore MBR<br>
dd if=$SOURCE/virtualmachines-slackware64.mbr of=/dev/virtualmachines/slackware64 bs=512 count=1<br><br># Restore partition geometry<br>sfdisk /dev/virtualmachines/slackware64 < $SOURCE/virtualmachines-slackware64.sfdisk<br>
<br># Restore all filesystems<br>partimage -e -b restore /dev/mapper/virtualmachines-slackware64p1 $SOURCE/virtualmachines-slackware64p1.img.000<br><br>partimage -e -b restore /dev/mapper/virtualmachines-slackware64p2 $SOURCE/virtualmachines-slackware64p2.img.000<br>
<br># Delete partition mappings in /dev/mapper<br>kpartx -dv /dev/virtualmachines/slackware64<br><br># VM 17: Ubuntu 9.10 Karmic Koala Linux HVM domU<br>###############################################################################################################<br>
<br># Add partition mappings in /dev/mapper<br>kpartx -av /dev/virtualmachines/ubuntu910<br><br># Restore MBR<br>dd if=$SOURCE/virtualmachines-ubuntu910.mbr of=/dev/virtualmachines/ubuntu910 bs=512 count=1<br><br># Restore partition geometry<br>
sfdisk /dev/virtualmachines/ubuntu910 < $SOURCE/virtualmachines-ubuntu910.sfdisk<br><br># Restore all filesystems<br>partimage -e -b restore /dev/mapper/virtualmachines-ubuntu910p1 $SOURCE/virtualmachines-ubuntu910p1.img.000<br>
<br># Delete partition mappings in /dev/mapper<br>kpartx -dv /dev/virtualmachines/ubuntu910<br><br># VM 18: Windows XP Home Edition SP3 32-bit HVM domU with VGA passthrough (requires Intel VT-d)<br>###############################################################################################################<br>
<br># Add partition mappings in /dev/mapper<br>kpartx -av /dev/virtualmachines/winxphome32<br><br># Restore MBR<br>dd if=$SOURCE/virtualmachines-winxphome32.mbr of=/dev/virtualmachines/winxphome32 bs=512 count=1<br><br># Restore partition geometry<br>
sfdisk /dev/virtualmachines/winxphome32 < $SOURCE/virtualmachines-winxphome32.sfdisk<br><br># Restore all filesystems<br>partimage -e -b restore /dev/mapper/virtualmachines-winxphome32p1 $SOURCE/virtualmachines-winxphome32p1.img.000<br>
<br># Delete partition mappings in /dev/mapper<br>kpartx -dv /dev/virtualmachines/winxphome32<br><br>###############################################################################################################<br>###############################################################################################################<br>
<br># Deactivate Logical Volume Manager<br>vgchange -an<br><br># Sync filesystems<br>sync<br><br># Reboot the machine<br>reboot<br><br>###############################################################################################################<br>
# EOF<br>###############################################################################################################</font><br></SCRIPT><br clear="all"><br>-- <br>Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical Engineering)<br>
Alma Maters:<br>(1) Singapore Polytechnic<br>(2) National University of Singapore<br>My Primary Blog: <a href="http://teo-en-ming-aka-zhang-enming.blogspot.com">http://teo-en-ming-aka-zhang-enming.blogspot.com</a><br>My Secondary Blog: <a href="http://enmingteo.wordpress.com">http://enmingteo.wordpress.com</a><br>
My Youtube videos: <a href="http://www.youtube.com/user/enmingteo">http://www.youtube.com/user/enmingteo</a><br>Email: <a href="mailto:space.time.universe@gmail.com">space.time.universe@gmail.com</a><br>Mobile Phone (Starhub Prepaid): +65-8369-2618<br>
Street: Bedok Reservoir Road<br>Country: Singapore<br>