Partition 30-GB SSD; Ubuntu, Virtualbox, and Win7

MikeJRamsey

Distinguished
Jun 19, 2009
247
0
18,690
I am planning a new system which will include a 30 GB SSD and a 1.5 TB HDD. I want to partition the 30 GB SSD so that Ubuntu is the host and Windows 7 is the guest. I have been thinking about how to do this and have come up with the following steps. Has anybody tried something similar?

1. Format the SSD using the Windows 7 installer and create a
16-GB Primary boot partition; do not install Windows 7 but
install the NTFS file system

2. Use the Ubuntu Partman utility to create two more Primary
partitions and an Extended partition (I have my reasons)

3. Ted Ts’o recommends using a Primary partition geometry of
224 heads and 56 sectors/track to guarantee that the partition
is aligned to an erase block boundary on my SSD. See http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/

4. The Extended partition is less intuitive.
> pvcreate –metadatasize 250k /dev/sda#
> You use pvs to check that partitions are aligned
>> pvs /dev/sdb2 -o+pe_start
>> The first PE will be at 256.00K

5. Primary partitions created by the Windows 7 installer are
guaranteed to be aligned to an erase block boundary

6. Use the Ubuntu Partman utility to format a second drive, a 1.5 TB HDD

7. Install Ubuntu

8. Install VirtualBox 2.2.4 for Linux

9. Install Windows 7 as a VirtualBox Guest specifying
"raw hard disk access" to that 16-GB Primary boot partition specified in step 1

I am trying to get the best of both worlds; ease of switching between the host Ubuntu and the guest Windows 7 operating systems as well as the speed of native installations.

Any thoughts?

--Mike Ramsey
 

leon2006

Distinguished
I use Acronis Disk Director to manage my partitions. In that way one partition has no dependence on another. Acronis has a OS Selector that allow you to select which OS to boot.

The tool allows you to create, resize partition independent of the existing OS.

My current partitions are Windows 64 Ultimate & Ubunto for Linux.

The tool is about $35 but it works. Acronis tech support assured me that when Win-7 comes out an update will be provided to current license owners.
 

MikeJRamsey

Distinguished
Jun 19, 2009
247
0
18,690
Leon2006,
Thank you for the pointer. Acronis was not one of the options that I had researched. This is probably because I was doing it from the Ubuntu perspective. Acronis runs on Windows. Looking at Acronis now I agree that it looks like a good product. I didn't see anything about alignment to an erase block boundary on an SSD (Solid State Drive) using a SATA II interface. This is what I really need help with. Windows 7 does this out of the box but the Linux distributions haven't caught up.

Also, I am not interested in just a dual boot capability. This would be straight forward and a lot easier to accomplish. With dual boot, when I want to switch operating systems I have to reboot.

With virtualization I can switch back and forth between operating systems with a keyboard command. This is what I really want to achieve. I could go the other way and use Microsoft's virtualization support and run Ubuntu as the guest. I discarded this idea because Windows is a security sieve. Currently on my two windows boxes I need to install an armada of 3rd party anti-virus, firewall, and anti-spyware tools to try to keep my systems secure. Securing Linux is just plain easier.

At some point I want to install OpenSolaris as a guest which is another reason why I went with VirtualBox as my Virtualization solution. Solaris is still an industrial strength OS used by much of industry. OpenSolaris would be a fun way to play but today Ubuntu runs on more hardware.

--Mike Ramsey
 

sub mesa

Distinguished
Be aware of alignment to flash boundaries when partitioning. Ahere to a power of two value. Perfect flash alignment is difficult, as flash blocks are often 640KiB in size. Windows 7 and Vista have a 1024KiB partition offset.
 

MikeJRamsey

Distinguished
Jun 19, 2009
247
0
18,690
Thank you. Both the Intel X25-M and the OCZ Vertex SSDs have Erase Block sizes of 512 bits. Ted Ts'o recommends "align partitions on at least 128k boundaries for maximum efficiency".
 

sub mesa

Distinguished
Just checked google:

OCZ Vertex: 512KiB erase blocks
Intel X25-M: 128KiB erase blocks

Both would do good with either Vista or Win7 partitioning, which leaves 1024KiB as offset. But an erase block size of 640KiB will be problematic for Windows-users.
 

sub mesa

Distinguished
Also, raw disk access by Virtualbox .vmdk raw disk or disk partition is unstable in my testing. I filed bug 4201 at Virtualbox on that, cause i got segfaults when doing software RAID inside a VM. Haven't tried the new 3.0 beta yet.

So test your solution first. Sounds interesting though, i wish you all the luck. :)
 

MikeJRamsey

Distinguished
Jun 19, 2009
247
0
18,690


Sub mesa,
Good catch. I committed two sins.

1. I was loose with my units
2. I misread a feature chart that was comparing the two. I missed the heading change from "Intel X25-M" to "Vertex".

Thank you for the quick correction.
 

MikeJRamsey

Distinguished
Jun 19, 2009
247
0
18,690


That is really interesting. I am not implementing a RAID. How much do you think I should worry?

I looked up your bug report here: http://www.virtualbox.de/ticket/4201

I will be following how Sun handles it. BTW, my guess is that Sun doesn't have your exact setup so you will have to help them reproduce the problem. Platform testing is such a pain for a product like VirtualBox.

I am still curious about VirtualBox. While this is a home project, I have a client that might benefit from my experience. They are a big Sun shop. Of course they would be implementing a RAID.

If my attempt fails, I could switch to VMWare (which would make a buddy of mine happy as he was just certified) or punt and install a dual boot. But I would really like to get VirtualBox working.

Thank you,
Mike Ramsey
 

Kitchenguy

Distinguished
Sep 12, 2009
2
0
18,510
Mike,

I am very interested to see how you went...any chance of an update? I played with Virtual box for a while but hit some snags, esp with windows - it kept freaking out. Currently my system multi boots with:

Ubuntu 9.04 64 Bit
PC Linux 2009.2 32 Bit (for general internet browsing)
Win 7 64 Bit RC (to see what it was like, and I actually like it)
Win XP Pro (don't use much anymore)
Win XP Pro (configured for work VPN access because they want certain security software etc and do not recognise Bitdefender as valid security)

So, as you can see my life would be faster and much simpler getting virtual box under control, probably running it all from the Ubuntu 64 Bit Base.

cheers...Simon
 

whirlednews

Distinguished
Oct 13, 2009
45
0
18,530
I have a question regarding partitions on SSDs

I am going to clean install Windows Vista 64 on to an 80GB Intel X25-M and then install the Windows 7 64 upgrade immediately after updating Vista 64 with SP2 (I heard that this is necessary).

Anyways, is there really any point to creating separate partitions on the SSD in this case or is it OK not to?

If I should create multiple partitions, how much should I keep for the Windows Vista 64/ Windows 7 upgrade?