• AppleCentral Network:
  • Tech Support
  • |
  • Open Source
  • |
  • Apple News
  • |
  • Register Domains
  • |
  • SSL Certificates
  • |
  • iPod Deals
  • |
  • Mac Deals
  • |
  • Mac Book Shelf
  • AppleCentral Home
  • MacTech Magazine
    • About MacTech in Print
    • Issue Table of Contents
    • Subscribe
    • Risk Free Sample
    • Back Issues
    • MacTech DVD
    • MacTech Archives
    • MacTech Print Archives
    • MacMod
    • MacTutor
    • FrameWorks
    • develop
  • MacNews.com
    • MacNews News
    • Blog
    • MacTech Reviews and KoolTools
    • Whitepapers, Screencasts, Videos and Books
    • News Scanner
    • Rumors Scanner
    • Documentation Scanner
  • Apple Expo
    • by Category
    • by Company
    • by Product
  • MacForge.net
  • Job Board
  • Advertising
    • Benefits of MacTech
    • Mechanicals and Submission
    • Dates and Deadlines
    • Submit Apple Expo Entry
  • User
    • Register for Ongoing Raffles
    • Register new user
    • Edit User Settings
    • Logout
  • Contact
    • Customer Service
    • Webmaster Feedback
    • Submit News or PR
    • Suggest an article
  • Connect Tools
    • MacTech Live Podcast
    • RSS Feeds
    • Twitter
You are not logged in. [Log In] AppleCentral » Forums » Mac » Windows and Virtualization » Preping dual boot for OSx86
Register User    Forum List        Active Topics    FAQ
Topic Options
Hop to:
#477035 - 07/28/09 04:40 PM Preping dual boot for OSx86 [Re: monneysi]
TCPMeta Offline
MacModder

Registered: 11/16/07
Posts: 1816
Loc: Florida, USA
Wanting to join the world of OSx86 but don't want to loose your files on your PC for the repartitioning? Or spend countless hours restoring a backup for your windows partition?

Say no more, since the Linux world has been nice to us Mac users we have all of the toys and gadgets to rip a NTFS partition and slim it down.

Notes
Before anyone spouts off on why I chose this way of making a backup is because dd doesn't like the NTFS very well and it can lead to a dead MBR (Master boot record). Not to mention NTFSCLONE scans the drive and only copies sectors that have files in them so say you have a 80GB hard drive and only 5GB is used it will make a 5GB image instead of the whole drive getting dumped into a 80GB image.

What software do I need?
All you need is MacPorts installed and the ntfsprogs suite.

Install MacPorts if you don't have it installed already.
In terminal use this command.
Code:
sudo port install ntfsprogs


No go to the root of your drive and create a new directory called backup
Code:
cd / | mkdir backup


Now connect the windows partitioned drive to the mac and run Disk Utility. Click on the drive and select Info. Look at the line Disk Identifier, it should say something like disk1. Also take note on the line Disk Number. In Linux terms the drive resides as /dev/disk1 but when the partition is mounted its known as /dev/disk1s1.

Leave Disk Utility running and open up Terminal. I'm going to use the Disk Identifier and Disk Number from my backup, so don't just copy and paste the code for just incase.

Backing up the MBR (Master boot record)
Code:
sudo fdisk -d /dev/disk1 >/backup/master-fdisk-sda.dump

Code:
sudo dd if=/dev/disk1 bs=512 count=1 of=/backup/master-sda.mbr


Backing up the partition itself using ntfsclone
Go back into Disk Utility and click UNMOUNT for the windows partition then go back to Terminal.
Code:
sudo ntfsclone -s -o - /dev/disk1s1   | gzip | split -b 1000m - /backup/master-sda.img.gz_


Now if you have multiple windows partitions you can save them all by issuing the command again but change the Disk Number and the saved file label, here is a example of saving multiple partitions.
Code:
sudo ntfsclone -s -o - /dev/disk1s1   | gzip | split -b 1000m - /backup/master-sda1.img.gz_

sudo ntfsclone -s -o - /dev/disk1s2   | gzip | split -b 1000m - /backup/master-sda2.img.gz_


Restoring the image
Now before you install OSx86 you want to repartition the hard drive. Since you already got Disk Utility running you can go ahead and delete the partition and create a multiple partition shceme. It doesn't matter what partition type you use but make sure you have Boot with MBR selected in the Security Options.

To keep things simple we are going to make the Windows partition first on the drive, this way you won't have any conflicts with the MBR.

After you have created the partitions take note again on the Disk Number. My system listed it as Disk1s1 and Disk1s2. So Disk1s1 is my Windows partition and Disk1s2 is my OSx partition.

In Terminal go into /backup
From there you can restore the MBR and partition.

MBR Restore
Code:
sudo fdisk /dev/disk1 < /backup/master-fdisk-sda.dump

Code:
sudo dd if=/backup/master-sda.mbr of=/dev/disk1


Restoring partition
NOTE NTFSCLONE has created a few images files. Each one is 1GB and they need to be combined before you restore them. Issue the LS command and take a peek at what is there. Since my partition was 5.5GB I have 6 files total.

Code:
master-sda.img.gz_aa
master-sda.img.gz_ab
master-sda.img.gz_ac
master-sda.img.gz_ad
master-sda.img.gz_ae
master-sda.img.gz_af


