Partitioning for multiple systems

Jerry McAllister jerrymc at msu.edu
Mon Apr 27 14:31:06 UTC 2009


On Sun, Apr 26, 2009 at 11:45:07AM -0700, Michael David Crawford wrote:

> I have a machine I plan to use solely for testing.  I have FreeBSD 
> 8.0-CURRENT on it right now, and would like to add FreeBSD 7.2-RC2 as 
> well as CentOS 5.3 Linux.
> 
> Presently I have three Master Boot Record primary partitions - "slices" 
> in the FreeBSD parlance, if I understand correctly:
> 
> - A Linux slice to be used for CentOS' /boot
> - A BSD slice subdivided into partitions that hold 8.0-CURRENT
> - A big FAT slice (so to speak) meant to be split up for 7.2 and CentOS
> 
> A PC-style Master Boot Record can hold a maximum of four primary 
> partitions, or it can hold three primaries and a single extended 
> partition that is subdivided into logical partitions.
> 
> The geometries of the logical partitions aren't given in the MBR, but 
> exist as a linked list.
> 
> I *should* be able to split that FAT slice up into a primary for 7.2 and 
> an extended partition that will hold CentOS' other partitions; however:
> 
> In Googling about this, I have read some dire warnings about FreeBSD 
> being unable to understand logical partitions; apparently installing 
> FreeBSD *before* an extended partition will result in all your logicals 
> getting trashed.  One is advised to put all the FreeBSD MBR partitions 
> *after* the extended partition.
> 
> Is that the case?  Have you any advice for me?

FreeBSD is not happy with MS 'extended partitions'.   But, I don't really
see your problem.   You are not using Microsloth for anything.
Create your Lunix slice first, then one for FreeBSD 7.2 and finally one
for FreeBSD 8.0.   You still logically have one left for something but
it doesn't seem to be needed and neither does a 'logical partition'.

Note that FreeBSD will not run from the FAT slice as far as I know.

FreeBSD might be able to mount the CENTOS slice stuff if you use
the right type of mount.  I don't know about mounting Lunix from FreeBSD.
But, you can't do it the other way (eg mount a FreeBSD type filesystem 
from Lunix - though maybe, I have never tried it)

> One more thing: if it's possible, I'd like for the /home directory to be 
> shared between both of my FreeBSD installations.  In a normal 
> installation, there is a real /usr/home directory, with /home being a 
> symbolic link.
> 
> If I'm running FreeBSD out of one MBR partition (or slice), can I mount 
> a directory that's in a different one?

MBR has nothing to do with the filesystem type.
MBR is just a [usually] one block/sector of code that makes a few
choices and then reads in a subsequent, OS-specific block of code
to begin the actual boot process.    MS MBRs are not very friendly.
The FreeBSD MBR will boot any OS that follows the official standard
for boot code location.   Linux wants you to use some fancier, 
non-standard (but by now, pretty much usable everywhere) MBRs such
as Grub.   They all do essentially the same thing - ask you which 
block you want to boot and then go load it in and transfer over 
control to it.  Generally they don't care what is in the block
but MS still goes out of its way to pretend that the rest of the world 
does not exist so it won't play with others, though I have heard rumors
that the newest stuff takes a somewhat broader outlook.

>From FreeBSD you can mount other types of filesystems such as MS
by using the correct mount types.   For example, if you want to mount 
an MS FAT or FAT32, you use an 'msdosfs' type in your fstab file or 
mount_msdosfs(8) utility to do the mount.   Do some studying to see
if you can mount any Lunxi type filesystem from FreeBSD.

When you create a new __non-root__ account, you can put the home
directory anywhere the system can reliably read and write.  DO NOT
put the home directory for a root account outside of the root (/) 
filesystem.   Since both FreeBSD 7.xx and 8.xx are going to be UFS
type file systems, you could put them both in your /etc/fstab for
each and pick a single partition for (non root) home directories.
I don't know if that is a good idea, but it should work OK.  

////jerry    
   
> 
> Thanks for your help!
> 
> Mike
> -- 
> Michael David Crawford
> mdc at prgmr.com
> 
>    prgmr.com - We Don't Assume You Are Stupid.
> 
>       Xen-Powered Virtual Private Servers: http://prgmr.com/xen
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"


More information about the freebsd-questions mailing list