{"id":327,"date":"2006-09-10T22:09:14","date_gmt":"2006-09-11T02:09:14","guid":{"rendered":"http:\/\/jclark.org\/weblog\/2006\/09\/10\/howto-backup-an-entire-windows-drive-with-os-x-and-ubuntu\/"},"modified":"2006-09-10T22:09:14","modified_gmt":"2006-09-11T02:09:14","slug":"howto-backup-an-entire-windows-drive-with-os-x-and-ubuntu","status":"publish","type":"post","link":"https:\/\/jclark.org\/weblog\/2006\/09\/10\/howto-backup-an-entire-windows-drive-with-os-x-and-ubuntu\/","title":{"rendered":"HOWTO Backup an Entire Windows Drive with OS X and Ubuntu"},"content":{"rendered":"<p><strong>Note:<\/strong> This method backs up the <em>entire<\/em> drive, free space and all.  If you have a 30G harddrive, you&#8217;ll need 30G free on the target Mac.  If you only want to recove some of the files, check out my article <a href=\"http:\/\/jclark.org\/weblog\/Miscellany\/Tech\/ubrescue.html\">HOWTO Recover Files from a Non-Bootable Windows PC using Ubuntu Live<\/a>.  In addition, that article doesn&#8217;t require the use of a Mac to retreive the files, you could use another Windows box, for example.<\/p>\n<p>About a year ago, I posted a method for <a href=\"http:\/\/jclark.org\/weblog\/2005\/06\/06\/nfsbackup\/\">backing up a Windows Laptop with OS X<\/a>, which used a <a href=\"http:\/\/www.knopper.net\/knoppix\/index-en.html\">Knoppix<\/a> Live CD and NFS.  Today, I needed to perform the same task.  I wanted to use Windows file sharing instead of NFS, since support is built into OS X and can be enabled from System Preferences.  I also wanted to use <a href=\"http:\/\/ubuntu.com\">Ubuntu<\/a> instead of Knoppix, since I had a Ubuntu 6.06 CD handy, and I&#8217;m a Ubuntu fan.  While I had some issues, I came up with a method which I think is easier then the old one.<\/p>\n<p>The laptop I needed to back up recently had a memory chip go south, so it only has 192M of memory, and I believe part of this is used for video memory.  Unfortunately, this is below the <a href=\"http:\/\/www.ubuntu.com\/download\/releasenotes\/606#head-e15a51f7ff4cac464dfd54cbed7506ef13814de3\">recommended 256M minimum RAM<\/a> for a Ubuntu Desktop install.  I haven&#8217;t found a minimum requirement for running the live CD, but considering that no swap space is availble when running a Live CD, I expect it is at least the same.  I found that running the Live CD on this machine was so slow as to be unusable.<\/p>\n<p>Hoping to find a way to reduce memory requirements, I searched for a comprehensive guide to the Live CD&#8217;s boot options, with no success.  I also searched for a way to boot the Live CD without X Windows (text mode only), also with no success.  If anyone can help with either option, please leave a comment.<\/p>\n<p>Stuck, I decided I&#8217;d have to download a different Live CD.  Although other options exist, I decided this was a good opportunity to try <a href=\"http:\/\/xubuntu.com\">XUbuntu<\/a> , a Ubuntu variant that uses XFCE instead of Gnome for its desktop environment.  XFCE is designed for machines with low resources, and the Live CD requires only 128M.  <\/p>\n<p>XUbuntu worked fine.  I couldn&#8217;t find some of the GUI tools Ubuntu provides that I&#8217;ve used in past HOWTO&#8217;s, so this one is mostly command line.  As a bonus, if you have a machine with a little extra RAM, and already have a Ubuntu Live CD handy, these instructions should work equally well.<\/p>\n<ol>\n<li>\n<p>On the Mac that will receive the backup, make sure that Windows Sharing is enabled via the Sharing pane in System Preferences.  By default, this will share your home directory; that&#8217;s where we&#8217;ll put the backup.  In the instructions below, my user name is jclark, substitute your own.  Also, make a note of your Mac&#8217;s IP address.  If you don&#8217;t know it, open Terminal and run ifconfig.<\/p>\n<\/li>\n<li>\n<p>Boot the system to be backed up with a (X)Ubuntu Live CD (also called the Desktop CD in the latest release).<\/p>\n<\/li>\n<li>\n<p>Run the Terminal application.  Depending on your *Buntu of choice, it will be in one of the menus.<\/p>\n<\/li>\n<li>\n<p>Install support for mounting Windows shares (will be installed in RAM only):<\/p>\n<pre><code>sudo apt-get install smbfs<\/code><\/pre>\n<\/li>\n<li>\n<p>Create a mount point (a local directory that will host your Mac home directory):<\/p>\n<pre><code>cd \/mnt\nsudo mkdir mac<\/code><\/pre>\n<\/li>\n<li>\n<p>Mount your (Mac) home directory on the source machine.  Change the &#8220;192.168.1.100&#8221; to your Mac&#8217;s IP address, and change &#8220;jclark&#8221; to your Mac username (in both places):<\/p>\n<pre><code>sudo mount -t cifs -o &#039;username=jclark&#039; \/\/192.168.1.100\/jclark \/mnt\/mac<\/code><\/pre>\n<p>You will be prompted for a password, provide your Mac password.    <strong>Note:<\/strong> using <code>-t cifs<\/code> instead of <code>-t smbfs<\/code> (as you may expect) avoids a 2GB file size limitation.  <\/p>\n<\/li>\n<li>\n<p>Copy the hard drive to your Mac.  This assumes your Windows hard drive is &#8216;hda1&#8217;, which it probably is.  If you know it isn&#8217;t (and you know the correct value), change accordingly.<\/p>\n<pre><code>sudo dd if=\/dev\/hda1 of=\/mnt\/mac\/drive_backup.img<\/code><\/pre>\n<\/li>\n<li>\n<p>Wait.  This could take a while.  Backing up my 30G drive took 6.5 hours.  I expected it to be faster, maybe the laptop only supports 10MBit Ethernet.  If you&#8217;ve got 100MBit ethernet, this should be faster.  Oh, and if you are on a machine with a wireless connection, assuming it even works under Ubuntu, I reccomend using a direct (wired) ethernet connection for this if at all possible.  <\/p>\n<\/li>\n<li>\n<p>When it finishes, unmount the shared drive:<\/p>\n<pre><code>sudo umount \/mnt\/mac<\/code><\/pre>\n<p>and shut down Ubuntu.<\/p>\n<\/li>\n<li>\n<p>On the Mac, in your home directory, you now have a disk image named <code>drive_backup.img<\/code>.  Double click it to open it like any other drive image.  You can copy files out as needed.<\/p>\n<\/li>\n<\/ol>","protected":false},"excerpt":{"rendered":"<p>Note: This method backs up the entire drive, free space and all. If you have a 30G harddrive, you&#8217;ll need 30G free on the target Mac. If you only want to recove some of the files, check out my article HOWTO Recover Files from a Non-Bootable Windows PC using Ubuntu Live. In addition, that article [&hellip;]<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58,57,59,55,56],"class_list":["post-327","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-backup","tag-os-x","tag-samba","tag-ubuntu","tag-xubuntu"],"_links":{"self":[{"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/posts\/327","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/comments?post=327"}],"version-history":[{"count":0,"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/posts\/327\/revisions"}],"wp:attachment":[{"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/media?parent=327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/categories?post=327"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/tags?post=327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}