Now to combined them and restore just issue this command
Code:
cat master-sda.img.gz_aa master-sda.img.gz_ab master-sda.img.gz_ac master-sda.img.gz_ad master-sda.img.gz_ae master-sda.img.gz_af   | gunzip -c | ntfsclone --restore-image --overwrite /dev/disk1s1 -


Now after restoring the image you can put the drive back into your PC and test to see if Windows boots. If it works then go ahead and install OSx86. If for some reason it doesn't work try again, if it still fails just create a single partition and restore the Windows partition and do things the old fashion way.

Top
#477036 - 07/29/09 03:17 AM Re: Preping dual boot for OSx86 [Re: monneysi]
Oelmuvun Offline


Registered: 12/29/08
Posts: 67
Alternatively, if you have it, you can drop $50 on a single platter 500GB HDD and stick that in your PC. :P
And if it comes down to "but then I have to use the BIOS's boot selector menu" you can just grab an old 512MB or smaller USB flash drive (that, lets face it, you do not use anymore) to store Chameleon on. You can just set the PC to boot off your flash drive in the BIOS.

Easy, and if you have to wipe a drive or one fails you do not have to reinstall or reconfig your bootloader since your bootloader is on a totally different device. laugh


Edited by (07/29/09 03:28 AM)

Top
#477037 - 07/29/09 03:25 AM Re: Preping dual boot for OSx86 [Re: monneysi]
TCPMeta Offline
MacModder

Registered: 11/16/07
Posts: 1816
Loc: Florida, USA
The whole point for that guide is if some Mac user that owns a PC and doesn't want to go though the heart acke to start from scratch with Windows. I wish I can get a 500GB hard drive for 50 bucks.

Top
#477038 - 07/29/09 03:30 AM Re: Preping dual boot for OSx86 [Re: monneysi]
Oelmuvun Offline


Registered: 12/29/08
Posts: 67
I am not trying to undermine you, just adding another option for those that can do it. Each way has it's place and validity.
And why would they be starting from scratch with windows? They would not be touching the windows drive at all.

Top
#477039 - 07/29/09 03:39 AM Re: Preping dual boot for OSx86 [Re: monneysi]
Oelmuvun Offline


Registered: 12/29/08
Posts: 67
Ok, so it is not single platter and not quite $50.. close though, I would have expected it to be slightly cheaper in USA compared with Canada.
http://www.newegg.com/Product/Product.as...6-073-_-Product

these are $60
http://www.newegg.com/Product/Product.aspx?Item=N82E16822148395

I am sure there are other drives on sale for close to $50 now and then though.

If you want sub$50 then it looks like there are 320GB and 250GB drives and such as well.

Top
Previous Topic
View All Topics Index
Next Topic

Tweet

Preview

Moderator:  Acumowchek, MacGizmo, Reboot 
Print Topic
Switch to Threaded Mode
Publications, Articles and Industry Discussion
   »MacTech/MacNews Article Discussions
   »Apple World
Marketplace
   »Deals and Special Offers
      »Expired Offers
   »Trading Warehouse
Mac
   »Hardware
   »Software
   »Servers, Security, and Networking
   »Programming, Web Dev & Scripting
   »Windows and Virtualization
   »Cloud and Online Services
Mobile Technologies
   »iPhone Apps, AppStore, and iTunes
   »iPad, iPhone, iPod and Apple TV Hardware
Mods and Hacks
   »General Mods
      »Techniques
      »Miscellaneous
      »Mod Logs
   »Laptop Mods
      »Case Mods
      »Hardware Mods
      »Misc. Mods
   »Desktop Mods
      »Case Mods
      »Hardware Mods
      »Misc. Mods
   »Peripheral Mods
      »iPod Mods
      »Misc Mods
   »Software Hacks & Mods
General Discussion
   »Site Feedback & Issues
   »Stan's Lounge
   »Soapbox
Now Software Support
   »Announcements
   »Now X
      »FAQs
      »Discussion
   »Now Up-to-Date & Contact
      »Community Help
      »Tips and tricks
View profile
Send a PM
Add to your Watched Users
View posts
View profile
Send a PM
Add to your Watched Users
View posts
View profile
Send a PM
Add to your Watched Users
View posts
View profile
Send a PM
Add to your Watched Users
View posts
View profile
Send a PM
Add to your Watched Users
View posts
Board Rules · Mark all read
Contact Us · AppleCentral · Top

MacTech Only Search:
Community Search:

 
 
 

 
 
 
 
 
  • SPREAD THE WORD:
  • Slashdot
  • Digg
  • Del.icio.us
  • Reddit
  • Newsvine
  • Generate a short URL for this page:



AppleCentral. www.applecentral.com
Main office: 805-494-9797
Xplain's use of MacNews, AppleCentral and AppleExpo are not affiliated with Apple, Inc. MacTech is a registered trademark of Xplain Corporation. AppleCentral, MacNews, Xplain, "The journal of Apple technology", Apple Expo, Explain It, MacDev, MacDev-1, THINK Reference, NetProfessional, MacTech Central, MacTech Domains, MacForge, and the MacTutorMan are trademarks or service marks of Xplain Corp. Sprocket is a registered trademark of eSprocket Corp. Other trademarks and copyrights appearing in this printing or software remain the property of their respective holders.
All contents are Copyright 1984-2010 by Xplain Corporation. All rights reserved. Theme designed by Icreon.
Generated in 0.042 seconds in which 0.031 seconds were spent on a total of 13 queries. Zlib compression enabled.
Powered by UBB.threads™ PHP Forum Software 7.5.8