1

I am building a new system. While my current focus is on what to buy and how to wire it, I have been thinking ahead about how to partition the disks. I know that on a dual boot (win7/ubuntu) that it is best to install windows first and then repartition using, say, this https://sourceforge.net/projects/partedmagic/

But I plan on a twist. Dual boot is less appealing than running one of the OS' as a guest. The disadvantage of dual boot is that you have to exit one OS and boot the other. With a virtual setup you can simply switch between them as they are running concurrently. I plan on installing Sun's VirtualBox.

For personal reasons, I want Ubuntu as the host and Win7 as the guest. For speed, I want to install win7 in its own raw partition. This would be the first (boot) partition. Since the actual Win7 installation happens after the Ubuntu install, is there a partitioning tool/strategy that someone can recommend?

Thanks

Mike Jr
  • 187
  • 1
  • 7

5 Answers5

1

You just need to set aside a partition or the Windows, at best giving it the appropriate type number when creating the partition. Ideally, you would have your own hardrive which you can just throw Windows on to, but that option might not be available.

What, at least for previous Windows', was necessary, is that the partition ideally be a primary partition and bootable.

You will also need a USB boot medium or your installation CD to boot your Ubuntu in the case Windows tries to overwrite your MBR with its own bootloader. Just reinstall your own boot-loader and add the Windows entry (with chainloader +1 etc) if desired.

The Ubuntu you can of course partition like whatever you feel like.

towo
  • 1,887
  • 14
  • 12
  • Thank you. I was thinking along this same line; use a windows install disk to create the boot partition as ntfs but stop and don't install windows. Re-partition for Ubuntu and install Ubuntu. Install VirtualBox. Install Win7 as a guest in raw partition mode. I was hoping to find one tool that would just pre-partition everything before the OS installations. – Mike Jr Jul 14 '09 at 13:00
  • I'd never trust anything to do something like that automatically. Mostly, such things end up in wasted time. – towo Jul 15 '09 at 00:50
  • I was hoping that I am not the only person thinking along these lines. I will also be installing a SSD and an additional consideration is aligning file systems to an SSD’s erase block size. http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/ Turns out that the Windows 7 partitioning tool does this perfectly. Hence my plan A. – Mike Jr Jul 15 '09 at 03:23
1

If I'm reading your question correctly you wish to boot into Linux and run Windows7 as a virtual machine using VirtualBox.

In this case then you probably don't need to worry about where the Windows7 partition as you'll just need to point VirtualBox to it. You will also want to install Windows by firing up the virtual machine rather than just installing it as you would on the base hardware to make sure that the appropriate HAL gets used.

For partitioning I would use the alternative install cd and setup LVM. Then just carve up a Logical Volume for the Windows7. This way you can adjust it's size if needed easily and when the free license of Windows7 runs out you can just remove the logical volume and not have to deal with any residual partitioning.

3dinfluence
  • 12,409
  • 2
  • 27
  • 41
  • You are reading my question correctly. I want to install Windows in raw partition mode under VirtualBox. This means that Win7 goes its own partition. To be safe, I want this partition to be the boot partition. I don't know if VirtualBox requires this or not. But it gives me the option to punt back to dual boot if VirtualBox, for some reason, can't handle it. – Mike Jr Jul 14 '09 at 13:04
  • 1
    I'm not sure that would work. VirtualBox is going to abstract all the hardware from the Windows7 install. Things like the HAL as well as the licensing will likely break trying to go back and forth between each other. I won't say it's impossible but I wouldn't expect that to work very smoothly. – 3dinfluence Jul 14 '09 at 13:57
  • VirtualBox supports installing directly into a raw partition. It is one of the things (besides being free) that attracted me to it. :-) – Mike Jr Jul 15 '09 at 03:19
  • Being able to use a raw partition rather than a file for the storage device on a virtual machine and being able to boot up into the OS without the virtualization layer are two different things. Most virtualization platforms don't like the windows ACPI HAL and Windows licensing doesn't like when suddenly all the hardware it was running on changes. So these are two things you'll have to figure out if you want to freely go between running Windows under VirtualBox and natively by booting directly into it. – 3dinfluence Jul 15 '09 at 04:17
  • It looks like VirtualBox does support ACPI and IO APIC, which is what the default HAL from a Windows install, if you set the appropriate options in VirtualBox. So you're only issue should be getting windows to be ok with all the hardware changing as you go between the two environments. According to this article you may be able to use two hardware profiles in Windows to allow this. But the article is about XP. http://mesbalivernes.blogspot.com/2008/01/virtual-box-booting-from-existing.html – 3dinfluence Jul 15 '09 at 04:27
  • That is a great link, 3dinluence! Balivernes used raw partition to access an existing Xp installation. I wasn't thinking about the problem that way around. Thank you. – Mike Jr Jul 15 '09 at 11:50
1

GParted is the tool I would recommend.

What you need to do is before installing Ubuntu, run the GParted Live CD and make two partitions, 1 for Ubuntu, and 1 for Windows 7. For the Ubuntu partition, you can go ahead and format it using whatever filesystem type you want (XFS, ext3, ext4, whatever...), but for the Windows 7 partition you want to leave it alone. Then when you install Windows 7 in VirtualBox, choose the second partition in the Windows 7 setup and then have Windows 7 do the formatting.

That should get you the result your looking for.

Weegee
  • 121
  • 5
0

For the Ubuntu partition, I can recommend having two. One 10GB for / and the rest for /home. That way you can reinstall the OS completely without having to scratch all the data in your home directory. I've used this layout on all my Linux boxes for may years with great success, and indeed I several times have had to reinstall the OS from scratch, with this partitioning meaning I didn't have to reinstall all the data as well.

Lennart Regebro
  • 315
  • 1
  • 10
0

The main reason to install into a raw partition/disk is to dual boot, i.e. use as virtual or dual boot as a boot drive. I doubt you'll see any performance improvements using raw partitions, maybe a little with raw disks. If you use raw disks you need dedicated drives, but then you'd be better off (if speed was the primary issue) to stripe the drives in linux and use a virtual disk on the stripe.

If you're going to dual boot you should know how to install/repair the boot loaders for windows and linux. Install order shouldn't matter, just a quick fix to the respective boot manager that got clobbered if needed. If you install windows first most linux distros will see it and install a menu entry for windows into the grub menu automatically. Re-partitioning after the windows install isn't necessary, most linux distros will allow you to partition during the install.

If you installing for dual boot remember to create a separate hardware profile for windows and a separate linux network profile before starting up virtualized existing physical systems. This will keep hardware changes to a minimum.

If you want dual boot with virtual access, my preference although it uses more space, is too clone the systems, physicals to virtuals. Then use rsync to synchronize/backup the physicals. This gives you a backup of your systems as a bonus. And there are no profiles/hardware driver issues except for the first clone import.

When booting up to windows, sync-up physical linux to virtual linux then start virtual linux up.

When booting linux, sync-up physical windows to virtual windows then start virtual windows up.

joe
  • 129
  • 2