disk partitioning for multiOS machine
Richard W.M. Jones
rjones at redhat.com
Tue Aug 19 09:15:53 UTC 2008
On Mon, Aug 18, 2008 at 05:52:33PM +0300, Ahmed Kamal wrote:
> Sorry this might be a bit off topic. I am getting a new laptop, and plan to
> use fedora as my main OS. I will be installing Windows too for the
> occasional game. I would also like to install open-solaris and/or MacOSX,
> just to see what others are up to. Eventually I will also want to run
> multiple VMs. It would be necessary to share data across those OSs and VMs.
> I am lost as to how to partition/lvm the 250GB drive for optimal use. Does
> anyone have a similar setup? any advice ?
This is how I arranged a similar machine where I wanted to multi-boot
into Windows and several other OSes:
/dev/sda1 Windows
/dev/sda2 Shared /boot partition (give it 1 or 2 GB)
/dev/sda3 LVM PV & single volume group /dev/VolGroup
within /dev/VolGroup:
/dev/VolGroup/F10 For Fedora 10/Rawhide
/dev/VolGroup/F9 For Fedora 9
/dev/VolGroup/F8 For Fedora 8
/dev/VolGroup/Debian For Debian
/dev/VolGroup/Shared Shared space (mounted on all OSes)
/dev/VolGroup/Swap Shared swap (used by all OSes)
The reasoning behind this was that Windows needs its own primary
partition. /boot also needs to be on a primary partition because of a
well-known limitation with GRUB. Everything else was going to run
under Linux so I just have separate LV for each operating system's
root. Then /dev/VolGroup/Shared is mounted as /mnt/shared on each OS
so I have a space to share data. I have separate /home directories,
but conceivably you could share these between OSes.
/boot is shared. When you install a new OS it will "helpfully" trash
the GRUB configuration in /boot/grub/grub.conf, so before you install,
take a copy, then afterwards restore the copy and add a new boot
section for the new OS. However new OS installs should leave the rest
of /boot untouched *provided* you don't tell them it's OK for them to
format the /boot partition (don't do that!)
Remember that OpenSolaris won't know what to do with LVM. It will
need a primary partition, unless you're going to run it only
virtualized under a Linux host, in which case you can use LVM for its
virtual disks. Primary partitions are a pain because changing the
size or rearranging them is next to impossible. LVM is far more
flexible.
No idea about Mac OS X. I assume you'd be running the hacked version
of OS X (if your hardware isn't a Mac).
> Would KVM on F10 allow running the non-virtualized (i.e. on disk installed)
> Windows and Solaris to run in full virt mode ?
Yes. With the configuration above you have a lot of flexibility - you
can both multi-boot and run OSes virtualized from the same LVs.
However you will need to hack /etc/fstab, because disk names will
appear different when running on baremetal versus virtualized. Also
you can't share /dev/VolGroup/Swap between running OSes (!)
I wouldn't recommend running Windows virtualized under KVM. There's
lots of random breakage, and even if you do get it working, it'll be
really slow.
Rich.
--
Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top
More information about the fedora-devel-list
mailing list