Dual Boot 8.2 and Windows 7
Gyrd Thane Lange
gyrd-se at thanelange.no
Sun Jun 26 18:55:36 UTC 2011
On Fri, 24 Jun 2011 16:47:26 -0700
perryh at pluto.rain.com wrote:
> doug at safeport.com wrote:
>
> > If FreeBSD can be installed in an extended partition,
> > that would be a very useful howto.
>
> _Installing_ it in an "extended partition" is easy enough.
> geom(8) understands "extended partitions" (although sysinstall
> does not, so you need to install using Fixit# as for other
> non-sysinstall cases such as ZFS).
>
> The problem is _booting_ it. The code in i386/boot2 and
> lib/libstand is written to find the / (or /boot) FS on a
> BSD partition of an fdisk "primary partition" (aka slice),
> or in a GPT partition, and would need additions to handle
> fdisk "extended partitions".
Some years ago I ran into a similar problem. I ran out of primary
partitions (using MBR-speak) and had to move FreeBSD into an extended
partition.
Here the simple patch I wrote for the FreeBSD boot loader:
<http://parvati.thanelange.no/freebsd/boot_loader/boot_loader.diff>
<http://parvati.thanelange.no/freebsd/boot_loader/>
To update your source use:
patch -d /usr/src/sys/boot/i386/libi386/ < boot_loader.diff
The FreeBSD loader has since a very long time ago attempted to work
with MBR extended partitions but a simple logical error has prevented
it from succeeding:
How it normally works.
-----
| 1 |
-----
| 2 | --
----- |
|
|
|
----- <-
| 5 |
-----
| | --
----- |
|
|
|
----- <-
| 6 |
-----
| |
-----
How /boot/loader (incorrectly) works.
-----
| 1 |
-----
| 2 | --
----- |
|
|
|
----- <-
| 5 |
-----
| 6 | --
----- |
|
|
|
----- <-
| 7 |
-----
| 8 |
-----
It has been a long time since I installed my system but I seem to
remember that all that is required is to copy the /boot/loader binary
from a patched system onto the newly installed one. (I have included a
copy of my /boot/loader at the URL above.)
The next challenge is to find a boot manager that will pick up FreeBSD
in an extended partition. For myself I use a self patched GRUB. (GRUB
also nearly worked out of the box, but had a different problem.) You're
welcome to have those patches as well if you need them.
Lastly I have the following in my kernel configuration file:
include GENERIC
...
nooptions GEOM_PART_BSD
nooptions GEOM_PART_MBR
options GEOM_BSD
options GEOM_MBR
That is because I am not fond of the new mangled device names, but
prefer the old ones.
Hope any of this helps.
Best regards,
Gyrd ^_^
More information about the freebsd-questions
mailing list