Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Nov 2013 17:48:41 +0100
From:      Polytropon <freebsd@edvax.de>
To:        Warren Block <wblock@wonkity.com>
Cc:        saeedeh motlagh <saeedeh.motlagh@gmail.com>, freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: how install two freebsd9.2 on one disk?
Message-ID:  <20131117174841.a4bf8443.freebsd@edvax.de>
In-Reply-To: <alpine.BSF.2.00.1311170903010.50907@wonkity.com>
References:  <CAA_1SgF0qwgSLu3J4E3PtuCsvqMMJJDoUb24v2FXhapKgv7k0A@mail.gmail.com> <20131117185150.3207ab60@X220.ovitrap.com> <CAN%2BS=WCpT36KpsNh7Yb-of9XNNZQTFq_esKxpq8z1g5TfXbMvQ@mail.gmail.com> <20131117163620.b5e6df59.freebsd@edvax.de> <alpine.BSF.2.00.1311170903010.50907@wonkity.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 17 Nov 2013 09:09:23 -0700 (MST), Warren Block wrote:
> On Sun, 17 Nov 2013, Polytropon wrote:
> 
> > On Sun, 17 Nov 2013 16:51:42 +0330, saeedeh motlagh wrote:
> >> (although i do it and nothing change) if not, where is boot manager and how
> >> should i use it? i think something should be done about boot partition
> >> (ada0p1), don't it? please help me to boot my 2 OS correctly.
> 
> This is a good question.  As far as I know, boot0 will only work on real 
> MBR disks, and does not understand GPT partitions.  Any time I've needed 
> to multiboot, the other operating system can't handle GPT anyway, so MBR 
> is required.

It's just the question in how far gpart can be used to create
such an MBR layout, or if traditional tools (fdisk, bsdlabel,
newfs) will be easier here?

I assume that when the boot manager is installed, the two OS
installations will be shown as "F1: FreeBSD" and "F2: FreeBSD"
unless the boot manager's code gets a custom modification. :-)



> So using MBR/bsdlabel partitioning and boot0 is one option.  grub or 
> grub2 or whatever they call it now is supposed to be able to handle GPT 
> partitions.  I have not tried that.

I assume this requires slices (because I also assume, without
the neccessary education) that the dedicated approach would
not allow the boot manager to boot into BSD partitions. Still
this should be easy to create and test. The old "sysinstall"
(if it's still available in FreeBSD 9.2) should be able to
aid in this process (or at least "sade" should), but I think
that if I reconstruct this task from memory, it would look
like this:

1. In the slice editor, create two slices, ada0s1 and ada0s2.
   Mark the first one active. Install the boot manager into
   it.

2. In the partition editor, for each slice, create one
   partition covering the whole slice: ada0s1a and ada0s1b.
   Initialize them with newfs and install the OS. (If required,
   create more than one partitions as shown in my sloppily
   crafted example.)

3. If you want a shared /home partition, make a third slice.
   You can create up to 4 slices (somewhere else called "DOS
   primary partitions"), for example ada0s3c, the whole slice
   will be newfs'd.

4. Apply labels to all of them.

5. Use the labels in the /etc/fstab files of the two OSes.

If this can't be done with sysinstall or sade, it can still
be done with fdisk and bsdlabel.

My prediction: The boot manager will be started via the first
bootable slice (s1) and let you select to boot from s1 or s2.
>From there on, the process is trivial. :-)



> Another option for GPT is to use the bootme and bootonce flags.  See 
> gptboot(8).

Those are also mentioned in "man gpart", which I was already
thinking of (in terms of being a part of the solution).


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131117174841.a4bf8443.freebsd>