Bug 158358 - [loader] [patch] allow /boot/loader to work from an MBR extended partition
Summary: [loader] [patch] allow /boot/loader to work from an MBR extended partition
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 9.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: Andrey V. Elsukov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-28 02:00 UTC by Gyrd Thane Lange
Modified: 2012-11-19 13:09 UTC (History)
0 users

See Also:


Attachments
file.diff (2.62 KB, patch)
2011-06-28 02:00 UTC, Gyrd Thane Lange
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gyrd Thane Lange 2011-06-28 02:00:20 UTC
http://parvati.thanelange.no/freebsd/boot_loader/

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 is supposed to work.

-----
| 1 |
-----
| 2 | --
-----   |
        |
        |
        |
----- <-
| 5 |
-----
|   | --
-----   |
        |
        |
        |
----- <-
| 6 |
-----
|   |
-----


How /boot/loader (incorrectly) works.

-----
| 1 |
-----
| 2 | --
-----   |
        |
        |
        |
----- <-
| 5 |
-----
| 6 | --
-----   |
        |
        |
        |
----- <-
| 7 |
-----
| 8 |
-----

Fix: Using the attached patch:
patch -d /usr/src/sys/boot/i386/libi386/ < boot_loader.diff

Patch is also found here:
http://parvati.thanelange.no/freebsd/boot_loader/boot_loader.diff


Patch attached with submission follows:
How-To-Repeat: Install FreeBSD in an MBR extended partition. (It is easily doable using command line tools.)

Attempt to boot.

Observe that the /boot/loader does not find the desired partition.
Comment 1 Andrey V. Elsukov freebsd_committer freebsd_triage 2012-08-06 09:55:30 UTC
State Changed
From-To: open->patched

This issue fixed in head/ after r239088.
Comment 2 Andrey V. Elsukov freebsd_committer freebsd_triage 2012-10-17 16:31:57 UTC
Responsible Changed
From-To: freebsd-bugs->ae

Take.
Comment 3 Andrey V. Elsukov freebsd_committer freebsd_triage 2012-11-19 13:08:43 UTC
State Changed
From-To: patched->closed

Fixed in r243243. Thanks!